From 21419e9f2c9ed2d7c0aa709540ee289f52543061 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Sun, 19 May 2024 14:37:46 -0700 Subject: [PATCH] Document most recent NAS disk replacements. --- barbarian/DISKSHELFMAP.md | 5 +++-- barbarian/README.md | 24 +++++++++++++++++------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/barbarian/DISKSHELFMAP.md b/barbarian/DISKSHELFMAP.md index 851ce83..ae4e731 100644 --- a/barbarian/DISKSHELFMAP.md +++ b/barbarian/DISKSHELFMAP.md @@ -4,7 +4,7 @@ Each cell contains the serial number for the drive in the mapped bay. | | X1 | X2 | X3 | X4 | |:--:|:---------:|:--------:|:--------:|:--------:| -| Y1 | VJGPS30X | VK0ZD6ZY | VJG282NX | VJG2PVRX | +| Y1 | VJGPS30X | VK0ZD6ZY | VKH22XPX | VJG2PVRX | | Y2 | VJGR6TNX | 2EG14YNJ | VJGJVTZX | VJG1H9UX | | Y3 | VJGJUWNX | 2EGXD27V | VJGJAS1X | VJG2UTUX | | Y4 | VJGRGD2X | 2EGL8AVV | 2EKA903X | VJGRRG9X | @@ -53,7 +53,8 @@ https://docs.oracle.com/cd/E19253-01/819-5461/gazgd/index.html # Update Log **Most recent first** - +- *2024/04/16*: Replaced VJG1H9UX with 2EKA92XX at Y2/X4 +- *2024/04/07*: Replaced VJG282NX with VKH22XPX at Y1/X3 - *2024/03/12*: Replaced VLKXPS1V with VKH40L6X at Y6/X3 - *2024/02/28*: Replaced 2EKA92XX with VLKXPS1V at Y6/X3 - *2024/02/27*: Replaced VJG2T4YX with VJG282NX at Y2/X3 \ No newline at end of file diff --git a/barbarian/README.md b/barbarian/README.md index e59a585..2e320fc 100644 --- a/barbarian/README.md +++ b/barbarian/README.md @@ -2,13 +2,23 @@ I have 2 pools, one for "Media" and one for everything else. All disks are 8 TB HGST/Hitachi drives with a sector size of 4096B. All pools use vdevs of 3 drives in RAIDZ1. ## Replace a failing disk -1. Get the disknum (like `da4`), either in the web UI or with the ~/disklist.pl script, for the disk that needs to be replaced. -2. Refer to the [Physical Disk Locations](#physical-disk-locations-ds4243) chart to determine which shelf slot the disk is in. Remove the disk. -3. Insert the new disk and wait 60 seconds for it to be detected. It may not show up in the web UI. -4. Check the sector size of the new disk with `smartctl -a /dev/ | grep block`. If `Logical block size` is `512 bytes` (or anything other than `4096 bytes`), then the disk needs to be reformatted. -5. Reformat the disk as described under [Convert a 512B-sector disk](#convert-a-512b-sector-disk-to-4096b-sectors). This will take several hours. -6. Begin resilvering the pool with the new disk. Navigate to [Storage -> Pools](https://nas.jafner.net/ui/storage/pools). Click the gear icon in the top-right of the affected pool and click "Status". Find the missing disk. It should look like `/dev/gptid/...` with the status "REMOVED". Click the triple-dot icon on the right and select "Replace". Select the replacement disk, check the box for "Force", and click `REPLACE DISK` to begin resilvering. -7. The scanning and resilvering will take several hours. +1. Get the serial number of the drive. If you can see the part-uuid in `zpool status` (e.g. `44ae3ae0-e8f9-4dbc-95ba-e64f63ab7460`), you can get the serial number via: + +``` +id=44ae3ae0-e8f9-4dbc-95ba-e64f63ab7460 +label=$(ls -l /dev/disk/by-partuuid | grep $id | cut -d' ' -f 11 | cut -d'/' -f 3 | sed 's/^/\/dev\//') +serial=$(sudo smartctl -a $label | grep Serial | tr -s ' ' | cut -d' ' -f 3) +echo "$id -> $label -> $serial" +``` + +2. Offline and remove the failing disk. Refer to the [Physical Disk Locations](#physical-disk-locations-ds4243) chart to determine which shelf slot the disk is in. Remove the disk. Run `zpool offline [pool] [disk]` +3. Insert the new disk and wait 60 seconds for it to be detected. +4. Wipe the new disk. Find the new disk on the disks page, expand it, and run a quick wipe. +5. Replace the removed disk with the new disk. On the devices page for the affected pool, click the removed drive. Then hit Replace from the Disk Info card, find the new drive in the drop-down, and run begin the replacement operation. + + +- You can check the sector size of the new disk with `smartctl -a /dev/ | grep block`. If `Logical block size` is `512 bytes` (or anything other than `4096 bytes`), then the disk needs to be reformatted. Reformat the disk as described under [Convert a 512B-sector disk](#convert-a-512b-sector-disk-to-4096b-sectors). This will take several hours. + ## Convert a 512B-sector disk to 4096B sectors 1. Get the disknum (like `da4`), either in the web UI or with the ~/disklist.pl script, for the disk that needs to be replaced.