hotswapremovedisk:howto_hotswap_remove_disk
Différences
Ci-dessous, les différences entre deux révisions de la page.
hotswapremovedisk:howto_hotswap_remove_disk [2018/07/31 10:09] – créée ronan | hotswapremovedisk:howto_hotswap_remove_disk [2019/01/10 16:02] (Version actuelle) – rguyader | ||
---|---|---|---|
Ligne 2: | Ligne 2: | ||
==== backup partition table ==== | ==== backup partition table ==== | ||
- | + | <code bash> | |
- | # | + | sfdisk -d /dev/sdb > partitions.sdb |
+ | </ | ||
==== Mark faulty and remove the drive to replace from the array ==== | ==== Mark faulty and remove the drive to replace from the array ==== | ||
- | + | <code bash> | |
- | # | + | mdadm -f /dev/md0 /dev/sdb |
+ | </ | ||
==== Look up the Host, Channel, ID and Lun of the drive to replace, by looking in ==== | ==== Look up the Host, Channel, ID and Lun of the drive to replace, by looking in ==== | ||
- | + | <code bash> | |
- | # | + | cat / |
+ | </ | ||
==== Remove the drive from the bus: ==== | ==== Remove the drive from the bus: ==== | ||
- | + | <code bash> | |
- | # | + | echo "scsi remove-single-device 0 0 2 0" > / |
+ | </ | ||
==== Verify that the drive has been correctly removed, by looking in ==== | ==== Verify that the drive has been correctly removed, by looking in ==== | ||
- | + | <code bash> | |
- | # | + | cat / |
+ | </ | ||
===== Unplug the drive from your SCA bay, and insert a new drive ===== | ===== Unplug the drive from your SCA bay, and insert a new drive ===== | ||
==== (normally done by udev) Add the new drive to the bus ==== | ==== (normally done by udev) Add the new drive to the bus ==== | ||
- | + | <code bash> | |
- | # | + | echo "scsi add-single-device 0 0 2 0" > / |
+ | </ | ||
==== Restore partition table ==== | ==== Restore partition table ==== | ||
- | + | <code bash> | |
- | # | + | sfdisk /dev/sdb < partitions.sdb |
+ | </ | ||
==== Add the drive to your array ==== | ==== Add the drive to your array ==== | ||
- | + | <code bash> | |
- | # | + | mdadm -a /dev/md0 /dev/sdb |
- | + | </ |
hotswapremovedisk/howto_hotswap_remove_disk.1533031769.txt.gz · Dernière modification : 2018/07/31 10:09 de ronan