migrating from proxmox to freebsd (part 08): disks
so i ironed out a few things. one, the default installer has some 4k option when creating a mirror for zroot. i guess the usb drives did not agree with that at all. i turned that option off so now they’re working a bit more normal. using 4k blocks was giving me all types of issues with the usb drives. currently this is what my pools look like:
pool: platters
state: ONLINE
scan: scrub repaired 0B in 00:00:01 with 0 errors on Sat May 24 02:49:49 2025
config:
NAME STATE READ WRITE CKSUM
platters ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gpt/01_SEAGATE_IRONWOLF-BRAK-p1 ONLINE 0 0 0
gpt/02_SEAGATE_BARRACUDA-E4AW-p1 ONLINE 0 0 0
errors: No known data errors
pool: zroot
state: ONLINE
scan: scrub repaired 0B in 00:00:59 with 0 errors on Sat May 24 02:39:04 2025
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gpt/B_PNY9D19-p2 ONLINE 0 0 0
gpt/F_PNYF865-p2 ONLINE 0 0 0
errors: No known data errors
a fresh install just uses the /dev devices for rpool (da0p2 or something like that). i took the time to set up the gpt labels for the zfs partitions so i know where something is to replace if it breaks. with zfs (on freebsd) it winds up being super easy because you can actually do this on the fly even to a live pool. as an example:
# gpart show da0
=> 40 242118576 da0 GPT (115G)
40 1024 1 freebsd-boot (512K)
1064 242117552 2 freebsd-zfs (115G)
# gpart modify -i 2 -l B_PNY9D19-p2 da0
# gpart show -l da0
=> 40 242118576 da0 GPT (115G)
40 1024 1 gptboot0 (512K)
1064 242117552 2 B_PNY9D19-p2 (115G)
# zpool set path=/dev/gpt/B_PNY9D19-p2 rpool da0p2
so a quick rundown of this. gpart show da0 shows the partitions on the drive. the partition being used for zfs is da0p2. notice that number under da0. the 2 is the number for the -i 2 (index) option. the gpart modify command modifies the partition label to something a little more user friendly on da0. the gpart show -l da0 command shows labels of the partitions on da0. and the zpool command tells zfs to change where it looks for the device. this will make you wind up with the nice little gpt/label format above.
so this one is a caveat. the /dev/gpt/<LABELNAME> will not show up. so if you ls /dev/gpt you won’t see these. zpool will though. so just do it blind and it will pick up the label. don’t worry about making a mistake. if you misspell the label or something then it will just revert back to the /dev/<DEVICE> and you can try again. once you set them (correctly) you’ll see the /dev/gpt/<LABELNAME> devices.
i have two internal usb ports located inside the case of the 1u. this is where i put the usb drives. this sort of sucks because replacing one means opening it, or, i can just add one to a rear port and replace it there until i have a planned shutdown. i needed to do this because there are only two accessible ports on the outside and sometimes i need to use a keyboard on it and don’t have a ps/2 keyboard laying around. so i made the labels something where i can identify what broke and where it is. the F and B are front and back (internal usb ports). trust me, you’ll want to do this to anything and everything. i have an ancient isilon too with 24 platters in it. it took some time but i labeled each one. the last thing you want is to have a disk break and not know where to find it for replacement.