* [linux-lvm] current lvm function questions
@ 2000-09-27 1:20 David Brower
2000-09-27 2:24 ` Eric Whiting
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: David Brower @ 2000-09-27 1:20 UTC (permalink / raw)
To: linux-lvm
Hi, sorry to ask what might be FAQs, but I couldn't find
the answers on the list archive or the HOWTO. There may
be overlap in my interests between lvm and md, so please
straighten me out.
Area 1: Stable device naming.
Is there a way in Linux to get a stable name for a
disk that survive reconfiguration and discovery
randomization?
One of the things linux has problems with is
stable device naming. If you pull a disk out of a chain,
the following devices will move up in the /dev entries,
and not have the same name they had before. This can
be a real problem with massive storage subsystems.
I know of two ways of handling this. (1) is to slap
a label on the disk, and make sure it shows up as the
device in the label when the disk is discovered. (2)
is to keep a separate database mapping devices to fixed
locations. I think the label is the best idea.
It seems to me that lvm already slaps a label on the
disk when it does pvcreate. What i'm not sure of is
whether the label used is (a) globally unique and suitable
for stable device naming, or (b) tied to the device it
happened to be on at the time the pvcreate was issued.
Specifically, if a pv/vg/lv is created on /dev/sda6, and
a subsequent reconfig has that partition show up as
/dev/sdb3, does it still show up as /dev/lvname?
2. Raw device access
Can lvm volumes be accessed as raw devices? If so, how?
Is there /dev/rlvname?
I'm sure /dev/fs falls in here somewhere...
thanks!
-dB
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [linux-lvm] current lvm function questions
2000-09-27 1:20 [linux-lvm] current lvm function questions David Brower
@ 2000-09-27 2:24 ` Eric Whiting
2000-09-27 10:28 ` Andi Kleen
2000-09-28 16:32 ` Christoph Hellwig
2 siblings, 0 replies; 5+ messages in thread
From: Eric Whiting @ 2000-09-27 2:24 UTC (permalink / raw)
To: David Brower; +Cc: linux-lvm
David Brower wrote:
> Specifically, if a pv/vg/lv is created on /dev/sda6, and
> a subsequent reconfig has that partition show up as
> /dev/sdb3, does it still show up as /dev/lvname?
This is exactly what LVM is great for. I put 4 ide disks in a box and
moved them all over from primary/secondary/master/slave and the box
boots fine every time. Very cool stuff. Try moving disks around without
lvm. It is a pain.
eric
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] current lvm function questions
2000-09-27 1:20 [linux-lvm] current lvm function questions David Brower
2000-09-27 2:24 ` Eric Whiting
@ 2000-09-27 10:28 ` Andi Kleen
2000-09-28 16:26 ` Christoph Hellwig
2000-09-28 16:32 ` Christoph Hellwig
2 siblings, 1 reply; 5+ messages in thread
From: Andi Kleen @ 2000-09-27 10:28 UTC (permalink / raw)
To: David Brower; +Cc: linux-lvm
On Tue, Sep 26, 2000 at 06:20:44PM -0700, David Brower wrote:
> Area 1: Stable device naming.
>
> Is there a way in Linux to get a stable name for a
> disk that survive reconfiguration and discovery
> randomization?
Yes, there are programs to create SysV style LUN device nodes
after the SCSI scan. Look for scsidev or scsidev2.
> It seems to me that lvm already slaps a label on the
> disk when it does pvcreate. What i'm not sure of is
> whether the label used is (a) globally unique and suitable
> for stable device naming, or (b) tied to the device it
> happened to be on at the time the pvcreate was issued.
LVM uses an UUID iirc. ext2 does too BTW (and newer mount even
supports mounting by UUID without lvm). An UUID aims to be globally unique.
> Can lvm volumes be accessed as raw devices? If so, how?
> Is there /dev/rlvname?
Sure. Usually it is a /dev/VG/LVname though. Just bind a raw device
to them.
-Andi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] current lvm function questions
2000-09-27 10:28 ` Andi Kleen
@ 2000-09-28 16:26 ` Christoph Hellwig
0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2000-09-28 16:26 UTC (permalink / raw)
To: Andi Kleen; +Cc: David Brower, linux-lvm
On Wed, Sep 27, 2000 at 12:28:10PM +0200, Andi Kleen wrote:
> > disk when it does pvcreate. What i'm not sure of is
> > whether the label used is (a) globally unique and suitable
> > for stable device naming, or (b) tied to the device it
> > happened to be on at the time the pvcreate was issued.
>
> LVM uses an UUID iirc.
No, it does not (yet).
Christoph
--
Always remember that you are unique. Just like everyone else.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] current lvm function questions
2000-09-27 1:20 [linux-lvm] current lvm function questions David Brower
2000-09-27 2:24 ` Eric Whiting
2000-09-27 10:28 ` Andi Kleen
@ 2000-09-28 16:32 ` Christoph Hellwig
2 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2000-09-28 16:32 UTC (permalink / raw)
To: David Brower; +Cc: linux-lvm
On Tue, Sep 26, 2000 at 06:20:44PM -0700, David Brower wrote:
> Area 1: Stable device naming.
>
> Is there a way in Linux to get a stable name for a
> disk that survive reconfiguration and discovery
> randomization?
There are lots ...
a) use scsidev(2) (for scsi disks only)
b) use devfs
c) use the linux software raid driver
d) use a hardware raid controller that has it's
own devfs-like naming scheme (ami, compaq)
e) use lvm - also it does not use UUIDs yet,
vgscan should detect all pvs of a vg.
f) mount you disk by-label instead of by-device
(LABEL: or UUID: entries in /etc/fstab)
> Specifically, if a pv/vg/lv is created on /dev/sda6, and
> a subsequent reconfig has that partition show up as
> /dev/sdb3, does it still show up as /dev/lvname?
It should. (but it's called /dev/vgname/lvname)
>
> 2. Raw device access
>
> Can lvm volumes be accessed as raw devices? If so, how?
Yes - in Linux 2.4 (or 2.2 w/ patches) you can simply bind
a raw device to any blockdevice. See raw(8) for details.
The device name will be /dev/raw/X
> Is there /dev/rlvname?
Nope.
Christoph
--
Always remember that you are unique. Just like everyone else.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2000-09-28 16:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-09-27 1:20 [linux-lvm] current lvm function questions David Brower
2000-09-27 2:24 ` Eric Whiting
2000-09-27 10:28 ` Andi Kleen
2000-09-28 16:26 ` Christoph Hellwig
2000-09-28 16:32 ` Christoph Hellwig
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.