Some commands:


MegaCli -AdpAllinfo -aALL

MegaCli -AdpEventLog -GetEvents -f eventlog.txt -aAll


How do I replace a failed drive:


# Show Drive Information

./storcli /c0/eall/sall show


# Set the failed drive

./storcli /c0/e245/s4 set offline


# Set the failed drive as missing

./storcli /c0/e245/s4 set missing


# Spindown the failed drive

./storcli /c0/eall/s4 spindown

./storcli /cx[/ex]/sx start locate

./storcli /cx[/ex]/sx stop locate


# Show rebuild

./storcli /c0/eall/sall show rebuild


spare drive


# Add drive hotsparedrive global

./storcli /cx[/ex]/sx add hotsparedrive


# sample

./storcli /c0/e32/s8 set good force

./storcli /c0/e32/s8 add hotsparedrive


alarm control


# MegaCli64 -AdpSetProp <AlarmEnbl | AlarmDsbl | AlarmSilence> -aN


# storcli /cx set alarm=<on | off | silence>


buscar serial number

# ./storcli /c0/eall/sall show all | egrep 'Device attributes|SN = '


converter VD de RAID0 para RAID1

# ./megacli -ldrecon -start -r1 -add -physdrv[Enc:Slot] -l???VD??? -aAdaptadorID

# ./megacli -ldrecon -start -r1 -add -physdrv[252:1] -l0 -a0

# Como remover um disco de um pool e colocar para ser RAID1 de um RAID0

# ./megaclisas-status

# ./storcli /c0/eall/sall show

# ./storcli /c0/e252/s1 set offline

# ./storcli /c0/e252/s1 set missing

# ./storcli /c0/eall/sall show

# ./megacli -ldrecon -start -r1 -add -physdrv[252:1] -l0 -a0

# ./megaclisas-status


Copia da tabela de partição

sfdisk -d /dev/sdc | sfdisk /dev/sdb

mdadm (raid via software)

# mdadm --detail /dev/md127
# mdadm --stop --scan
# mdadm --assemble --scan

mdadm (raid via software) - replace

# mdadm --query --detail /dev/md2
# cat /proc/mdstat
## Remove the failing disk from the RAID array
# mdadm --manage /dev/md2 --remove /dev/sdb4
# cat /proc/mdstat
## Shut down the machine and replace the disk
## Create partition raid ;)
## Add the new disk to the RAID array
# mdadm --manage /dev/md2 --add /dev/sdb4
# cat /proc/mdstat
# mdadm --query --detail /dev/md2

Links interessantes



Download