Hi!
I'm prototyping a new file server setup, and have to deal with drives which have physical sectors of 4k, but report 512B sectors. As this server will have 15 HDDs for its storage pools, I use labels indicating which drive bay they are located at.
I've used google-fu, and found a way to force ZFS to recognize 4k sector size using gnop. The problem here is that when I export/import the pool (or restart the machine), the pool will reference the drive partitions directly, and not their GPT labels.
Is there any way to force ZFS to refer to a drives GPT labels in this situation?
Verbose details
I've applied my steps to a single-drive pool for the purpose of this post, and the commands are as follows:
That creates the following pool:
I then proceed to export the tank, delete the gnop device, and import the tank:
And the pool looks as such:
I'm prototyping a new file server setup, and have to deal with drives which have physical sectors of 4k, but report 512B sectors. As this server will have 15 HDDs for its storage pools, I use labels indicating which drive bay they are located at.
I've used google-fu, and found a way to force ZFS to recognize 4k sector size using gnop. The problem here is that when I export/import the pool (or restart the machine), the pool will reference the drive partitions directly, and not their GPT labels.
Is there any way to force ZFS to refer to a drives GPT labels in this situation?
Verbose details
I've applied my steps to a single-drive pool for the purpose of this post, and the commands are as follows:
# gpart add -a 1m -t freebsd-zfs -l Bay1.1 ada1
# gnop create -S 4k gpt/Bay1.1
# zpool create tank gpt/Bay1.1.nop
That creates the following pool:
# zpool status
Code:
pool: tank
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
gpt/Bay1.1.nop ONLINE 0 0 0
errors: No known data errors
I then proceed to export the tank, delete the gnop device, and import the tank:
# zpool export tank
# gnop destroy gpt/Bay1.1.nop
# zpool import tank
And the pool looks as such:
# zpool status
Code:
pool: tank
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
ada1p1 ONLINE 0 0 0
errors: No known data errors