From: Hullen@t-online.de (Helmut Hullen)
To: linux-btrfs@vger.kernel.org
Subject: Re: Option LABEL
Date: 03 Jan 2013 18:57:00 +0100 [thread overview]
Message-ID: <CO8ipTEeCXB@helmut.hullen.de> (raw)
In-Reply-To: <20130103170151.GB19051@carfax.org.uk>
Hallo, Hugo,
Du meintest am 03.01.13:
>> But for what purpose offers "mkfs.btrfs" this option?
> So that you don't have to run the label command immediately after
> making the filesystem. Most mkfs implementations for different
> filesystems have something similar, usually with the -L option.
But other filesystems don't put the label onto more than 1 device.
There's the problem for/with btrfs.
The label has to be unique for the whole machine.
>> Without this double-labelled (?) devices "blkid" shows all devices
>> with
> "Double-labelled"? The filesystem has one label, belonging to the
> filesystem. I don't see where the "double-labelling" comes in.
As I described:
mkfs.btrfs -d raid0 -m raid1 -l mylabel /dev/sdb /dev/sdc /dev/sdd
labels all three devices with the same name, and then programs like
"blkid" or "findfs" don't find any label (for all labelled devices, not
only for btrfs devices).
And as I have written before:
file -s /dev/sdb
file -s /dev/sdc
file -s /dev/sdd
shows for each of these devices the same label.
--------------
When I run
mkfs.btrfs -d raid0 -m raid1 /dev/sdb /dev/sdc /dev/sdd
and then
btrfs filesystem label /dev/sdb mylabel
then only "/dev/sdb" shows this label (as long as none of the 3 devices
is mounted).
When I then run
mount LABEL=mylabel /mnt/btr
then all works fine. And then (after mounting)
blkid /dev/sdb
blkid /dev/sdc
blkid /dev/sdd
show the same label.
blkid
without any device seems to hang - may be I haven't waited long enough.
>> (if defined) their labels. When I define the same label for more
>> than 1 device (btrfs or ext2fs or ...) then "blkid" shows nothing.
>> No output for any of the devices.
> This is a fault in the version of blkid you're running, then.
here: "blkid from until-linux 2.21.2 (libblkid 2.21.0, 25-May-2012)".
And older versions.
> There's nothing to stop me from labelling two ext2 filesystems with
> the same label.
That part is right: I can label more than 1 device with the same name,
not only under btrfs.
But then (I had written this problem) programs like "blkid" don't find
any labelled device.
> If blkid can't handle that, then it's got problems
> beyond btrfs. On my main machine, it seems to work correctly:
> $ sudo blkid
> /dev/sda: LABEL="media" UUID="3993e50e-a926-48a4-867f-36b53d924c35"
> UUID_SUB="5fd56eec-5e26-4c1f-a02a-f86550e4aefe" TYPE="btrfs"
> /dev/sdc: LABEL="media" UUID="3993e50e-a926-48a4-867f-36b53d924c35"
> UUID_SUB="4e392bea-f39a-4cba-b78c-c712479bf3f0" TYPE="btrfs"
> /dev/sde: LABEL="media" UUID="3993e50e-a926-48a4-867f-36b53d924c35"
> UUID_SUB="5e2555bd-bf36-430b-af5a-aa81604afc96" TYPE="btrfs"
> /dev/sdp: LABEL="media" UUID="3993e50e-a926-48a4-867f-36b53d924c35"
> UUID_SUB="404d13f5-0231-46db-a311-ad7a4f99eef3" TYPE="btrfs"
> /dev/sdr: LABEL="media" UUID="3993e50e-a926-48a4-867f-36b53d924c35"
> UUID_SUB="90469059-f012-4b6e-9233-8c591cbeaa80" TYPE="btrfs"
> /dev/sdq: LABEL="media" UUID="3993e50e-a926-48a4-867f-36b53d924c35"
> UUID_SUB="646d3d32-5193-4fcd-afb2-43f14122a149" TYPE="btrfs"
> /dev/sds: LABEL="media" UUID="3993e50e-a926-48a4-867f-36b53d924c35"
> UUID_SUB="f4d4dbb2-f2bb-4e54-bbf9-4bb5474e9ef1" TYPE="btrfs"
Is "media" mounted?
> My blkid version:
> blkid from util-linux 2.20.1 (libblkid 2.20.0, 19-Oct-2011)
It's older than my actual version, but I had found this problem more
than a year ago.
Viele Gruesse!
Helmut
next prev parent reply other threads:[~2013-01-03 18:03 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-03 15:14 Option LABEL Helmut Hullen
2013-01-03 16:08 ` Hugo Mills
2013-01-03 16:29 ` Helmut Hullen
2013-01-03 17:01 ` Hugo Mills
2013-01-03 17:43 ` james northrup
2013-01-03 17:57 ` Helmut Hullen [this message]
2013-01-03 18:10 ` cwillu
2013-01-03 18:20 ` Helmut Hullen
2013-01-03 19:18 ` Chris Murphy
2013-01-03 19:35 ` Chris Murphy
2013-01-03 20:28 ` Helmut Hullen
2013-01-03 21:23 ` Hugo Mills
2013-01-03 21:27 ` Chris Murphy
2013-01-03 22:07 ` Helmut Hullen
2013-01-03 21:52 ` Helmut Hullen
2013-01-06 16:02 ` Goffredo Baroncelli
2013-01-04 12:11 ` Helmut Hullen
2013-01-04 20:59 ` Helmut Hullen
2013-01-04 21:41 ` Chris Murphy
2013-01-03 19:59 ` Helmut Hullen
2013-01-03 21:17 ` Chris Murphy
2013-01-04 12:56 ` Helmut Hullen
2013-01-03 18:33 ` Hugo Mills
2013-01-03 19:08 ` Helmut Hullen
2013-01-03 19:28 ` Hugo Mills
2013-01-03 20:18 ` Helmut Hullen
2013-01-05 11:36 ` Martin Steigerwald
2013-01-05 12:44 ` Helmut Hullen
2013-01-05 19:08 ` Chris Murphy
2013-01-05 13:15 ` Helmut Hullen
2013-01-05 19:10 ` Chris Murphy
2013-01-05 19:13 ` Hugo Mills
2013-01-05 21:03 ` Helmut Hullen
2013-01-05 21:21 ` Chris Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CO8ipTEeCXB@helmut.hullen.de \
--to=hullen@t-online.de \
--cc=helmut@hullen.de \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).