ZFS
Replace a zpool with minimal downtime
Create new pool
zpool create newpool raidz3 sdX sdY sdZ ....
Send the data
zfs snapshot livepool@1
zfs send -R livepool@1 | zfs receive -F newpool
Re-sync data that's changed since the initial snapshot
zfs snapshot livepool@2
zfs send -IR livepool@1 livepool@2 | zfs receive -F newpool
Repeat this step if it took longer than you want - increment the @ snapshot numbers each time.
Flip the pools
Shut down the apps. Check lsof and/or fuser to make sure nothing's using the FS. 'X' here is
zpool export livepool
zpool import livepool livepool.old
zpool export livepool.old
zpool export newpool
zpool import newpool livepool
Should be good to go to restart the apps. Destroy any snapshots when you're ready.
Hardware
Find all disks in a SAS expander
# grep <expander ID> /sys/class/sas_device/expander*/sas_address
/sys/class/sas_device/expander-10:10/sas_address:0x50050cc10d2f2c3f
# cd /sys/class/sas_device/expander-10:10
# pwd -P
/sys/devices/pci0000:80/0000:80:03.2/0000:b0:00.0/host10/port-10:0/expander-10:0/port-10:0:5/expander-10:10/sas_device/expander-10:10
# ls -d /sys/devices/pci0000:80/0000:80:03.2/0000:b0:00.0/host10/port-10:0/expander-10:0/port*/expander*/port*/end_device*/target*/*/block/* | awk -F/ '{print $NF}'
Find disk hardware path
# readlink -f /sys/block/<dev>/device
e.g.:
# for dev in $(zpool list -v -L tank | grep '^[[:space:]]*sd' | awk '{print $1}'); do readlink -f /sys/block/$dev/device; done | sort