On Thu, Jan 03, 2013 at 04:14:00PM +0100, Helmut Hullen wrote:
> Hallo, linux-btrfs,
> 
> please delete the option "-L" (for labelling) in "mkfs.btrfs", in some  
> configurations it doesn't work as expected.
> 
> My usual way:
> 
>         mkfs.btrfs -d raid0 -m raid1 /dev/sdb /dev/sdc /dev/sdd ...
> 
> One call for some devices.
> Wenn I add the option "-L mylabel" then each device gets the same label,  
> and therefore some other programs can't find the (one) device with the  
> defined label.

   I'm sure we've been over this territory before. Devices are not
labelled; filesystems are labelled. You are labelling the whole
filesystem, which exists over several devices, so the same label will
be attached to every device in the filesystem.

> Especially
> 
>      blkid
>      findfs LABEL=mylabel
> 
> don't work.

   How do you mean, "don't work"? What are they showing, and what do
you think should they be showing? It looks like both of them print an
arbitrary device node of the devices that the FS lives on. Given that
both of these tools probably expect a one-to-one relationship between
a block device and a filesystem, this is not unreasonable.

>      file -s /dev/sdb  (etc.)
> 
> shows the label (and the problem).
> 
> Other tries:
> 
>         mkfs.btrfs -L mylabel /dev/sdb
> 
> creates a new btrfs filesystem and overwrites prior tries.

   Yes, because you've just created a new filesystem. That's what
mkfs.btrfs does, same as every other mkfs -- it creates a new
filesystem, destroying what was there before. This is unsurprising.

   Hugo.

> What works:
> 
>         btrfs filesystem label /dev/sdb mylabel

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
          --- What part of "gestalt" don't you understand? ---           

Attachment: signature.asc
Description: Digital signature

Reply via email to