Limpiar los discos (tener cuidado)
for t in {b..z}
do
wipefs -af /dev/sd${t}
done
Instalar utilitarios
apt install -y zfsutils-linux
Crear el pool
zpool create data raidz /dev/sdb /dev/sdc /dev/sdd /dev/sde raidz /dev/sdf /dev/sdg /dev/sdh /dev/sdi raidz /dev/sdj /dev/sdk /dev/sdl /dev/sdm
o
zpool create data raidz /dev/sdb /dev/sdc /dev/sdd /dev/sde
zpool add data raidz /dev/sdf /dev/sdg /dev/sdh /dev/sdi
zpool add data raidz /dev/sdj /dev/sdk /dev/sdl /dev/sdm
Verificar el pool
zpool status
pool: share
state: DEGRADED
status: One or more devices are faulted in response to persistent errors.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Replace the faulted device, or use 'zpool clear' to mark the device
repaired.
scan: none requested
config:
NAME STATE READ WRITE CKSUM
share DEGRADED 0 0 0
raidz1-0 ONLINE 0 0 0
sdb ONLINE 0 0 0
sdc ONLINE 0 0 0
sdd ONLINE 0 0 0
sde ONLINE 0 0 0
sdf FAULTED 3 0 0 too many errors
Poner el disco fuera de servicio
zpool offline share sdf
Comprobar
pool: share
state: DEGRADED
status: One or more devices are faulted in response to persistent errors.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Replace the faulted device, or use 'zpool clear' to mark the device
repaired.
scan: none requested
config:
NAME STATE READ WRITE CKSUM
share DEGRADED 0 0 0
raidz1-0 ONLINE 0 0 0
sdb ONLINE 0 0 0
sdc ONLINE 0 0 0
sdd ONLINE 0 0 0
sde ONLINE 0 0 0
sdf OFFLINE 3 0 0
Eliminar el disco del subsistema SCSI
echo 1 | sudo tee /sys/block/sdf/device/delete
Colocar el nuevo disco
Adicionarlo al pool
zpool replace share /dev/sdf
Forzar el escaneo de nuevos discos
echo "- - -" > /sys/class/scsi_host/host0/scan
echo "- - -" > /sys/class/scsi_host/host1/scan
echo "- - -" > /sys/class/scsi_host/host2/scan
echo "- - -" > /sys/class/scsi_host/host3/scan