mhugelmann
Cadet
- Joined
- Mar 16, 2012
- Messages
- 8
Hey all,
I've spent some time over the last few years using and fiddling around with FreeBSD, FreeNAS and the ZFS file system. Also, since newer hard drives are all advanced format drives with 4KiB sector sizes (instead of the old 512 B sector sizes), I did research about the change and how it would affect my ZFS zpool setup. Up until last night, I thought I had a pretty sound understanding of my setup, and I was confident that I had configured my drives correctly. However, I came across a thread on the FreeBSD forums which made me question my drives, zpools and configuration.
So here's my question: Does gpart need to be used to create a main partition on a disk before creating a zpool of block-level devices to ensure sector alignment? Or does running gnop create -S 4096 for each device, then creating the zpool suffice?
The forum post I'm referring to is here. I know gpart is used to create partitions on a drive, however I thought ZFS preferred whole disks. I realize ZFS can use partitions and even files as vdevs to create a zpool, but the documentation suggests whole disks should be used as vdevs. Since my drives are WD EARS drives (meaning: the drives do use 4 KiB sectors physically, but report to the OS that they use 512 B sectors), the process I used to create my zpool is this:
I know I'm going against the FreeNAS recommended set up by not using a slice of each drive for SWAP, but should I have at least created one main partition on each disk using gpart before using gnop and creating my zpool? To my understanding, the previous commands only affect the ashift of the zpool, and the ashift is what ZFS uses to determine the smallest IO operation it can perform. But, as one of the posts in the cited thread states, that doesn't mean the drive is aligned. On the other hand, I'm really not sure if I need to worry about alignment at all as my disks contain no partitions and ZFS uses the whole disk.
To be honest, I'm not entirely concerned about the performance of my disks or set up as it stands right now, I'm just more curious if my process was flawed or if I'm misunderstanding something.
Any insight would be appreciated. Thanks :)
-----
On a side-note, the output of diskinfo -v on each of my drives is not consistent. Some devices report the stripesize and some (nearly half) do not. However, all the drives report the stripeoffset as 0. Should I be concerned about this variance among the drives?
I've spent some time over the last few years using and fiddling around with FreeBSD, FreeNAS and the ZFS file system. Also, since newer hard drives are all advanced format drives with 4KiB sector sizes (instead of the old 512 B sector sizes), I did research about the change and how it would affect my ZFS zpool setup. Up until last night, I thought I had a pretty sound understanding of my setup, and I was confident that I had configured my drives correctly. However, I came across a thread on the FreeBSD forums which made me question my drives, zpools and configuration.
So here's my question: Does gpart need to be used to create a main partition on a disk before creating a zpool of block-level devices to ensure sector alignment? Or does running gnop create -S 4096 for each device, then creating the zpool suffice?
The forum post I'm referring to is here. I know gpart is used to create partitions on a drive, however I thought ZFS preferred whole disks. I realize ZFS can use partitions and even files as vdevs to create a zpool, but the documentation suggests whole disks should be used as vdevs. Since my drives are WD EARS drives (meaning: the drives do use 4 KiB sectors physically, but report to the OS that they use 512 B sectors), the process I used to create my zpool is this:
Code:
# gnop create -S 4096 /dev/ada0 # gnop create -S 4096 /dev/ada1 # gnop create -S 4096 /dev/ada2 # gnop create -S 4096 /dev/ada3 # zpool create pool /dev/ada0.nop /dev/ada1.nop /dev/ada2.nop /dev/ada3.nop # zpool export pool # gnop destroy /dev/ada0.nop # gnop destroy /dev/ada1.nop # gnop destroy /dev/ada2.nop # gnop destroy /dev/ada3.nop # zpool import pool
I know I'm going against the FreeNAS recommended set up by not using a slice of each drive for SWAP, but should I have at least created one main partition on each disk using gpart before using gnop and creating my zpool? To my understanding, the previous commands only affect the ashift of the zpool, and the ashift is what ZFS uses to determine the smallest IO operation it can perform. But, as one of the posts in the cited thread states, that doesn't mean the drive is aligned. On the other hand, I'm really not sure if I need to worry about alignment at all as my disks contain no partitions and ZFS uses the whole disk.
To be honest, I'm not entirely concerned about the performance of my disks or set up as it stands right now, I'm just more curious if my process was flawed or if I'm misunderstanding something.
Any insight would be appreciated. Thanks :)
-----
On a side-note, the output of diskinfo -v on each of my drives is not consistent. Some devices report the stripesize and some (nearly half) do not. However, all the drives report the stripeoffset as 0. Should I be concerned about this variance among the drives?