ray vantassle
2012-01-09 16:56:56 UTC
I'm still trying to get a good (accurate) feel for how important it is to
have ZFS use 4K blocksize on AFT 4KB sectors disks. However, just this
weekend I built a kludged zpool to create hardcoded 4K blocksize and
rebuilt my pool. Got the idea from a patch I found a while ago which added
a "blocksize" option to zpool/create. The patch was so simple that I've
wondered why is hasn't already been pulled into zfs-fuse. Of course, it
wouldn't help unless people knew: a) that the option exists, and b) that
their drive is a 4K sector drive, and c) specify that option when they
create the pool.
There's been much discussion about the drives lying and saying that they
are 512 when they are really 4K, whitelists to override what a drive
reports about itself, etc. So the automatic approach is of limited benefit
until the drives stop lying.
Anyway.....I thought of a simple thing to do that will probably work okay
most of the time, and even when it is wrong it doesn't harm anything.
For the interim, why not just have zpool/create assume that it should use a
blocksize of 4KB (ashift=12) for any drive that is 2TB or larger? The
downside is that files sizes are rounded up to 4K instead of 512B, so
there's slightly more wasted space, but so what? A 2TB+ drive has so much
capacity that the wasted space is trivial.
FWIW, Windows uses a default clustersize of 4KB for NTFS regardless of the
size size and 4KB for FAT16/32 for any disk over 256MB -- which really
means that Windows essentially *always* uses 4KB. Ext4 also seems to
default to 4K blocksize.
So why not just make an enhancement to zpool/create and set the default
blocksize to 4KB for anything more than 1TB?
***************************************
Another question: Is there any active development work being done on
zfs-fuse? I don't see much activity.
have ZFS use 4K blocksize on AFT 4KB sectors disks. However, just this
weekend I built a kludged zpool to create hardcoded 4K blocksize and
rebuilt my pool. Got the idea from a patch I found a while ago which added
a "blocksize" option to zpool/create. The patch was so simple that I've
wondered why is hasn't already been pulled into zfs-fuse. Of course, it
wouldn't help unless people knew: a) that the option exists, and b) that
their drive is a 4K sector drive, and c) specify that option when they
create the pool.
There's been much discussion about the drives lying and saying that they
are 512 when they are really 4K, whitelists to override what a drive
reports about itself, etc. So the automatic approach is of limited benefit
until the drives stop lying.
Anyway.....I thought of a simple thing to do that will probably work okay
most of the time, and even when it is wrong it doesn't harm anything.
For the interim, why not just have zpool/create assume that it should use a
blocksize of 4KB (ashift=12) for any drive that is 2TB or larger? The
downside is that files sizes are rounded up to 4K instead of 512B, so
there's slightly more wasted space, but so what? A 2TB+ drive has so much
capacity that the wasted space is trivial.
FWIW, Windows uses a default clustersize of 4KB for NTFS regardless of the
size size and 4KB for FAT16/32 for any disk over 256MB -- which really
means that Windows essentially *always* uses 4KB. Ext4 also seems to
default to 4K blocksize.
So why not just make an enhancement to zpool/create and set the default
blocksize to 4KB for anything more than 1TB?
***************************************
Another question: Is there any active development work being done on
zfs-fuse? I don't see much activity.
--
To post to this group, send email to zfs-fuse-/***@public.gmane.org
To visit our Web site, click on http://zfs-fuse.net/
To post to this group, send email to zfs-fuse-/***@public.gmane.org
To visit our Web site, click on http://zfs-fuse.net/