Re: Hot-Swapping hard drives on Dell PowerEdge 2850 running FBSD 5.5-PRE
On Mon, Jun 26, 2006 at 01:54:14PM +0100, Joao Barros wrote: > On 6/26/06, Scott Mitchell <[EMAIL PROTECTED]> wrote: > >Yeah, megarc does have possibly the worst interface I've seen in quite a > >long time. Allegedly the Linux monitoring tools for these adapters will > >work with 6.1, although I haven't tried this myself yet. > > Yes, I think it was Doug Ambrisko who put in the shims for that, but > haven't tested it. > And yes, megarc should be on wikipedia as a bad example for bad interfaces. Yeah, I don't know what they were smoking when they decided that it was a good idea to use '?' as an option on a Unix command line, but they should share it with the rest if us :-) > > > >I've attached a couple of scripts I use for monitoring amr(4) adapters. > >One (amr-check-status) is run hourly from crontab to alert of any change > >in drive or array status. The other (700.amr-status) is a daily periodic > >script. > > amrstat from ports also include a daily crontab script which I'm hapilly > using. I should look at amrstat, I guess - it didn't exist (at least not in ports) when I set this machine up. > For the hourly job, there is a function in the amr(4) driver that's > supposed to do a constant check of the controller but alas the > function is just declared, empty in function. If this was to work, a > message to syslog would be enough to send out an email with an alert > for example. > I started this weekend(again) my port of bio from OpenBSD and I really > like what they did with the sysctl variables and with sensorsd like: > $ sysctl hw.sensors > hw.sensors.0=sd0, ami0 0, drive online, OK > hw.sensors.1=sd1, ami0 1, degraded, WARN > hw.sensors.2=sd2, ami0 2, failed, CRITICAL > > With sensorsd on top of that, monitoring is a breeze. > I think after bio I know what I will do next ;-) Now that sounds really nice. Scott -- === Scott Mitchell | PGP Key ID | "Eagles may soar, but weasels Cambridge, England | 0x54B171B9 | don't get sucked into jet engines" scott at fishballoon.org | 0xAA775B8B | -- Anon ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Hot-Swapping hard drives on Dell PowerEdge 2850 running FBSD 5.5-PRE
On 6/26/06, Scott Mitchell <[EMAIL PROTECTED]> wrote: Yeah, megarc does have possibly the worst interface I've seen in quite a long time. Allegedly the Linux monitoring tools for these adapters will work with 6.1, although I haven't tried this myself yet. Yes, I think it was Doug Ambrisko who put in the shims for that, but haven't tested it. And yes, megarc should be on wikipedia as a bad example for bad interfaces. I've attached a couple of scripts I use for monitoring amr(4) adapters. One (amr-check-status) is run hourly from crontab to alert of any change in drive or array status. The other (700.amr-status) is a daily periodic script. amrstat from ports also include a daily crontab script which I'm hapilly using. For the hourly job, there is a function in the amr(4) driver that's supposed to do a constant check of the controller but alas the function is just declared, empty in function. If this was to work, a message to syslog would be enough to send out an email with an alert for example. I started this weekend(again) my port of bio from OpenBSD and I really like what they did with the sysctl variables and with sensorsd like: $ sysctl hw.sensors hw.sensors.0=sd0, ami0 0, drive online, OK hw.sensors.1=sd1, ami0 1, degraded, WARN hw.sensors.2=sd2, ami0 2, failed, CRITICAL With sensorsd on top of that, monitoring is a breeze. I think after bio I know what I will do next ;-) -- Joao Barros ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Hot-Swapping hard drives on Dell PowerEdge 2850 running FBSD 5.5-PRE
On Mon, Jun 26, 2006 at 11:32:18AM +0100, Alex Zbyslaw wrote: > Joao Barros wrote: > > > > >Contrary to what megarc says, it's -h not -? for help. > >Hope this helps. > > > ? is special to the shell so you need to escape it with a \. > > h does not produce the same output for me - it's just treated as an > unknown command. It also doesn't work as a param to commands, but help > seems to. Yeah, megarc does have possibly the worst interface I've seen in quite a long time. Allegedly the Linux monitoring tools for these adapters will work with 6.1, although I haven't tried this myself yet. I've attached a couple of scripts I use for monitoring amr(4) adapters. One (amr-check-status) is run hourly from crontab to alert of any change in drive or array status. The other (700.amr-status) is a daily periodic script. They could be extended to grovel through the megarc output to figure out what adapters you have rather than just hardcoding the unit numbers, but that seemed like more pain that it was worth (and I don't have any machines with more than one adapter!) BTW, the '^M' in the amr-check-status script is a real Control-M character, and there are embedded tabs in a couple of the egrep patterns, in case those get lost in transit. Cheers, Scott -- === Scott Mitchell | PGP Key ID | "Eagles may soar, but weasels Cambridge, England | 0x54B171B9 | don't get sucked into jet engines" scott at fishballoon.org | 0xAA775B8B | -- Anon #!/bin/sh -f # # Check status of RAID volumes on amr(4) controllers using the LSI MegaRC # utility. If any logical drive has a status other than OPTIMAL, or any # physical disks has a status other that ONLINE, display the full status # for the adapter. If more than one adapter exists, add additional unit # numbers to $adapters. # # $Id$ # adapters="0" for adapter in $adapters; do status=`/usr/local/sbin/megarc -ldinfo -a${adapter} -Lall -nolog |\ /usr/bin/sed '1,$s/ //' |\ /usr/bin/sed '1,/Information Of Logical Drive/d'` ||\ echo "Failed to get RAID status for AMR adapter ${adapter}" echo "${status}" |\ /usr/bin/egrep '^ Logical Drive : .*: Status: .*$' |\ /usr/bin/egrep -qv 'OPTIMAL$' drives=$? echo "${status}" |\ /usr/bin/egrep '^ [0-9]+' |\ /usr/bin/egrep -qv 'ONLINE$' disks=$? if [ ${drives} -ne 1 -o ${disks} -ne 1 ]; then echo "" echo "AMR RAID status (adapter ${adapter}):" echo "${status}" fi done #!/bin/sh -f # # Display status of RAID volumes on amr(4) controllers using the LSI MegaRC # utility. If more than one adapter exists, add additional unit numbers to # $adapters. # # $Id$ # # If there is a global system configuration file, suck it in. # if [ -r /etc/defaults/periodic.conf ]; then . /etc/defaults/periodic.conf source_periodic_confs fi adapters="0" rc=0 case "${daily_amr_status_enable:-YES}" in [Nn][Oo]) ;; *) for adapter in $adapters; do echo "" echo "AMR RAID status (adapter ${adapter}):" /usr/local/sbin/megarc -ldinfo -a${adapter} -Lall -nolog |\ sed '1,/Information Of Logical Drive/d' || rc=$? done ;; esac exit "$rc" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Hot-Swapping hard drives on Dell PowerEdge 2850 running FBSD 5.5-PRE
On 6/26/06, Alex Zbyslaw <[EMAIL PROTECTED]> wrote: Joao Barros wrote: > > Contrary to what megarc says, it's -h not -? for help. > Hope this helps. > ? is special to the shell so you need to escape it with a \. h does not produce the same output for me - it's just treated as an unknown command. It also doesn't work as a param to commands, but help seems to. I stand corrected! -- Joao Barros ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Hot-Swapping hard drives on Dell PowerEdge 2850 running FBSD 5.5-PRE
Joao Barros wrote: Contrary to what megarc says, it's -h not -? for help. Hope this helps. ? is special to the shell so you need to escape it with a \. h does not produce the same output for me - it's just treated as an unknown command. It also doesn't work as a param to commands, but help seems to. --Alex ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Hot-Swapping hard drives on Dell PowerEdge 2850 running FBSD 5.5-PRE
Alex Franks wrote: Sadly, amrstat-20060414 doesn't build on FBSD 6.0 or earlier (or so says the error msg I get when trying to build it). I've got megarc installed but have no idea how to use it and no man page was included with the port. Anyone more familiar with this utility? Type # megarc \? to get a usage synopsis. Then e.g. # megarc -dispCfg \? for specific command usage and explanation. Truly hideous, but at least it's there. --Alex ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Hot-Swapping hard drives on Dell PowerEdge 2850 running FBSD 5.5-PRE
On 6/24/06, Alex Franks <[EMAIL PROTECTED]> wrote: On 6/23/06, Joao Barros <[EMAIL PROTECTED]> wrote: > On 6/23/06, Alex Franks <[EMAIL PROTECTED]> wrote: > > The controller is a Perc 4e/Di as assumed, and I'm still a little > > unsure as to whether the 2 drives that shipped with the machine are > > currently set up in a RAID array. The current filesystem is mounted on > > /dev/amrd0s1[a-f] and I would expect to find the new drives named > > similarly after using some useful utility that I'm unaware of. Any > > thoughts? > > > > Thanks again. > > Alex > > Try amrstat from ports which will show you something like this: > > Logical volume 0optimal (101.60 GB, RAID5) > Physical drive 0:0 online > Physical drive 0:1 online > Physical drive 1:0 online > Physical drive 1:2 online > Physical drive 1:4 hotspare > > > -- > Joao Barros > Sadly, amrstat-20060414 doesn't build on FBSD 6.0 or earlier (or so says the error msg I get when trying to build it). I've got megarc installed but have no idea how to use it and no man page was included with the port. Anyone more familiar with this utility? Alex For what you need to know this should be enough: #megarc -dispCfg -a0 ** MEGARC MegaRAID Configuration Utility(FreeBSD)-1.04(03-02-2005) By LSI Logic Corp.,USA ** [Note: For SATA-2, 4 and 6 channel controllers, please specify Ch=0 Id=0..15 for specifying physical drive(Ch=channel, Id=Target)] Type ? as command line arg for help Finding Devices On Each MegaRAID Adapter... Scanning Ha 0, Chnl 1 Target 15 ** Existing Logical Drive Information By LSI Logic Corp.,USA ** [Note: For SATA-2, 4 and 6 channel controllers, please specify Ch=0 Id=0..15 for specifying physical drive(Ch=channel, Id=Target)] Logical Drive : 0( Adapter: 0 ): Status: OPTIMAL --- SpanDepth :01 RaidLevel: 5 RdAhead : Adaptive Cache: DirectIo StripSz :064KB Stripes : 4 WrPolicy: WriteThru Logical Drive 0 : SpanLevel_0 Disks Chnl Target StartBlock Blocks Physical Target Status -- -- -- -- 0 010x 0x043bc000 ONLINE 0 000x 0x043bc000 ONLINE 1 000x 0x043bc000 ONLINE 1 020x 0x043bc000 ONLINE HotSpare Disk at Channel No. 1 and ID No. 4 Contrary to what megarc says, it's -h not -? for help. Hope this helps. -- Joao Barros ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Hot-Swapping hard drives on Dell PowerEdge 2850 running FBSD 5.5-PRE
On 6/23/06, Joao Barros <[EMAIL PROTECTED]> wrote: On 6/23/06, Alex Franks <[EMAIL PROTECTED]> wrote: > The controller is a Perc 4e/Di as assumed, and I'm still a little > unsure as to whether the 2 drives that shipped with the machine are > currently set up in a RAID array. The current filesystem is mounted on > /dev/amrd0s1[a-f] and I would expect to find the new drives named > similarly after using some useful utility that I'm unaware of. Any > thoughts? > > Thanks again. > Alex Try amrstat from ports which will show you something like this: Logical volume 0optimal (101.60 GB, RAID5) Physical drive 0:0 online Physical drive 0:1 online Physical drive 1:0 online Physical drive 1:2 online Physical drive 1:4 hotspare -- Joao Barros Sadly, amrstat-20060414 doesn't build on FBSD 6.0 or earlier (or so says the error msg I get when trying to build it). I've got megarc installed but have no idea how to use it and no man page was included with the port. Anyone more familiar with this utility? Alex ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Hot-Swapping hard drives on Dell PowerEdge 2850 running FBSD 5.5-PRE
On 6/23/06, Alex Franks <[EMAIL PROTECTED]> wrote: The controller is a Perc 4e/Di as assumed, and I'm still a little unsure as to whether the 2 drives that shipped with the machine are currently set up in a RAID array. The current filesystem is mounted on /dev/amrd0s1[a-f] and I would expect to find the new drives named similarly after using some useful utility that I'm unaware of. Any thoughts? Thanks again. Alex Try amrstat from ports which will show you something like this: Logical volume 0optimal (101.60 GB, RAID5) Physical drive 0:0 online Physical drive 0:1 online Physical drive 1:0 online Physical drive 1:2 online Physical drive 1:4 hotspare -- Joao Barros ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Hot-Swapping hard drives on Dell PowerEdge 2850 running FBSD 5.5-PRE
On 6/23/06, Alex Zbyslaw <[EMAIL PROTECTED]> wrote: Alex Franks wrote: > Hello all, > > I'm getting ready to install 2 identical drives into the available > drive bays in my 2850. However, it would be highly preferable that > this machine NOT be shut down in order to install these drives. I know > from looking at the docs that these drive bays are hot-swappable, but > I'd like to know before I attempt this that someone else out there has > successfully performed a hot-swap or hot-install of drives on a 2850 > or comparable Dell PowerEdge running FreeBSD. RAID-1 I assume and PERC 4e/Di. Yes, did it when testing fresh machines. The controller BIOS has a setting for how much resource to allocate to the recovery of the inserted drive (0?-100%); the lower you set it the slower it will recover the disk, but the higher you set it the slower the machine will go. I think we went for 70% as the machine never gets *that* heavy disk usage. If the machine isn't live yet, then just do a basic install from CD (<30 mins) and then try the hotswap test. That way you can't lose any data even if something goes wrong. My advice with these machines is never to swap any disk with the machine off - the controller gets confused. Stick with hotswapping and it seems fine. I think you can set up an auto-spare so that if a disk fails the array is rebuilt automatically using the spare. Use sysutils/megarc for monitoring the RAID from BSD. --Alex Thanks for the input, The drives hot-plugged just fine. The machine was live when I plugged the disks and still is right now. I'm trying to avoid another trip to the colo today to (safely) reboot by finding out if/where the drives are loaded at the hardware level and how I can go about mounting them to logical partitions. At this point, I'm not as concerned about getting the 2 drives into RAID1 since they're going to be used for backup purposes and will not be used in a high volume capacity (for now), and since this would almost certainly require a reboot. I *know* rebooting is preferable, but I'm experimenting here, and uptime is pretty important since the server is the main mysql box for a handful of websites. The controller is a Perc 4e/Di as assumed, and I'm still a little unsure as to whether the 2 drives that shipped with the machine are currently set up in a RAID array. The current filesystem is mounted on /dev/amrd0s1[a-f] and I would expect to find the new drives named similarly after using some useful utility that I'm unaware of. Any thoughts? Thanks again. Alex ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Hot-Swapping hard drives on Dell PowerEdge 2850 running FBSD 5.5-PRE
Alex Franks wrote: Hello all, I'm getting ready to install 2 identical drives into the available drive bays in my 2850. However, it would be highly preferable that this machine NOT be shut down in order to install these drives. I know from looking at the docs that these drive bays are hot-swappable, but I'd like to know before I attempt this that someone else out there has successfully performed a hot-swap or hot-install of drives on a 2850 or comparable Dell PowerEdge running FreeBSD. RAID-1 I assume and PERC 4e/Di. Yes, did it when testing fresh machines. The controller BIOS has a setting for how much resource to allocate to the recovery of the inserted drive (0?-100%); the lower you set it the slower it will recover the disk, but the higher you set it the slower the machine will go. I think we went for 70% as the machine never gets *that* heavy disk usage. If the machine isn't live yet, then just do a basic install from CD (<30 mins) and then try the hotswap test. That way you can't lose any data even if something goes wrong. My advice with these machines is never to swap any disk with the machine off - the controller gets confused. Stick with hotswapping and it seems fine. I think you can set up an auto-spare so that if a disk fails the array is rebuilt automatically using the spare. Use sysutils/megarc for monitoring the RAID from BSD. --Alex ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Hot-Swapping hard drives on Dell PowerEdge 2850 running FBSD 5.5-PRE
On Thu, Jun 22, 2006 at 11:06:17AM -0700, Alex Franks wrote: > Hello all, > > I'm getting ready to install 2 identical drives into the available > drive bays in my 2850. However, it would be highly preferable that > this machine NOT be shut down in order to install these drives. I know > from looking at the docs that these drive bays are hot-swappable, but > I'd like to know before I attempt this that someone else out there has > successfully performed a hot-swap or hot-install of drives on a 2850 > or comparable Dell PowerEdge running FreeBSD. I've swapped drives on an 1850 with no problems - the drives were in a RAID-1 configuration and the OS didn't even notice that anything had happened. If you're not using hardware RAID I guess a "camcontrol rescan" or something similar might be needed for the new drives to be recognised? Cheers, Scott -- === Scott Mitchell | PGP Key ID | "Eagles may soar, but weasels Cambridge, England | 0x54B171B9 | don't get sucked into jet engines" scott at fishballoon.org | 0xAA775B8B | -- Anon ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"