Outils pour utilisateurs

Outils du site


hotswapremovedisk:howto_hotswap_remove_disk

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

hotswapremovedisk:howto_hotswap_remove_disk [2018/07/31 10:09] – créée ronanhotswapremovedisk: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 +sfdisk -d /dev/sdb > partitions.sdb 
 +</code>
 ==== 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 +mdadm -f /dev/md0 /dev/sdb 
 +</code>
 ==== 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 /proc/scsi/scsi +cat /proc/scsi/scsi 
 +</code>
 ==== Remove the drive from the bus: ==== ==== Remove the drive from the bus: ====
- +<code bash> 
-  # echo "scsi remove-single-device 0 0 2 0" > /proc/scsi/scsi +echo "scsi remove-single-device 0 0 2 0" > /proc/scsi/scsi 
 +</code>
 ==== 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 /proc/scsi/scsi +cat /proc/scsi/scsi 
 +</code>
 ===== 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" > /proc/scsi/scsi +echo "scsi add-single-device 0 0 2 0" > /proc/scsi/scsi 
 +</code>
 ==== Restore partition table ==== ==== Restore partition table ====
- +<code bash> 
-  # sfdisk /dev/sdb < partitions.sdb +sfdisk /dev/sdb < partitions.sdb 
 +</code>
 ==== Add the drive to your array ==== ==== Add the drive to your array ====
- +<code bash> 
-  # mdadm -a /dev/md0 /dev/sdb +mdadm -a /dev/md0 /dev/sdb 
- +</code>
hotswapremovedisk/howto_hotswap_remove_disk.1533031769.txt.gz · Dernière modification : 2018/07/31 10:09 de ronan