Using the *real* sector/block size of a mass storage device for ZFS

Johan Hendriks joh.hendriks at gmail.com
Sat Feb 8 10:03:01 UTC 2014


Op zaterdag 8 februari 2014 heeft Berend de Boer <berend at pobox.com> het
volgende geschreven:

> >>>>> "Dustin" == Dustin Wenz <dustinwenz at ebureau.com <javascript:;>>
> writes:
>
>     Dustin> Am I correct in assuming that it is absolutely impossible
>     Dustin> to convert an existing ashift:9 vdev to ashift:12? Some of
>     Dustin> my pools are approaching 1PB in size; transferring the
>     Dustin> data off and back again would be inconvenient.
>
> I thought you could do it one disk at a time (if you have a redundant
> pool).
>
> But maybe not.
>
> --
> All the best,
>
> Berend de Boer


No that is not possible.
The ashift is set when the pool is created, hence the fact that you only
need the gnop method at pool creation time. If you add a vdev to the pool
you do not need the gnop method anymore because you can not change it.
You can align the disk so it has a 4 k alignement. But that is not the
ashift of the pool

I think FreeBSD 10 sees if the disk is capable for a ashift of 12 and
therefor give you a warning.
I have a FreeBSD 10 machine with two types of disks.
WD RE and WD SE drives.
If i create a pool with the RE drives, FreeBSD 10 will create it with a
ashift of 9, so i need to use the gnop method to get a ashift of 12.
If i create a pool with the SE drives, it automaticly uses a ashift of 12.
I guess if i did create the pool with the SE drives on FreeBSD 9 with a
ashift of 9 FreeBSD 10 would warn me with the warning you see.

I use gpart to create a 4k disk alignement.
# gpart create -s gpt da0
# gpart add -a 4k -t freebsd-zfs -l labelname da0

This way the disk has a 4k alignement.
To get a asift of 12 on your pool you can use the gnop method, or you could
try to create the pool without gnop and see if FreeBSD 10 detect the disk
as a advanced format disk as it does for the WD SE drives, that way you do
not need the gnop method.
If FreeBSD 10 gives you a this warning, i am almost certain you do not need
the gnop method on those disks.

Regards
Johan Hendriks


More information about the freebsd-fs mailing list