Last active
March 31, 2024 08:32
-
-
Save CMCDragonkai/f9c9cf19b92bec90da06d8ee2bcf0076 to your computer and use it in GitHub Desktop.
Revisions
-
CMCDragonkai revised this gist
Dec 16, 2020 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,12 +14,19 @@ zpool add rpool "$hdd-part1" After adding a disk to the pool, you may find disk corruptions. ``` zpool status -v ``` You can try to restore the corrupted files or just delete them if they don't matter. Then you have to try to scrub the pool: ``` # this will try to repair everything (do this after deletion or restoration) zpool scrub rpool # when all errors are finally repaired or dropped, do this to clear the state of the pool zpool clear rpool ``` -
CMCDragonkai revised this gist
Dec 15, 2020 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,8 @@ When adding a new disk to ZFS RAID-0, you must ensure that the disk has the same storage size as the other disks. You will need the `gptfdisk` package to use `sgdisk`. ```sh hdd='/dev/disk/by-id/<DISKNAME>' zpool labelclear -f "$hdd" || true -
CMCDragonkai created this gist
Dec 15, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ # Adding a new disk ZFS RAID-0 When adding a new disk to ZFS RAID-0, you must ensure that the disk has the same storage size as the other disks. ```sh hdd='/dev/disk/by-id/<DISKNAME>' zpool labelclear -f "$hdd" || true sgdisk --zap-all "$hdd" sgdisk -n 1:0:0 -t 1:8300 -c 1:"Main Data" "$hdd" zpool add rpool "$hdd-part1" ``` After adding a disk to the pool, you may find disk corruptions. You can try to restore the file or just delete it. Then you have to try to scrub the pool: ``` zpool scrub rpool zpool clear rpool ``` * https://docs.oracle.com/cd/E18752_01/html/819-5461/gbbwl.html * http://unixetc.co.uk/2012/01/22/zfs-corruption-persists-in-unlinked-files/