|
FreeBSD Installation and Upgrading Installing and upgrading FreeBSD. |
|
Thread Tools | Display Modes |
|
|||
glabels and GPT
What is considered the "proper" way to combine using glabel to label disks and GPT partitioning? If I do it like this:
Code:
glabel label -v disk00 /dev/ad1 gpart create -s GPT /dev/ad1 <create partitions> So should I instead do this: Code:
gpart create -s GPT /dev/ad1 <create partitions> glabel label -v disk00 /dev/ad1 Code:
glabel label -v disk00 /dev/ad1 gpart create -s GPT /dev/label/disk00 <create partitions> |
|
|||
Additionally, the gpart manpage refers to "logical blocks" in a couple of places. Am I right in thinking these parts actually refer to "sectors", because both seem to be 512 bytes?
|
|
|||
That's for labelling filesystems, not for labelling disks.
|
|
|||
Quote:
If I do it this way, the data is being overwritten actually. Code:
# glabel label -v disk_ad4 ad4 Metadata value stored on ad4. Done. # ls /dev/label disk_ad4 Code:
# gpart create -s gpt label/disk_ad4 GEOM: ad4: the secondary GPT table is corrupt or invalid. GEOM: ad4: using the primary only -- recovery suggested. label/disk_ad4 created. Code:
# gpart add -s 64K -t freebsd-boot ad4 ad4p1 added. Code:
# ls /dev/label #
__________________
"I never think of the future. It comes soon enough." - A.E Useful links: FreeBSD Handbook | FreeBSD Developer's Handbook | The Porter's Handbook | PF User's Guide | unix-heaven.org |
|
|||
Using glabel together with fdisk and bsdlabel should work without issues, since only glabel is actually writing to the providers last sector.
The problem comes when you try to combine glabel with gpart and gmirror for example - I've tried labeling a disk and then slicing it with gpart, but then I lose the labels. - I've tried labeling the filesystem with the -L flag of newfs, when I create the filesystem, but when I use them with gmirror to create a raid-1, then I lose the entries in /dev/ufs You can label the partitions using gpart, this way: Code:
# gpart add -s <size> -t freebsd-ufs -l <your-label> <provider> Currently I cannot think of a good and clean way to put those labels in place, without losing them, after re-using them with gmirror of other GEOM tool. Regards, DNAeon
__________________
"I never think of the future. It comes soon enough." - A.E Useful links: FreeBSD Handbook | FreeBSD Developer's Handbook | The Porter's Handbook | PF User's Guide | unix-heaven.org |
|
|