Labeling disks

From: Stefan Bethke <stb_at_lassitu.de>
Date: Fri, 5 Dec 2008 21:45:54 +0100
I'm trying to set up a new machine with three disks, which should host  
a root ufs file system, swap space, and a raidz zfs pool.

Doing this the old-fashioned way with fdisk and bsdlabel (and gmirror  
for the a and b slices) works just fine, but I figured I might use the  
opportunity and try a GPT partition table. Also, I'd like to label the  
disks, and use the labels to reference the disks and contained  
partitions, instead of the ATA disk device. If I need to swap disks, I  
then don't have to take care to reinsert them into the exact same spots.

Unfortunatly, I'm coming up short:

- Using glabel to label the disks, and then fdisk/bsdlabel partioning  
them, works nicely. As soon as I put a gmirror on the label/disk?s1a  
partitions, *all* labels disappear. Huh? I can understand removing the  
labels for the partitions that are now the providers used by the  
gmirror, but why to the other get removed? Also, it seems that gmirror  
references the actual disks (see gmirror output below) instead of the  
labels. I was under the impression that glabel would consume a  
provider and provide it minus the last sector, so /dev/label/foo and / 
dev/ad22 are not the same device (but do overlap).

- I did manage to create a GPT partitioned USB stick, but the  
partition label doesn't show up. I would be grateful if someone could  
commit kern/128398 or similar. (Unless I'm misunderstanding how GPT  
labels should show up.)

Am I going about this the wrong way? Is there another way to configure  
gmirror and ZFS to use specific disks as opposed to certain channels  
on certain controllers?


Thanks,
Stefan


$ gmirror list
Geom name: root
State: COMPLETE
Components: 3
Balance: load
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 1
ID: 1289874545
Providers:
1. Name: mirror/root
    Mediasize: 4294966784 (4.0G)
    Sectorsize: 512
    Mode: r1w1e1
Consumers:
1. Name: ad6s1a
    Mediasize: 4294967296 (4.0G)
    Sectorsize: 512
    Mode: r1w1e1
    State: ACTIVE
    Priority: 0
    Flags: DIRTY
    GenID: 0
    SyncID: 1
    ID: 148493928
2. Name: ad8s1a
    Mediasize: 4294967296 (4.0G)
    Sectorsize: 512
    Mode: r1w1e1
    State: ACTIVE
    Priority: 1
    Flags: DIRTY
    GenID: 0
    SyncID: 1
    ID: 1518735210
3. Name: ad10s1a
    Mediasize: 4294967296 (4.0G)
    Sectorsize: 512
    Mode: r1w1e1
    State: ACTIVE
    Priority: 2
    Flags: DIRTY
    GenID: 0
    SyncID: 1
    ID: 291618695


-- 
Stefan Bethke <stb_at_lassitu.de>   Fon +49 170 346 0140
Received on Fri Dec 05 2008 - 19:45:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:38 UTC