* [linux-lvm] disk naming
@ 2003-01-03 10:02 Matt Schillinger
2003-01-03 10:45 ` Goetz Bock
2003-01-03 12:21 ` Steven Lembark
0 siblings, 2 replies; 15+ messages in thread
From: Matt Schillinger @ 2003-01-03 10:02 UTC (permalink / raw)
To: linux-lvm
this should be a simple question, but I can't find a direct discussion
in the lvm documentation. I believe that i have found that LVM will find
appropriate PV's regardless of their name (sda,sdb).. Is this true? Do i
need devfs to ensure that i always have the same disk naming, or will
LVM handle this for me? I am currently using scsidev for naming
purposes, but have found that vgcreate will not work with scsidev device
names (/dev/scsi/sdh0-0c0i4l2p1)
/dev/scsi/sd(host=0,scsiid=4,LUN=2,partition #=1)
..
Thanks,
--
Matt Schillinger
mschilli@vss.fsi.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [linux-lvm] disk naming
2003-01-03 10:02 [linux-lvm] disk naming Matt Schillinger
@ 2003-01-03 10:45 ` Goetz Bock
2003-01-03 10:59 ` Matt Schillinger
2003-01-03 12:21 ` Steven Lembark
1 sibling, 1 reply; 15+ messages in thread
From: Goetz Bock @ 2003-01-03 10:45 UTC (permalink / raw)
To: linux-lvm
On Fri, Jan 03 '03 at 10:08, Matt Schillinger wrote:
> this should be a simple question, but I can't find a direct discussion
> in the lvm documentation. I believe that i have found that LVM will find
> appropriate PV's regardless of their name (sda,sdb).. Is this true?
Kind of. When you created (maybe even just used) a PV/VG with DEVFS it
will only work with devfs.
IIRC when you compile DEVFS into the kernel, but do not mount it, you
can create PVs, but createvg will not find them unless you mount devfs.
> Do i need devfs to ensure that i always have the same disk naming, or
> will LVM handle this for me?
devfs does not ensure you have the same names.
> I am currently using scsidev for naming purposes, but have found that
> vgcreate will not work with scsidev device names
> (/dev/scsi/sdh0-0c0i4l2p1)
> /dev/scsi/sd(host=0,scsiid=4,LUN=2,partition #=1)
Most likely the userspace tools do not search the /dev/scsi/sdxxx
devices for PV signatrue. IIRC there is one file where you can add them.
It's in tools/lib/lvm_check_partitioned_dev.c but I've no idea how to
add your devices.
--
Goetz Bock (c) 2002 as blacknet.de - Munich - Germany /"\
IT Consultant GNU FDL 1.1 secure mobile Linux everNETting \ /
X
ASCII Ribbon Campaign against HTML email & microsoft attachments / \
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [linux-lvm] disk naming
2003-01-03 10:45 ` Goetz Bock
@ 2003-01-03 10:59 ` Matt Schillinger
2003-01-03 11:03 ` Patrick Caulfield
2003-01-03 12:30 ` Steven Lembark
0 siblings, 2 replies; 15+ messages in thread
From: Matt Schillinger @ 2003-01-03 10:59 UTC (permalink / raw)
To: linux-lvm
If i'm NOT using devfs, can i reliably (assuming that disks are on the
same scsi id/lun/host channel) use lvm?
Scenario:
LV is created with device /dev/sdd, which is on host channel 2
Machine is shutdown, and a new raid is connected on host channel 1, with
one disk.
Machine is restarted, and the 1 disk on the host channel 1 raid takes
/dev/sdd. The original disk is now /dev/sde.
Will LVM find the correct disk?
Matt Schillinger
mschilli@vss.fsi.com
On Fri, 2003-01-03 at 10:46, Goetz Bock wrote:
>
> On Fri, Jan 03 '03 at 10:08, Matt Schillinger wrote:
> > this should be a simple question, but I can't find a direct discussion
> > in the lvm documentation. I believe that i have found that LVM will find
> > appropriate PV's regardless of their name (sda,sdb).. Is this true?
> Kind of. When you created (maybe even just used) a PV/VG with DEVFS it
> will only work with devfs.
> IIRC when you compile DEVFS into the kernel, but do not mount it, you
> can create PVs, but createvg will not find them unless you mount devfs.
>
> > Do i need devfs to ensure that i always have the same disk naming, or
> > will LVM handle this for me?
> devfs does not ensure you have the same names.
>
> > I am currently using scsidev for naming purposes, but have found that
> > vgcreate will not work with scsidev device names
> > (/dev/scsi/sdh0-0c0i4l2p1)
> > /dev/scsi/sd(host=0,scsiid=4,LUN=2,partition #=1)
> Most likely the userspace tools do not search the /dev/scsi/sdxxx
> devices for PV signatrue. IIRC there is one file where you can add them.
> It's in tools/lib/lvm_check_partitioned_dev.c but I've no idea how to
> add your devices.
> --
> Goetz Bock (c) 2002 as blacknet.de - Munich - Germany /"\
> IT Consultant GNU FDL 1.1 secure mobile Linux everNETting \ /
> X
> ASCII Ribbon Campaign against HTML email & microsoft attachments / \
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
--
Matt Schillinger
System Administrator
FlightSafety International
mschilli@vss.fsi.com
314-551-8403
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [linux-lvm] disk naming
2003-01-03 10:59 ` Matt Schillinger
@ 2003-01-03 11:03 ` Patrick Caulfield
2003-01-03 12:53 ` Matt Schillinger
2003-01-03 12:30 ` Steven Lembark
1 sibling, 1 reply; 15+ messages in thread
From: Patrick Caulfield @ 2003-01-03 11:03 UTC (permalink / raw)
To: linux-lvm
On Fri, Jan 03, 2003 at 11:05:00AM -0600, Matt Schillinger wrote:
> If i'm NOT using devfs, can i reliably (assuming that disks are on the
> same scsi id/lun/host channel) use lvm?
>
> Scenario:
>
> LV is created with device /dev/sdd, which is on host channel 2
>
> Machine is shutdown, and a new raid is connected on host channel 1, with
> one disk.
>
> Machine is restarted, and the 1 disk on the host channel 1 raid takes
> /dev/sdd. The original disk is now /dev/sde.
>
> Will LVM find the correct disk?
>
Yes, that'll work fine. Getting LVM to work with those scsidev names
you mentioned in the first email will be quite a lot harder
(unless you use LVM2).
patrick
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [linux-lvm] disk naming
2003-01-03 11:03 ` Patrick Caulfield
@ 2003-01-03 12:53 ` Matt Schillinger
2003-01-03 13:12 ` Steven Lembark
0 siblings, 1 reply; 15+ messages in thread
From: Matt Schillinger @ 2003-01-03 12:53 UTC (permalink / raw)
To: linux-lvm
Patrick,
I was wondering if you could explain a little bit of how lvm finds a
device that no longer corresponds to the same 'dev/sd*' name. does it
use some kind of device id or serial number? I just want to be doubly
sure, as Steven Lembark claimed that it WOULDN't work..
Thanks,
Matt Schillinger
mschilli@vss.fsi.com
On Fri, 2003-01-03 at 11:03, Patrick Caulfield wrote:
> On Fri, Jan 03, 2003 at 11:05:00AM -0600, Matt Schillinger wrote:
> > If i'm NOT using devfs, can i reliably (assuming that disks are on the
> > same scsi id/lun/host channel) use lvm?
> >
> > Scenario:
> >
> > LV is created with device /dev/sdd, which is on host channel 2
> >
> > Machine is shutdown, and a new raid is connected on host channel 1, with
> > one disk.
> >
> > Machine is restarted, and the 1 disk on the host channel 1 raid takes
> > /dev/sdd. The original disk is now /dev/sde.
> >
> > Will LVM find the correct disk?
> >
>
> Yes, that'll work fine. Getting LVM to work with those scsidev names
> you mentioned in the first email will be quite a lot harder
> (unless you use LVM2).
>
> patrick
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
--
Matt Schillinger
System Administrator
FlightSafety International
mschilli@vss.fsi.com
314-551-8403
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [linux-lvm] disk naming
2003-01-03 12:53 ` Matt Schillinger
@ 2003-01-03 13:12 ` Steven Lembark
0 siblings, 0 replies; 15+ messages in thread
From: Steven Lembark @ 2003-01-03 13:12 UTC (permalink / raw)
To: linux-lvm
-- Matt Schillinger <mschilli@vss.fsi.com>
> Patrick,
>
> I was wondering if you could explain a little bit of how lvm finds a
> device that no longer corresponds to the same 'dev/sd*' name. does it
> use some kind of device id or serial number? I just want to be doubly
> sure, as Steven Lembark claimed that it WOULDN't work..
LVM is going to look for, say, /dev/sda1. If the device
at that location in your disk chain is not a PV then you
will have problems. The "sda1" string say to access the
first scsi drive that was put on line. Depending on
controller issues you may get into situations where the
SCSI initiators come on line in a random order and you
have no way of knowing what "sda1" really means. The
fix there is to install one of them as a module and only
bring on line the controller with your boot drive on it
at first.
--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647
+1 8773 252 1080
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [linux-lvm] disk naming
2003-01-03 10:59 ` Matt Schillinger
2003-01-03 11:03 ` Patrick Caulfield
@ 2003-01-03 12:30 ` Steven Lembark
2003-01-03 13:20 ` Patrick Caulfield
1 sibling, 1 reply; 15+ messages in thread
From: Steven Lembark @ 2003-01-03 12:30 UTC (permalink / raw)
To: linux-lvm
-- Matt Schillinger <mschilli@vss.fsi.com>
> If i'm NOT using devfs, can i reliably (assuming that disks are on the
> same scsi id/lun/host channel) use lvm?
>
> Scenario:
>
> LV is created with device /dev/sdd, which is on host channel 2
>
> Machine is shutdown, and a new raid is connected on host channel 1, with
> one disk.
>
> Machine is restarted, and the 1 disk on the host channel 1 raid takes
> /dev/sdd. The original disk is now /dev/sde.
>
> Will LVM find the correct disk?
Nope. Main issue there is that the first disk device
encountered by the kernel will be /dev/sda. Period.
This is the same catagory of problem you get into
with DOS when adding a new drive displaces the "D:"
partition on your first drive.
There are a few fixes for this:
1. Install the non-root drives' controller as a
module and add /etc/rc.d/init.d/otherscsi
to install the extra controller's module. At
that point you are guaranteed not to find the
RAID before you want to.
2. Devfs will solve this particular problem since
the /dev/type/bus/target/item list has not changed.
What will break devfs is adding a new controller
on the PCI bus in a way that displaces your
existing controler as, say, /dev/scsi/bus0.
--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647
+1 8773 252 1080
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [linux-lvm] disk naming
2003-01-03 12:30 ` Steven Lembark
@ 2003-01-03 13:20 ` Patrick Caulfield
2003-01-04 1:09 ` Steven Lembark
0 siblings, 1 reply; 15+ messages in thread
From: Patrick Caulfield @ 2003-01-03 13:20 UTC (permalink / raw)
To: linux-lvm
On Fri, Jan 03, 2003 at 12:38:45PM -0600, Steven Lembark wrote:
>
>
> -- Matt Schillinger <mschilli@vss.fsi.com>
>
> >If i'm NOT using devfs, can i reliably (assuming that disks are on the
> >same scsi id/lun/host channel) use lvm?
> >
> >Scenario:
> >
> >LV is created with device /dev/sdd, which is on host channel 2
> >
> >Machine is shutdown, and a new raid is connected on host channel 1, with
> >one disk.
> >
> >Machine is restarted, and the 1 disk on the host channel 1 raid takes
> >/dev/sdd. The original disk is now /dev/sde.
> >
> >Will LVM find the correct disk?
>
> Nope. Main issue there is that the first disk device
> encountered by the kernel will be /dev/sda. Period.
NOPE, NOPE, NOPE.
LVM writes a UUID to each disk and uses that as the PV identifier. it does NOT
matter what it is called to the kernel. (as long as the device actually visible
to the code).*
I regularly plug and unplug disks around LVM systems and it works just fine.
patrick
* by which I mean it's a "known device" and not some new device that hasn't been
coded for in LVM (eg i2o block devs). This particular restriction is lifted in LVM2.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [linux-lvm] disk naming
2003-01-03 13:20 ` Patrick Caulfield
@ 2003-01-04 1:09 ` Steven Lembark
2003-01-04 3:59 ` Patrick Caulfield
0 siblings, 1 reply; 15+ messages in thread
From: Steven Lembark @ 2003-01-04 1:09 UTC (permalink / raw)
To: linux-lvm
> NOPE, NOPE, NOPE.
>
> LVM writes a UUID to each disk and uses that as the PV identifier. it
> does NOT matter what it is called to the kernel. (as long as the device
> actually visible to the code).*
>
> I regularly plug and unplug disks around LVM systems and it works just
> fine.
And you move the SCSI cards around so that their bus
addresses are changed w/o having any effect on LVM?
--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647
+1 8773 252 1080
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [linux-lvm] disk naming
2003-01-04 1:09 ` Steven Lembark
@ 2003-01-04 3:59 ` Patrick Caulfield
2003-01-04 12:27 ` Steven Lembark
0 siblings, 1 reply; 15+ messages in thread
From: Patrick Caulfield @ 2003-01-04 3:59 UTC (permalink / raw)
To: linux-lvm
On Sat, Jan 04, 2003 at 01:17:43AM -0600, Steven Lembark wrote:
>
> >NOPE, NOPE, NOPE.
> >
> >LVM writes a UUID to each disk and uses that as the PV identifier. it
> >does NOT matter what it is called to the kernel. (as long as the device
> >actually visible to the code).*
> >
> >I regularly plug and unplug disks around LVM systems and it works just
> >fine.
>
> And you move the SCSI cards around so that their bus
> addresses are changed w/o having any effect on LVM?
No, but that makes no difference either. Linux allocates the first disk as sda
and the second as sdb regardless of whether they are on the same controller or
not.
LVM uses the UUID to identify PVs, NOT major/minor numbers or names (didn't I
just say that?)
--
patrick
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [linux-lvm] disk naming
2003-01-04 3:59 ` Patrick Caulfield
@ 2003-01-04 12:27 ` Steven Lembark
2003-01-04 12:40 ` Theo Van Dinter
2003-01-04 13:55 ` Patrick Caulfield
0 siblings, 2 replies; 15+ messages in thread
From: Steven Lembark @ 2003-01-04 12:27 UTC (permalink / raw)
To: linux-lvm
-- Patrick Caulfield <caulfield@sistina.com>
> On Sat, Jan 04, 2003 at 01:17:43AM -0600, Steven Lembark wrote:
>>
>> > NOPE, NOPE, NOPE.
>> >
>> > LVM writes a UUID to each disk and uses that as the PV identifier. it
>> > does NOT matter what it is called to the kernel. (as long as the device
>> > actually visible to the code).*
>> >
>> > I regularly plug and unplug disks around LVM systems and it works just
>> > fine.
>>
>> And you move the SCSI cards around so that their bus
>> addresses are changed w/o having any effect on LVM?
>
> No, but that makes no difference either. Linux allocates the first disk
> as sda and the second as sdb regardless of whether they are on the same
> controller or not.
>
> LVM uses the UUID to identify PVs, NOT major/minor numbers or names
> (didn't I just say that?)
But if you switch two scsi controllers around it can leave
one booted befre the other. You then end up with "sda" being
the first disk on another scsi chain. I have seen this happen
when people strip a machine and don't re-assemble the cards
in the same order -- or do and the bus is reverse-ordered on
the new system.
You can also have problems if devices on one scsi chain
has devices on it that will sometimes slow down the card's
bus scan. This shows up as machines that don't boot if
there is media in one device. The card takes longer to
init itself, the other card comes online first, and you
have a reversal of bus0 and bus1.
Since the second card is frequently a different make or
model it usually works to have that one as a module and
insmod it in the rc.sysinit or SVR4 files. At that point
you are guaranteed of getting the right card online first.
Try this on a system with two scsi cards and you'll see what
I mean: without changing anything else, switch which of the
cards the two disk chains connect to (i.e., disks on bus0
are now on bus1). Reboot the machine and see if it will boot
successfully.
The UUID is bus specific.
--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647
+1 8773 252 1080
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [linux-lvm] disk naming
2003-01-04 12:27 ` Steven Lembark
@ 2003-01-04 12:40 ` Theo Van Dinter
2003-01-04 13:55 ` Patrick Caulfield
1 sibling, 0 replies; 15+ messages in thread
From: Theo Van Dinter @ 2003-01-04 12:40 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 663 bytes --]
On Sat, Jan 04, 2003 at 12:35:20PM -0600, Steven Lembark wrote:
> Try this on a system with two scsi cards and you'll see what
> I mean: without changing anything else, switch which of the
> cards the two disk chains connect to (i.e., disks on bus0
> are now on bus1). Reboot the machine and see if it will boot
> successfully.
You're arguing about something different. Will LVM work if you move disks
around? Yes. Will the box boot if you move disks around? Depends if
you setup the box to do that. Booting has nothing to do with LVM.
--
Randomly Generated Tagline:
"Ever heard of .cshrc?
That's a city in Bosnia. Right?" - Unknown
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [linux-lvm] disk naming
2003-01-04 12:27 ` Steven Lembark
2003-01-04 12:40 ` Theo Van Dinter
@ 2003-01-04 13:55 ` Patrick Caulfield
2003-01-08 10:28 ` Matt Schillinger
1 sibling, 1 reply; 15+ messages in thread
From: Patrick Caulfield @ 2003-01-04 13:55 UTC (permalink / raw)
To: linux-lvm
On Sat, Jan 04, 2003 at 12:35:20PM -0600, Steven Lembark wrote:
>
>
>
> Try this on a system with two scsi cards and you'll see what
> I mean: without changing anything else, switch which of the
> cards the two disk chains connect to (i.e., disks on bus0
> are now on bus1). Reboot the machine and see if it will boot
> successfully.
>
> The UUID is bus specific.
No.
LVM puts it's OWN UUID on the disk. nothing to do with anybody elses UUID. It
travels with the disk and has nothing to do with where the disk is. Even if it's
over an NBD connection to another machine, LVM will find it and it will work.
Patrick
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [linux-lvm] disk naming
2003-01-04 13:55 ` Patrick Caulfield
@ 2003-01-08 10:28 ` Matt Schillinger
0 siblings, 0 replies; 15+ messages in thread
From: Matt Schillinger @ 2003-01-08 10:28 UTC (permalink / raw)
To: linux-lvm
I have another scenario... If I have 1 volume setup
(/dev/test_vg/testlv1) and mounted on say, /mnt.
The disk is connected via scsi host channel 0, scsi id 4, and lun 0.
If i umount /mnt,
move the scsi disk to host channel 1,
Then run rescan-scsi-bus.sh 1, it should scan the scsi bus on host
channel 1, then find the scsi disk.
is there a way to make lvm see the new disk in a way that is mountable?
I have done the previous, but i see in /proc/lvm/global, that each VG is
associated with PV devices (/dev/sda1, etc). Is there a way that lvm can
rescan and reassociate VGs to new PV devices? (as in the disk on the
host channel 1 is added in as /dev/sdd).. If i reboot, this is no
problem to register things, but I am wonder if it is possible to do the
task without a reboot..
Thanks,
Matt Schillinger
mschilli@vss.fsi.com
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [linux-lvm] disk naming
2003-01-03 10:02 [linux-lvm] disk naming Matt Schillinger
2003-01-03 10:45 ` Goetz Bock
@ 2003-01-03 12:21 ` Steven Lembark
1 sibling, 0 replies; 15+ messages in thread
From: Steven Lembark @ 2003-01-03 12:21 UTC (permalink / raw)
To: linux-lvm
-- Matt Schillinger <mschilli@vss.fsi.com>
>
> this should be a simple question, but I can't find a direct discussion
> in the lvm documentation. I believe that i have found that LVM will find
> appropriate PV's regardless of their name (sda,sdb).. Is this true? Do i
> need devfs to ensure that i always have the same disk naming, or will
> LVM handle this for me? I am currently using scsidev for naming
> purposes, but have found that vgcreate will not work with scsidev device
> names (/dev/scsi/sdh0-0c0i4l2p1)
> /dev/scsi/sd(host=0,scsiid=4,LUN=2,partition #=1)
sd[abcd] notation is based on the order which the kernel
finds devices on the bus. Adding a SCSI card or removing
disks will change the naming.
devfs allows using /dev/scsi/.../busX/.../targetY/.../partZ,
which will not change unless you shuffle the scsi cards :-)
I use it mainly because I prefer to know what I'm pointing
at -- memorizing the device letter conventions can be an
exercise in futility.
You can quickly convert from one naming convention to
the other if your root volume isn't on LVM: boot single
user, export the VG's and import them using the devfs
naming convention.
-
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647
+1 773 252 1080
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2003-01-08 10:28 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-03 10:02 [linux-lvm] disk naming Matt Schillinger
2003-01-03 10:45 ` Goetz Bock
2003-01-03 10:59 ` Matt Schillinger
2003-01-03 11:03 ` Patrick Caulfield
2003-01-03 12:53 ` Matt Schillinger
2003-01-03 13:12 ` Steven Lembark
2003-01-03 12:30 ` Steven Lembark
2003-01-03 13:20 ` Patrick Caulfield
2003-01-04 1:09 ` Steven Lembark
2003-01-04 3:59 ` Patrick Caulfield
2003-01-04 12:27 ` Steven Lembark
2003-01-04 12:40 ` Theo Van Dinter
2003-01-04 13:55 ` Patrick Caulfield
2003-01-08 10:28 ` Matt Schillinger
2003-01-03 12:21 ` Steven Lembark
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.