c4cbf620837c1e5067062c4ffebdee9186d09cc1
compute/storage.md
| ... | ... | @@ -1,6 +1,7 @@ |
| 1 | 1 | <!-- TITLE: Storage Stuff --> |
| 2 | 2 | <!-- SUBTITLE: The z in zfs stands for not losing your data --> |
| 3 | 3 | |
| 4 | +# ZFS |
|
| 4 | 5 | ## Replace a zpool with minimal downtime |
| 5 | 6 | ### Create new pool |
| 6 | 7 | ``` |
| ... | ... | @@ -29,4 +30,16 @@ zpool export livepool.old |
| 29 | 30 | zpool export newpool |
| 30 | 31 | zpool import newpool livepool |
| 31 | 32 | ``` |
| 32 | -Should be good to go to restart the apps. Destroy any snapshots when you're ready. |
|
| ... | ... | \ No newline at end of file |
| 0 | +Should be good to go to restart the apps. Destroy any snapshots when you're ready. |
|
| 1 | + |
|
| 2 | +# Hardware |
|
| 3 | +## Find all disks in a SAS expander |
|
| 4 | + |
|
| 5 | +``` |
|
| 6 | +# grep <expander ID> /sys/class/sas_device/expander*/sas_address |
|
| 7 | +/sys/class/sas_device/expander-10:10/sas_address:0x50050cc10d2f2c3f |
|
| 8 | +# cd /sys/class/sas_device/expander-10:10 |
|
| 9 | +# pwd -P |
|
| 10 | +/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 |
|
| 11 | +# 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}' |
|
| 12 | +``` |
|
| ... | ... | \ No newline at end of file |