All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hugo Mills <hugo@carfax.org.uk>
To: helmut@hullen.de
Cc: linux-btrfs@vger.kernel.org
Subject: Re: LABEL only 1 device
Date: Sun, 26 Feb 2012 16:44:00 +0000	[thread overview]
Message-ID: <20120226164400.GC18898@carfax.org.uk> (raw)
In-Reply-To: <C3b12r9i1uB@helmut.hullen.de>

[-- Attachment #1: Type: text/plain, Size: 2533 bytes --]

On Sun, Feb 26, 2012 at 05:12:00PM +0100, Helmut Hullen wrote:
> Hallo, Hugo,
> 
> Du meintest am 26.02.12:
> 
> >> Mounting seems to be no problem, but (p.e.) "delete" doesn't kill
> >> the btrfs informations shown with (p.e.) "blkid /dev/sdy1",
> >> especially it doesn't delete the label.
> 
> >    What do you mean by "delete" here?
> 
>    btrfs device delete <device> <path>

   OK.

> >    The label is a *filesystem* label, not a label for the block
> > device(s) it lives on, so it doesn't make much sense to talk about
> > putting an FS label on only one of the devices that the FS is on.
> 
> My (planned) usual work (once a year or so):
> 
>         btrfs device add <biggerdevice> <path>
>         btrfs filesystem balance <path>
>         btrfs device delete <smallerdevice> <path>
> 
> And the "devices" are (p.e.) /dev/sdj1, /dev/sdk1 etc. (partitions on a  
> device).
> 
> Therefor I can see some informations via (p.e.)
> 
>         blkid /dev/sdj1

   OK, the real problem you're seeing is that when btrfs removes a
device from the filesystem, that device is not modified in any way.
This means that the old superblock is left behind on it, containing
the FS label information. What you need to do is, immediately after
removing a device from the FS, zero the first part of the partition
with dd and /dev/zero.

> I prefer LABELling the devices/partitions, and then I'd seen that the  
> option "-L" makes problems when I use it for more than 1 device/ 
> partition.

   As far as I know, you can't label partitions or devices. Labels are
a filesystem thing, and are stored in a FS-dependent manner. There's a
confusion that historically it's been a one-to-one mapping, so people
get *very* sloppy about the distinction (particularly since there's no
real way of referring to a filesystem independently of the block
device(s) it's resident on).

> With other file systems there's no real problem with the same label for  
> several partitions - it doesn't work. But btrfs bundles these partitions  
> (perhaps sometimes/most times regardless of the labels of the other  
> partitions).

   I say again, partitions are not labelled. *Filesystems* are
labelled. I think that with a GPT you can refer to the disk itself and
its partitions by a UUID each, but I'm not 100% certain.

   Hugo.

-- 
=== 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
               --- emacs: Emacs Makes A Computer Slow. ---               

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

  reply	other threads:[~2012-02-26 16:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-26 15:23 LABEL only 1 device Helmut Hullen
2012-02-26 15:30 ` Hugo Mills
2012-02-26 16:12   ` Helmut Hullen
2012-02-26 16:44     ` Hugo Mills [this message]
2012-02-26 16:57       ` Helmut Hullen
2012-02-26 17:14         ` Hugo Mills
2012-02-26 18:11           ` Helmut Hullen
2012-02-27  6:44           ` Helmut Hullen
2012-02-27 10:11             ` Hugo Mills
2012-02-27 10:27               ` Helmut Hullen
2012-02-27 16:48                 ` Duncan
2012-02-27 21:15                   ` Helmut Hullen
2012-02-27 21:23                     ` Hugo Mills
2012-02-27 21:33                     ` Felix Blanke
2012-02-27 21:45                     ` Hugo Mills
2012-02-27 21:59                       ` Helmut Hullen
2012-02-26 18:07       ` Duncan
2012-02-28 22:35         ` Karel Zak
2012-03-01  0:54           ` Duncan
2012-02-27 12:06       ` David Sterba
2012-02-27 12:24         ` Helmut Hullen

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=20120226164400.GC18898@carfax.org.uk \
    --to=hugo@carfax.org.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.