Repository navigation
Look up FreeBSD file store UUIDs by the volume's device - #3823
Conversation
getFileStores() looked up each file store's UUID in the geom part list map, which is keyed by partition device (da1p1), using the last element of the mount point (home). Only / matched, because for / the name is taken from the volume instead. Look the UUID up by the device the volume names below /dev. A partition can also be mounted by GPT label (/dev/gpt/rootfs) or by GPT ID (/dev/gptid/<rawuuid>), so parseGeomPartList maps those names too. On cfarm430 (FreeBSD 16.0-CURRENT), /, /boot/efi and /home now each report the rawuuid geom lists; before, only / did.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📜 Recent review details
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
OSFileStore.getUUID()on FreeBSD was empty for every file system except/.getFileStores()builds a map fromgeom part listthat is keyed by partition device (da1p1). It then looked each file store up by the last element of its mount point (home). Only/ever matched, because for/the name is taken from the volume instead.Change
/dev./dev/gpt/rootfs) or its GPT ID (/dev/gptid/<rawuuid>).parseGeomPartListnow maps those names as well.// TODO map mount point to UUID?comment is gone.Verification
cfarm430 (FreeBSD 16.0-CURRENT):
//dev/da0p2d4553393-...d4553393-8f91-11ef-8e4d-00155dc40030/boot/efi/dev/da0p1d454a567-8f91-11ef-8e4d-00155dc40030/home/dev/da1p1deb7728b-8f91-11ef-8e4d-00155dc40030The new test uses this machine's
geom part listoutput. It covers volumes named by device, GPT label and GPT ID, and volumes that should get no UUID: a whole disk,tmpfsand a ZFS dataset.Not verified
cfarm430 mounts everything by device, so the GPT label and GPT ID cases are tested only against fixture data. ZFS datasets have no partition UUID and still return an empty string, as before.
Summary by CodeRabbit