Re: Option LABEL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 3, 2013, at 12:59 PM, Helmut Hullen <Hullen@xxxxxxxxxxx> wrote:

>> MBR has no mechanism for labeling the disk itself or the partitions.
>> So /dev/sda cannot have a label or a name.
> 
> 
> Sure?

Yes. MBR itself has no place holder to encode a disk name or partition name.
http://en.wikipedia.org/wiki/Master_boot_record

GPT does allow for partition names, offset 56.
http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_entries


>   btrfs filesystem label /dev/sdb mylabel

That is a file system label. Hence the command "filesystem label".

> On my system (a bundle of /dev/sdb, /dev/sdc, /dev/sdd)
> 
>        btrfs fi label /dev/sdb mylabel
> 
> only sets the label on the (unmounted) device /dev/sdb. "/dev/sdc" and  
> "/dev/sdd" remain without label.

If I create a two device btrfs file system without a label, and then relabel it, all device members are relabeled - but again this is the wrong language. The devices do not have labels, it's the file system that has the label.

> for labelling an ext2/3/4 partition. Works like a charm, especially for  
> USB disks.

Again, even with ext[234] you are not labeling a  partition. You are labeling a file system. In fact if I use LVM to place /dev/sda /dev/sdb /dev/sdc into a VG, then export that whole VG as one LV, then format it ext4 with label "hellokitty" again that file system is labeled "hellokitty" which spans three devices. The devices are not what's named. Same for md and dmraid devices.

Somehow in your mind you're OK abstracting the LV as a kind of "device" but you're unwilling to consider a Btrfs file system a kind of "device" also. In the case of ext4 on LVM, you're totally OK ignoring the fact that /dev/sda, /dev/sdb, /dev/sdc all have the same label in effect. But somehow it gets your goat when Btrfs is doing the same thing.

Because it's the *filesystem* that's labelled.



Chris Murphy--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux