Page MenuHomeFreeBSD

Switch zfsboot installer force 4k option to use vfs.zfs.min_auto_ashift=12
ClosedPublic

Authored by allanjude on Aug 8 2014, 1:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 23, 7:40 AM
Unknown Object (File)
Sun, Dec 15, 11:51 PM
Unknown Object (File)
Oct 27 2024, 3:33 PM
Unknown Object (File)
Oct 27 2024, 9:37 AM
Unknown Object (File)
Oct 25 2024, 10:41 AM
Unknown Object (File)
Oct 22 2024, 9:37 PM
Unknown Object (File)
Sep 23 2024, 10:48 AM
Unknown Object (File)
Sep 18 2024, 5:34 AM

Details

Summary

Previously there was no way to force a ZFS to directly create a zpool with a minimum 4k sector size. To achieve this we used gnop to overlay a device With a 4k sector size which fools ZFS into creating the pool with larger than logical sector sizes.

ZFS now has a sysctl to control this behaviour (vfs.zfs.min_auto_ashift) so switch to using it instead of gnop.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

smh retitled this revision from to Switch zfsboot installer force 4k option to use vfs.zfs.min_auto_ashift=12.
smh updated this object.
smh edited the test plan for this revision. (Show Details)

Remove .eli from zroot_vdevs standard path

It's not clear if there was a bug in the original version and zroot_vdevs should have been alwas set to "$zroot_vdevs $disk$targetpart.eli" in the ZFSBOOT_GELI_ENCRYPTION case?

There was a discussion on this on the freebsd-fs list in June (e.g. http://lists.freebsd.org/pipermail/freebsd-fs/2014-June/019535.html). The consensus seemed to be that forcing the ZFS block size to larger than the stripe size was actually harmful in many cases and that this feature should be removed entirely rather than shifted to use the sysctl.

In D566#5, @nwhitehorn wrote:

There was a discussion on this on the freebsd-fs list in June (e.g. http://lists.freebsd.org/pipermail/freebsd-fs/2014-June/019535.html). The consensus seemed to be that forcing the ZFS block size to larger than the stripe size was actually harmful in many cases and that this feature should be removed entirely rather than shifted to use the sysctl.

As a user of said I'm afraid I would have to disagree with this conclusion for two reason:

  1. We can't garanttee that 512b devices will continue to be available, we've had number of cases where we've had to replace disks with newer 4k version, which results in zpool status warning
  2. Its often the case that the reported stripe size is wrong, usually a missing quirk

Given this we should definitely not remove this option, which is an administration choice.

nwhitehorn edited edge metadata.

This is definitely an improvement compared to gnop and should go in the tree. The whole issue of 4K sectors should go back to the mailing list, however. This is useful only for pools that get upgraded with 4K disks in the future; in all other circumstances it is harmful.

This revision is now accepted and ready to land.Nov 29 2014, 4:38 PM
allanjude added a subscriber: allanjude.
allanjude added inline comments.
usr.sbin/bsdinstall/scripts/zfsboot
1039
This revision is now accepted and ready to land.Jan 16 2015, 1:10 AM
allanjude added a reviewer: smh.
allanjude edited edge metadata.

Fix bug with GELI support in zfsboot
Was broken by r276027

PR: 196790

This revision now requires review to proceed.Jan 16 2015, 1:27 AM
smh edited edge metadata.

Looks good to me

This revision is now accepted and ready to land.Jan 16 2015, 9:44 AM