All of lore.kernel.org
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: LABEL only 1 device
Date: Sun, 26 Feb 2012 18:07:31 +0000 (UTC)	[thread overview]
Message-ID: <pan.2012.02.26.18.07.31@cox.net> (raw)
In-Reply-To: 20120226164400.GC18898@carfax.org.uk

Hugo Mills posted on Sun, 26 Feb 2012 16:44:00 +0000 as excerpted:

>> 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 legacy MBR-based partitioning, that is correct, devices don't have a 
label, filesystems do.  Take an md/raid1 device for instance, and put a 
filesystem on it.  It's the filesystem that gets the label when mkfs 
(make filesystem) is done, putting the same label on the filesystem on 
all the md/raid1 component devices since it's mirrored (raid-1-ed) to all 
of them.

However, GPT-based partitioning *DOES* have partition level labels 
available.  I'm not sure if for instance parted exposes that 
functionality, but gptfdisk, which I use, certainly does.  That's useful 
with partitioned md/raid, since the filesystem on the partition gets a 
different label than the gpt-partition itself, which has a different 
label than all the underlying physical device partitions that compose the 
md/raid1.

Unfortunately, since gpt is reasonably new in terms of filesystem and 
partitioning tools, there isn't really anything (mount, etc) that makes 
/use/ of that label yet, tho gptfdisk does display it, let you modify it, 
etc, so it's easier to keep track at that level of whether you're 
operating on what you intended to operate on, as long as you keep the 
physical device partition labels distinct from the partitioned md/raid 
device labels, from the filesystem labels as created by mkfs.  (I have a 
consistent scheme I use, so they are distinct here.)

FWIW, gpt was designed by Intel and others to be used by EFI, but BIOS 
based devices support it as well, as do grub2, grub-legacy (with patches 
applied), and the kernel (with the related kernel config options 
enabled).  Since it does away with the primary/secondary/logical 
partition distinction, has dual-copy checksummmed partition tables, and 
has partition labels, plus the fact that it supports 2+TiB drives, it's 
gradually replacing MBR even on BIOS systems, but it's a slow process as 
MBR has been around for decades!

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


  parent reply	other threads:[~2012-02-26 18:07 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
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 [this message]
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=pan.2012.02.26.18.07.31@cox.net \
    --to=1i5t5.duncan@cox.net \
    --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.