Storage One-Liners
Sun 16 June 2019Find new storage controllers and disks
$ for i in /sys/class/scsi_disk/*/device/rescan ; do echo '1' > "$i" ; done && for i in /sys/class/scsi_host/*/scan ; do echo "- - -" > "$i" ; done
Delete disk after it has been removed from service, also before it is removed (ohysical or virtual)
$ echo 1 > /sys/block/<BLOCK-DEVICE>/device/delete
Change UUID of ext[234] filesystem
$ tune2fs VOLUME -U $(uuidgen)