"unused" partition: disklabel vs. gpart

Andriy Gapon avg at icyb.net.ua
Tue Nov 11 05:24:50 PST 2008


It seems that there is a difference in how disklabel-based code and part
code handle partitions with type "unused".
As I understand disklabel sees a difference between partitions that do
not exist (i.e. lines are not there in disklabel output) and partitions
marked unused. geom_bsd code doesn't create devices for the former and
does create for the latter.
On the other hand geom_part_bsd code seems to treat "unused" as
non-existent and doesn't create device for them and doesn't display them
in gpart show output.

E.g. I had a label with a single partition 'd' with type unused. I
actually put ZFS pool into this partition, but marked it 'unused', so
that some smart scripts on certain live cds do not try to mount or
swappon the partitions. This worked OK with geom_bsd, but geom_part_bsd
considered the slice entirely empty, it didn't find the 'd' partition in it.

-- 
Andriy Gapon


More information about the freebsd-geom mailing list