Thread: glabels and GPT
View Single Post
  #6   (View Single Post)  
Old 26th January 2010
DNAeon DNAeon is offline
Shell Scout
 
Join Date: Sep 2008
Location: Bulgaria
Posts: 138
Default

Quote:
Originally Posted by phoenix View Post
Start at the outer (largest) layer, and work your way in from there.

IOW, you label the disk. Then you partition the label. Then you format the partitions. Finally, you use the filesystems.
That is not exactly true.

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
Now if I do a gpart, see what happens:

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.
And if I do a freebsd-boot partition for example on ad4.

Code:
# gpart add -s 64K -t freebsd-boot ad4
ad4p1 added.
Then I lose the glabel from /dev/label
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
Reply With Quote