Hey guys,
FreeBSD 8.2 and ZFS v15 newbie here with 6x 2TB Seagate 5900RPM drives for the zpool. This system is for home use and not yet in production.
Here's what I did and where I wound up:
# wrote GEOM labels to disks (da0 is where FreeBSD is installed)
glabel label zdisk1 /dev/da1
glabel label zdisk2 /dev/da2
glabel label zdisk3 /dev/da3
glabel label zdisk4 /dev/da4
glabel label zdisk5 /dev/da5
glabel label zdisk6 /dev/da6
# create raidz2 zpool
zpool create tank raidz2 label/disk{1..6}
# check ashift, confirmed it to be 9
zdb | grep ashift
# I guess start from scratch
zpool destroy tank
# use 4KiB sectors... somehow
gnop create -S 4096 /dev/label/zdisk1
gnop create -S 4096 /dev/label/zdisk2
gnop create -S 4096 /dev/label/zdisk3
gnop create -S 4096 /dev/label/zdisk4
gnop create -S 4096 /dev/label/zdisk5
gnop create -S 4096 /dev/label/zdisk6
# create new tank
zpool create tank raidz2 label/zdisk1.nop label/zdisk2.nop label/zdisk3.nop label/zdisk4.nop label/zdisk5.nop label/zdisk6.nop
# check ashift, confirmed to be 12
zdb | grep ashift
# run dd to get an idea of performance, noticed it to be lower than ashift=9, ~40% less
# note that I ran this while in directory /tank
dd if=/dev/zero of=zerofile.000 bs=2M count=10000
# reboot machine
shutdown -h now
# once logged in, confirmed that ashift=12 stuck
# zpool status listed tank raidz2
# /dev/label no longer held *.nop entries
# for some reason /tank/zerofile.000 is now missing on its own - I expected it to stick around after a reboot?
# ran dd again in while in /tank, and it stopped prematurely with "filesystem full" error
dd if=/dev/zero of=zerofile.000 bs=2M count=10000
# checked space using df, and filesystem /dev/da0s1a is at 108% capacity, no typo.
# rm /tank/zerofile.000 cleared space
Something went wrong here... The first time this happened, I went and destroyed the tank zpool and noticed that /tank still existed. I deleted the directory manually using rmdir. That is strange to me.
Just looking for some guidance. I'm probably missing a few major concepts as I don't completely understand what's going on here. Feel free to throw in keywords I should Google, but I'd also like to get this setup working.
FreeBSD 8.2 and ZFS v15 newbie here with 6x 2TB Seagate 5900RPM drives for the zpool. This system is for home use and not yet in production.
- How can I tell whether a drive uses 512 byte or 4096 byte sectors from within the operating system? Or is this from datasheet information only?
- What is the correct sequence of commands to create a 6 drive raidz2 pool with a 4KiB aligned file system?
Here's what I did and where I wound up:
# wrote GEOM labels to disks (da0 is where FreeBSD is installed)
glabel label zdisk1 /dev/da1
glabel label zdisk2 /dev/da2
glabel label zdisk3 /dev/da3
glabel label zdisk4 /dev/da4
glabel label zdisk5 /dev/da5
glabel label zdisk6 /dev/da6
# create raidz2 zpool
zpool create tank raidz2 label/disk{1..6}
# check ashift, confirmed it to be 9
zdb | grep ashift
# I guess start from scratch
zpool destroy tank
# use 4KiB sectors... somehow
gnop create -S 4096 /dev/label/zdisk1
gnop create -S 4096 /dev/label/zdisk2
gnop create -S 4096 /dev/label/zdisk3
gnop create -S 4096 /dev/label/zdisk4
gnop create -S 4096 /dev/label/zdisk5
gnop create -S 4096 /dev/label/zdisk6
# create new tank
zpool create tank raidz2 label/zdisk1.nop label/zdisk2.nop label/zdisk3.nop label/zdisk4.nop label/zdisk5.nop label/zdisk6.nop
# check ashift, confirmed to be 12
zdb | grep ashift
# run dd to get an idea of performance, noticed it to be lower than ashift=9, ~40% less
# note that I ran this while in directory /tank
dd if=/dev/zero of=zerofile.000 bs=2M count=10000
# reboot machine
shutdown -h now
# once logged in, confirmed that ashift=12 stuck
# zpool status listed tank raidz2
# /dev/label no longer held *.nop entries
# for some reason /tank/zerofile.000 is now missing on its own - I expected it to stick around after a reboot?
# ran dd again in while in /tank, and it stopped prematurely with "filesystem full" error
dd if=/dev/zero of=zerofile.000 bs=2M count=10000
# checked space using df, and filesystem /dev/da0s1a is at 108% capacity, no typo.
# rm /tank/zerofile.000 cleared space
Something went wrong here... The first time this happened, I went and destroyed the tank zpool and noticed that /tank still existed. I deleted the directory manually using rmdir. That is strange to me.
Just looking for some guidance. I'm probably missing a few major concepts as I don't completely understand what's going on here. Feel free to throw in keywords I should Google, but I'd also like to get this setup working.
Last edited: