Page MenuHomeFreeBSD

Remove whole-disk vdev support from zfsboot
ClosedPublic

Authored by pkelsey on Feb 11 2019, 6:19 AM.

Details

Summary

This is consistent with removing whole-disk vdev support from libsa/zfs/zfs.c in r342151.

What I'm really after is to not probe for a whole disk vdev if a partition table exists, so if for some reason whole disk vdev support needs to remain, I'll chase this patch with one to check for a partition table first and only do a whole-disk vdev probe if there isn't one.

The reason I want the partition table check to take priority is that I had an experience recently where I moved a machine with a gpt/zfs config to 11.2, and it 'started to hang' in zfsloader. After then upgrading the boot code to the 11.2 gptzfsboot, gptzfsboot 'started to hang'.

After a bit of digging, it turns out what was really going on was that the RAID controller the disks were attached to (and which was set to logical pass-through mode) had a firmware bug that was being tickled by the new zfsboot/loader code in 11.2 that newly started looking at the labels at the end of the disk (or partition), and once that happened, each I/O was causing a 60 second timeout (disk size was accurate - no past-the-real-end issue, and it turns out I could get things to work by breaking up multi-sector I/Os near the end of the disk into single-sector I/Os in descending order). This particular problem was worked around in the end by updating the controller firmware to a version that fixed this bug, but if no such firmware existed, I sure would have liked to have been able to work around the issue by adjusting my partition tables to avoid a suitable chunk of the end of the disk. Such a workaround is not possible unless partition tables take priority over whole-disk probes (or whole disk probes are done away with entirely).

This patch doesn't get us all the way to being able to use partition tables to restrict which parts of the disk get read by zfsboot - when whole-disk geli_taste() occurs will have to be adjusted as well.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pkelsey created this revision.Feb 11 2019, 6:19 AM
tsoome accepted this revision.Feb 11 2019, 6:30 AM
This revision is now accepted and ready to land.Feb 11 2019, 6:30 AM
pkelsey edited the summary of this revision. (Show Details)Feb 17 2019, 3:50 AM
This revision was automatically updated to reflect the committed changes.