« Hardware/Perc/MegaCli/BriefCommands » : différence entre les versions
(Page créée avec « = View information about the RAID adapter = == For checking the firmware version, battery back-up unit presence, installed cache memory and the capabilities of the adapter =... ») |
Aucun résumé des modifications |
||
| Ligne 1 : | Ligne 1 : | ||
= View information about the RAID adapter = | = View information about the RAID adapter = | ||
For checking the firmware version, battery back-up unit presence, installed cache memory and the capabilities of the adapter | |||
# MegaCli64 -AdpAllInfo -aAll | # MegaCli64 -AdpAllInfo -aAll | ||
= View information about the battery backup-up unit state = | |||
# MegaCli64 -AdpBbuCmd -aAll | # MegaCli64 -AdpBbuCmd -aAll | ||
= View information about virtual disks = | |||
Useful for checking RAID level, stripe size, cache policy and RAID state: | Useful for checking RAID level, stripe size, cache policy and RAID state: | ||
| Ligne 15 : | Ligne 15 : | ||
# MegaCli64 -LDInfo -Lall -aALL | # MegaCli64 -LDInfo -Lall -aALL | ||
= View information about physical drives = | |||
# MegaCli64 -PDList -aALL | # MegaCli64 -PDList -aALL | ||
| Ligne 42 : | Ligne 42 : | ||
You could use the above commands to run patrol read in off-peak times. | You could use the above commands to run patrol read in off-peak times. | ||
Migrate from one RAID level to another | |||
= Migrate from one RAID level to another = | |||
In this example, I migrate the virtual disk 0 from RAID level 6 to RAID 5, so that the disk space of one additional disk becomes available. The second command is used to make Linux detect the new size of the RAID disk. | In this example, I migrate the virtual disk 0 from RAID level 6 to RAID 5, so that the disk space of one additional disk becomes available. The second command is used to make Linux detect the new size of the RAID disk. | ||
| Ligne 49 : | Ligne 50 : | ||
# echo 1 > /sys/block/sda/device/rescan | # echo 1 > /sys/block/sda/device/rescan | ||
= Create a new RAID 5 virtual disk from a set of new hard drives = | |||
First we need to now the enclosure and slot number of the hard drives we want to use for the new RAID disk. You can find them out by the first command. Then I add a virtual disk using RAID level 5, followed by the list of drives I want to use, specified by enclosure:slot syntax. | First we need to now the enclosure and slot number of the hard drives we want to use for the new RAID disk. You can find them out by the first command. Then I add a virtual disk using RAID level 5, followed by the list of drives I want to use, specified by enclosure:slot syntax. | ||
| Ligne 56 : | Ligne 57 : | ||
# MegaCli64 -CfgLdAdd -r5'[252:5,252:6,252:7]' -a0 | # MegaCli64 -CfgLdAdd -r5'[252:5,252:6,252:7]' -a0 | ||
= View reconstruction progress = | |||
When reconstructing a RAID array, you can check its progress with this command. | When reconstructing a RAID array, you can check its progress with this command. | ||
| Ligne 63 : | Ligne 64 : | ||
{{Admon/tip|replace L0 by L1 for the second virtual disk, and so on}} | {{Admon/tip|replace L0 by L1 for the second virtual disk, and so on}} | ||
= Configure write-cache to be disabled when battery is broken = | |||
# MegaCli64 -LDSetProp NoCachedBadBBU -LALL -aALL | # MegaCli64 -LDSetProp NoCachedBadBBU -LALL -aALL | ||
= Change physical disk cache policy = | |||
If your system is not connected to a UPS, you should disable the physical disk cache in order to prevent data loss. | If your system is not connected to a UPS, you should disable the physical disk cache in order to prevent data loss. | ||
Dernière version du 20 juillet 2012 à 08:45
View information about the RAID adapter
For checking the firmware version, battery back-up unit presence, installed cache memory and the capabilities of the adapter
# MegaCli64 -AdpAllInfo -aAll
View information about the battery backup-up unit state
# MegaCli64 -AdpBbuCmd -aAll
View information about virtual disks
Useful for checking RAID level, stripe size, cache policy and RAID state:
# MegaCli64 -LDInfo -Lall -aALL
View information about physical drives
# MegaCli64 -PDList -aALL
Patrol read
Patrol read is a feature which tries to discover disk error before it is too late and data is lost. By default it is done automatically (with a delay of 168 hours between different patrol reads) and will take up to 30% of IO resources.
To see information about the patrol read state and the delay between patrol read
# MegaCli64 -AdpPR -Info -aALL
To find out the current patrol read rate
# MegaCli64 -AdpGetProp PatrolReadRate -aALL
To reduce patrol read resource usage to 2% in order to minimize the performance impact
# MegaCli64 -AdpSetProp PatrolReadRate 2 -aALL
To disable automatic patrol read
# MegaCli64 -AdpPR -Dsbl -aALL
To start a manual patrol read scan
# MegaCli64 -AdpPR -Start -aALL
To stop a patrol read scan:
# MegaCli64 -AdpPR -Stop -aALL
You could use the above commands to run patrol read in off-peak times.
Migrate from one RAID level to another
In this example, I migrate the virtual disk 0 from RAID level 6 to RAID 5, so that the disk space of one additional disk becomes available. The second command is used to make Linux detect the new size of the RAID disk.
# /usr/local/sbin/MegaCli64 -LDRecon -Start -r5 -L0 -a0 # echo 1 > /sys/block/sda/device/rescan
Create a new RAID 5 virtual disk from a set of new hard drives
First we need to now the enclosure and slot number of the hard drives we want to use for the new RAID disk. You can find them out by the first command. Then I add a virtual disk using RAID level 5, followed by the list of drives I want to use, specified by enclosure:slot syntax.
# MegaCli64 -PDList -aALL | egrep 'Adapter|Enclosure|Slot|Inquiry' # MegaCli64 -CfgLdAdd -r5'[252:5,252:6,252:7]' -a0
View reconstruction progress
When reconstructing a RAID array, you can check its progress with this command.
# MegaCli64 -LDRecon ShowProg L0 -a0
Configure write-cache to be disabled when battery is broken
# MegaCli64 -LDSetProp NoCachedBadBBU -LALL -aALL
Change physical disk cache policy
If your system is not connected to a UPS, you should disable the physical disk cache in order to prevent data loss.
# MegaCli -LDGetProp -DskCache -LAll -aALL
To enable it (only do this if you have a UPS and redundant power supplies):
# MegaCli -LDGetProp -DskCache -LAll -aALL