site

files for beauhilton.com
git clone https://git.beauhilton.com/site.git
Log | Files | Refs

commit b94de31aa2f2066cef6bf587349d591f23c33e04
parent 559dff5fc9863e675000c857f7b70129d25b7719
Author: beau hilton <cbeauhilton@gmail.com>
Date:   Fri, 20 Oct 2023 11:48:59 -0500

update zfs post and site infra

Diffstat:
M.gitignore | 1+
M.pre-commit-config.yaml | 4++--
Mflake.nix | 8+++++++-
Mindex.json | 2+-
Msite/posts/add-zfs-mirror.md | 35+++++++++++++++++++++++++++++++----
5 files changed, 42 insertions(+), 8 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -2,3 +2,4 @@ build/ .devenv/* .soupault-cache nohup.out +.pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml @@ -1 +1 @@ -/nix/store/plgqrgap2ssswgpkiw6mrahj7msaz0z5-pre-commit-config.json -\ No newline at end of file +/nix/store/kc63pvhp5s750l6mqghg6g24k5ba4r2h-pre-commit-config.json +\ No newline at end of file diff --git a/flake.nix b/flake.nix @@ -60,7 +60,13 @@ name = "rsync-to-server"; description = "rsyncs the completed site to my server"; entry = '' - echo "hooooyo" + soupault && + cp build/atom.xml build/feed.xml && + rsync \ + -av \ + --rsync-path=openrsync \ + build/* \ + beau@beauhilton.com:/var/www/htdocs/www.beauhilton.com/ ''; }; }; diff --git a/index.json b/index.json @@ -5,7 +5,7 @@ "nav_path": [ "posts" ], - "excerpt": "tl;dr: zpool attach data /dev/disk/by-partlabel/zfs-3a1e459c75dc9b74 /dev/sda1. Adjust for your own pool and disks.", + "excerpt": "tl;dr: <code>zpool attach data /dev/disk/by-partlabel/zfs-3a1xx /dev/sdx0</code>. Adjust for your own pool and disks.", "date": "2023-10-22", "title": "How to add a mirror to a single ZFS disk" }, diff --git a/site/posts/add-zfs-mirror.md b/site/posts/add-zfs-mirror.md @@ -3,7 +3,7 @@ <time id="post-date">2023-10-22</time> <p id="post-excerpt"> -tl;dr: zpool attach data /dev/disk/by-partlabel/zfs-3a1e459c75dc9b74 /dev/sda1. Adjust for your own pool and disks. +tl;dr:&#x2005;<code>zpool&#x2005;attach&#x2005;data&#x2005;/dev/disk/by-partlabel/zfs-3a1xx&#x2005;/dev/sdx0</code>. Adjust for your own pool and disks. </p> @@ -33,6 +33,13 @@ Just plug it in. But how to specify which disks to use in the command? I saw several guides that just used `/dev/sdx`, but it didn't work. +I don't know what it is about my setup +that differs from the guides I found online +(if you have a hint, [lmk](beauhilton.com/contact)), +so YMMV, +but below is some of what I tried and what eventually worked, +mostly for my own reference. + In my setup, `/dev/sdb` was my existing drive and `/dev/sda` is the one I was trying to add (these names are determined at boot time @@ -105,9 +112,8 @@ zpool attach data /dev/disk/by-partlabel/zfs-3a1e459c75dc9b74 /dev/sda1 ## Great success -```sh -zpool status - +```conf +->> zpool status pool: data state: ONLINE status: One or more devices is currently being resilvered. The pool will @@ -126,3 +132,24 @@ config: errors: No known data errors ``` + +...and the next day, after resilvering completed +(and a reboot to make sure the disk came online): + +```conf +->> zpool status + pool: data + state: ONLINE + scan: resilvered 3.77T in 05:13:53 with 0 errors on Thu Oct 19 22:19:19 2023 +config: + + NAME STATE READ WRITE CKSUM + data ONLINE 0 0 0 + mirror-0 ONLINE 0 0 0 + zfs-3a1e459c75dc9b74 ONLINE 0 0 0 + zfs-e2937e0fc8ebe95a ONLINE 0 0 0 + +errors: No known data errors +``` + +(notice that what was `sda1` is now referred to by partlabel)