HDD-manufacture induced ZFS limitations

Freddie Cash fjwcash at gmail.com
Sun Nov 3 16:36:41 UTC 2013


On Nov 3, 2013 1:07 AM, "Zenny" <garbytrash at gmail.com> wrote:
>
> Hi:
>
> PROBLEM
>
> I came across a very weird situation because HDD-manufacturer counts
> HDD space according to metric system instead of multiplication of 1024
> (2^10). This mismatches the space capacity between what OS filesystems
> calculate HDD space.
>
> Secondly, each HDD manufacturer has different total byte size for what
> they claim as the same sized HDDs.
>
> With the above two scenarios, it poses a nuisance to replace a
> corrupted HDD with another HDD from another manufacturer even though
> they claim that they are of the equal size, but differs by a few
> bytes. Thus, zfs does not accept the new HDD.
>
> SOLUTION
>
> A way around is to create a sparse zfs dataset at the beginning,
> according to the HDD-manufacturer defined metric system of HDD space
> measurement at the power of 10 rather than 2^10.
>
> BUT ANOTHER PROBLEM
> However, I came across another odd situation with  the bsdinstaller
> with FreeBSD 10-Beta2 which has an option to install root in zfs. The
> bsdinstaller script is flawless as it is. But it does not address the
> disksize mismatch problem as stated above. Any workaround will be
> appreciated!
>
> It would be a nice feature if the new bsdinstaller in FreeBSD10 allows
> the user first to make a sparse zfs dataset before installing root in
> zfs. Thanks!

The workaround is simple: create a partition that starts at 1 MB and leaves
1 MB free at the end of the disk.

However, that workaround is no longer needed, as ZFS v22-ish introduced a
similar workaround internally. So it's possible to use while disks that
differ in size by 1MB or two without any issue.


More information about the freebsd-stable mailing list