RFC: ATA to CAM integration patch

Aisaka Taiga spambox at haruhiism.net
Sun Jun 28 09:59:40 UTC 2009

Daniel O'Connor wrote:
> Louis' glabel solution works for me so far :)
I've experienced many weird things while trying to use glabel for swap 
partitions. I wonder where does GEOM store the label, because doing

glabel create swap /dev/ad0s1b

successfully adds a label, it shows up on boot:

GEOM_LABEL: Label for provider /dev/ad0s1a is label/swap

however, after a while the label is lost. Maybe the metadata is stored 
in the last sector of the swap space, and the swap data overwrites it, I 
don't know.

There's even funnier thing about UFS labels. Let's say we have a gmirror 
device gm0.

# gmirror create -v -b round-robin gm0 /dev/ad0
# gmirror insert gm0 /dev/ad2
# reboot
# tunefs -L root /dev/mirror/gm0s1a
*GEOM_LABEL: Label for provider /dev/mirror/gm0s1a is ufs/root*
# vim /etc/fstab
/dev/ufs/root / ..........
# reboot

It might work for a while, but usually almost on the next boot I see:

ad0: <STwhateverAS SD15> TOOMANYMB on ata0-master SATA300
ad2: <STwhateverAS SD15> TOOMANYMB on ata1-master SATA300
*GEOM_LABEL: Label for provider /dev/ad0s1a is ufs/root*
GEOM_MIRROR: Provider gm0 started (2/2)
Trying to mount root from ufs:/dev/ufs/root...

Manual root filesystem specification:

And the system wants me to enter the root FS name manually because ad0 
is locked by GEOM and ad0s1a can't be mounted therefore. GEOM_LABEL 
finds the label before GEOM_MIRROR is started properly.

I've experienced this behaviour on both 7.2 and, I think, 8.0 too (May 
I know we don't really need labels on a gmirror because a gmirror is a 
'label' in itself and will always appear as /dev/mirror/device-name no 
matter how we swap HDDs and no matter in which order they are probed, 
however this is still a bit strange.

Kamigishi Rei

More information about the freebsd-current mailing list