Re: Trouble using smartctl with LSI megaraid controller
mathog <[email protected]> Mon, 13 Feb 2017 09:59:20 -0800
| Newsgroups | gmane.linux.utilities.smartmontools |
|---|---|
| Message-ID | <[email protected]> |
On 11-Feb-2017 12:48, [email protected] wrote: > A few questions.... > 1. Does anyone know the correct syntax to get it working in the > smartd.conf > file? Sorry, no. > 2. There are two partitions in this system /dev/sda and /dev/sdb. How > do I > know which drive Id (DID) belongs to which partition and does it matter > if > I assign a physical drive to the incorrect partition? Get the "megacli" program and install it. Then you can run things like this: SNAME=`hostname -s` NOW=`date` OFILE=/root/$SNAME.megaraid.info echo "Megaraid information for $SNAME collected $NOW" > $OFILE echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" >> $OFILE echo "General Information" >> $OFILE megacli -AdpAllInfo -aAll | tr -d '\r' >> $OFILE echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" >> $OFILE echo "Battery backup" >> $OFILE megacli -AdpBbuCmd -aAll | tr -d '\r'>> $OFILE echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" >> $OFILE echo "Virtual disks" >> $OFILE megacli -LDInfo -Lall -aALL | tr -d '\r'>> $OFILE echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" >> $OFILE echo "Physical drives" >> $OFILE megacli -PDList -aALL | tr -d '\r'>> $OFILE echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" >> $OFILE echo "Patrol read" >> $OFILE megacli -AdpPR -Info -aALL | tr -d '\r'>> $OFILE echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" >> $OFILE echo "DONE" >> $OFILE > 3. Is there a way to check all the drives on a single partition at once > instead of having to check them individually with the sat+megaraid,N > syntax? There are 20 physical drives on this system. You mean with one "test all disks" smartctl command? No, I don't think that is possible. You can certainly start all of the tests sequentially with no delay, which is pretty much the same thing. Then wait however long is necessary for that disk type and read back all the results. In theory. For some reason my test script does them sequentially - I may have been worried about what the RAID would do if all the disks were busy self testing at the same time. Doing them sequentially in a script (with or without delays) isn't a big deal, something along the lines of: /usr/sbin/smartctl -t long /dev/sda -d sat+megaraid,0 sleep 10300 logger "Done smartctl -t long /dev/sda -d sat+megaraid,0" /usr/sbin/smartctl -t long /dev/sda -d sat+megaraid,1 sleep 10300 logger "Done smartctl -t long /dev/sda -d sat+megaraid,1" etc. then read all the results. Use a loop if you don't want to write them all out. It would also be fine to read the result for a disk immediately after each long test completes. > 4. Once I enable smartctl on the command line for a drive is it on > permanently or does it need to be enabled through the smartd.conf file? Once enabled it should stay on until the system reboots. That command changes a state which is stored on the drive. The state will not survive a power cycle. Regards, David Mathog [email protected] Manager, Sequence Analysis Facility, Biology Division, Caltech ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot