All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] lvm and md
@ 2003-03-20  3:36 Rocky Lee
  2003-03-20  4:04 ` jon+lvm
  0 siblings, 1 reply; 16+ messages in thread
From: Rocky Lee @ 2003-03-20  3:36 UTC (permalink / raw)
  To: linux-lvm

Dear all
 
 I have another question with LVM + MD.
 
 After I made a LVM on top of MD.
 
 If I lost the raidtab file and reboot  
 can MD and LVM automatic recognize them ?
 
or 
If I change those disks to other machine and boot .
can new system recognize them without original raidtab file?

Thank you
 
Have a nice day
Rocky Lee
 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] lvm and md
  2003-03-20  3:36 [linux-lvm] lvm and md Rocky Lee
@ 2003-03-20  4:04 ` jon+lvm
  0 siblings, 0 replies; 16+ messages in thread
From: jon+lvm @ 2003-03-20  4:04 UTC (permalink / raw)
  To: linux-lvm

On Thu, Mar 20, 2003 at 05:36:44PM +0800, Rocky Lee wrote:
> Dear all
>  
>  I have another question with LVM + MD.
>  
>  After I made a LVM on top of MD.
>  
>  If I lost the raidtab file and reboot  
>  can MD and LVM automatic recognize them ?
>  
> or 
> If I change those disks to other machine and boot .
> can new system recognize them without original raidtab file?

Did you use the trick by changing the partitions to linux raid
autodetect ?

To my knowledge most of your questions are answered in the
howto's. See 
www.tldp.org
for software raid howto, and LVM howto



JonB

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] lvm and md
  2003-03-20 19:45 Rocky Lee
  2003-03-21  2:22 ` jon+lvm
@ 2003-03-21  9:54 ` Dale J. Stephenson
  1 sibling, 0 replies; 16+ messages in thread
From: Dale J. Stephenson @ 2003-03-21  9:54 UTC (permalink / raw)
  To: linux-lvm

On Thursday, March 20, 2003, at 08:45  PM, Rocky Lee wrote:
> I've set the
> "persistent_superbit  1"  in raidtab
> all disk partition type were also all " raid auto detect"
>
> then if I delete the original raidtab file and reboot.
> the system couldn't find the raid device, the LVM coundn't find the 
> volume
> either.
> does md have to depend on the raidtab file?
>
Did you change the persistent_superbit in raidtab before creating the 
RAID?  If not, it didn't get written to the RAID superblock stored 
inside the partitions
used for the RAID -- and that's where it must be for raid autodetect to 
work.
Autodetect doesn't use raidtab -- the only thing that uses raidtab are 
the
raidtools themselves.

You might want to consider using mdadm instead of raidtools.

Dale J. Stephenson
dalestephenson@mac.com

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] lvm and md
  2003-03-20 19:45 Rocky Lee
@ 2003-03-21  2:22 ` jon+lvm
  2003-03-21  9:54 ` Dale J. Stephenson
  1 sibling, 0 replies; 16+ messages in thread
From: jon+lvm @ 2003-03-21  2:22 UTC (permalink / raw)
  To: linux-lvm

On Fri, Mar 21, 2003 at 09:45:47AM +0800, Rocky Lee wrote:
> > Did you use the trick by changing the partitions to
> > linux raid
> > autodetect ?
> 
> >To my knowledge most of your questions are >answered in the
> >howto's. See
> >www.tldp.org
> >for software raid howto, and LVM howto
> 
> Hi JonB
> 
> I've set the
> "persistent_superbit  1"  in raidtab
> all disk partition type were also all " raid auto detect"
> 
> then if I delete the original raidtab file and reboot.
> the system couldn't find the raid device, the LVM coundn't find the volume
> either.
> does md have to depend on the raidtab file?

Thats not how i remember the HOWTO. Maybe it just needs a raidtab file.

Which linux distribution are you running ?



JonB

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [linux-lvm] lvm and md
@ 2003-03-20 19:45 Rocky Lee
  2003-03-21  2:22 ` jon+lvm
  2003-03-21  9:54 ` Dale J. Stephenson
  0 siblings, 2 replies; 16+ messages in thread
From: Rocky Lee @ 2003-03-20 19:45 UTC (permalink / raw)
  To: linux-lvm

> Did you use the trick by changing the partitions to
> linux raid
> autodetect ?

>To my knowledge most of your questions are >answered in the
>howto's. See
>www.tldp.org
>for software raid howto, and LVM howto

Hi JonB

I've set the
"persistent_superbit  1"  in raidtab
all disk partition type were also all " raid auto detect"

then if I delete the original raidtab file and reboot.
the system couldn't find the raid device, the LVM coundn't find the volume
either.
does md have to depend on the raidtab file?

Rocky Lee

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [linux-lvm] lvm and md
@ 2003-03-10  6:57 Rechenberg, Andrew
  0 siblings, 0 replies; 16+ messages in thread
From: Rechenberg, Andrew @ 2003-03-10  6:57 UTC (permalink / raw)
  To: linux-lvm

Someone please correct me if I'm wrong, but I believe mdadm can start
the arrays based on the RAID superblock UUID.  So even if the device
name changes it still knows which partition belongs to which md device.


Mdadm is an alternative software RAID management utility.  It is very
nice.  Check it out at http://www.cse.unsw.edu.au/~neilb/source/mdadm/

Hope this helps,
Andy.

-----Original Message-----
From: Jon Bendtsen [mailto:jon+lvm@silicide.dk] 
Sent: Monday, March 10, 2003 4:50 AM
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] lvm and md


Peter Yao wrote:
> 
> Jon Bendtsen wrote:
> > Peter Yao wrote:
> >
> >>Should we build lvm volumns on top of soft raid(md) or build md on 
> >>top of lvm volumns? I prefer to build md on top of lvm volumns 
> >>because lvm can hide the hardware details from md. Just want to know

> >>how do you think about this. Or any URLs? Thanks.
> >
> >
> > why would you need to hide the hardware details from md ?
> I am using some hot-plugging disks and their device number may change 
> after reboot. For example, if i build md with /dev/sda and /dev/sdb, 
> after reboot md may cannot start because the two disks' device name 
> change to /dev/sdc and /dev/sdd. If i build md on top of lvm this 
> problem is avoided. Can you give me some advice for this issue?

sure. Dont change device names ;-D

Perhaps you can use labels ? and label the partitions ?

Another thing is that i dont think the kernel uses /etc/raidtab i think
it looks at the partitions and then starts the md. You 
can set the partition type to raid autodetect. Then it might work even
if you change the partition names.


JonB

_______________________________________________
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/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] lvm and md
  2003-03-09 19:35   ` Peter Yao
  2003-03-10  2:05     ` Luca Berra
  2003-03-10  3:05     ` William Blunn
@ 2003-03-10  3:50     ` Jon Bendtsen
  2 siblings, 0 replies; 16+ messages in thread
From: Jon Bendtsen @ 2003-03-10  3:50 UTC (permalink / raw)
  To: linux-lvm

Peter Yao wrote:
> 
> Jon Bendtsen wrote:
> > Peter Yao wrote:
> >
> >>Should we build lvm volumns on top of soft raid(md) or build md on top
> >>of lvm volumns?
> >>I prefer to build md on top of lvm volumns because lvm can hide the
> >>hardware details from md. Just want to know how do you think about this.
> >>Or any URLs? Thanks.
> >
> >
> > why would you need to hide the hardware details from md ?
> I am using some hot-plugging disks and their device number may change
> after reboot. For example, if i build md with /dev/sda and /dev/sdb,
> after reboot md may cannot start because the two disks' device name
> change to /dev/sdc and /dev/sdd. If i build md on top of lvm this
> problem is avoided. Can you give me some advice for this issue?

sure. Dont change device names ;-D

Perhaps you can use labels ? and label the partitions ?

Another thing is that i dont think the kernel uses /etc/raidtab
i think it looks at the partitions and then starts the md. You 
can set the partition type to raid autodetect. Then it might work
even if you change the partition names.


JonB

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] lvm and md
  2003-03-10  3:05     ` William Blunn
@ 2003-03-10  3:29       ` William Blunn
  0 siblings, 0 replies; 16+ messages in thread
From: William Blunn @ 2003-03-10  3:29 UTC (permalink / raw)
  To: linux-lvm

> I don't think it would be a good idea to put MD on top of LVM for
> reasons of performance. Ideally you want as few layers as possible on
> top of the disk.

Putting MD on top of LVM puts in one extra layer.

This layer will have to be traversed for every single access to the
disk.

Actually having a layer is unnecessary.

All that is necessary is to connect the MD to the right disk device
at the beginning when the MD is being started.

The MD is then connected to the disk with no intervening layers.

> As an alternative to Luca Berra's suggestion to use mdadm,
> it might be possible to do what you want using devfs.

Both of these suggestions address the problem of getting the MD
connected to the right disk at the beginning, without adding an
intervening layer.

Bill

The contents of this e-mail and any attachments are confidential and may
be legally privileged. If you have received this e-mail and you are not
a named addressee, please inform us as soon as possible on
+44 118 901 2999 and then delete the e-mail from your system. If you are
not a named addressee you must not copy, use, disclose, distribute,
print or rely on this e-mail. Any views expressed in this e-mail or any
attachments may not necessarily reflect those of Tao's management.
Although we routinely screen for viruses, addressees should scan this
e-mail and any attachments for viruses. Tao makes no representation or
warranty as to the absence of viruses in this e-mail or any attachments.
Please note that for the protection of our business, we may monitor and
read e-mails sent to and from our server(s).

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] lvm and md
  2003-03-09 19:35   ` Peter Yao
  2003-03-10  2:05     ` Luca Berra
@ 2003-03-10  3:05     ` William Blunn
  2003-03-10  3:29       ` William Blunn
  2003-03-10  3:50     ` Jon Bendtsen
  2 siblings, 1 reply; 16+ messages in thread
From: William Blunn @ 2003-03-10  3:05 UTC (permalink / raw)
  To: linux-lvm

Peter Yao <peter@exavio.com.cn> wrote:
> I am using some hot-plugging disks and their device number may change 
> after reboot. For example, if i build md with /dev/sda and /dev/sdb, 
> after reboot md may cannot start because the two disks' device name 
> change to /dev/sdc and /dev/sdd. If i build md on top of lvm this 
> problem is avoided. Can you give me some advice for this issue?

I don't think it would be a good idea to put MD on top of LVM for
reasons of performance. Ideally you want as few layers as possible on
top of the disk.

As an alternative to Luca Berra's suggestion to use mdadm,
it might be possible to do what you want using devfs.

I'm not saying it's a better approach, just a possible alternative. The
best approach will depend on your particular situation.

(The mdadm approach looks like a good technical solution to your
situation. However, for example, you may already have devfs installed,
in which case it might be easier to set up and "good enough" to be going
on with.)

I have never used devfs myself, by from what I can tell it gives logical
names to SCSI devices, which are invariant of devices being added to
or removed from a SCSI bus.

So your HDDs would appear as something like:

  /dev/scsi/host0/bus0/target5/lun0/disc
  /dev/scsi/host0/bus0/target6/lun0/disc

You mention that /dev/sda and /dev/sdb are sometimes displaced to
/dev/sdc and /dev/sdd.

What are the two devices which are displacing /dev/sdc and /dev/sdd ?

Regards,

Bill

The contents of this e-mail and any attachments are confidential and may
be legally privileged. If you have received this e-mail and you are not
a named addressee, please inform us as soon as possible on
+44 118 901 2999 and then delete the e-mail from your system. If you are
not a named addressee you must not copy, use, disclose, distribute,
print or rely on this e-mail. Any views expressed in this e-mail or any
attachments may not necessarily reflect those of Tao's management.
Although we routinely screen for viruses, addressees should scan this
e-mail and any attachments for viruses. Tao makes no representation or
warranty as to the absence of viruses in this e-mail or any attachments.
Please note that for the protection of our business, we may monitor and
read e-mails sent to and from our server(s).

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] lvm and md
  2003-03-09 19:35   ` Peter Yao
@ 2003-03-10  2:05     ` Luca Berra
  2003-03-10  3:05     ` William Blunn
  2003-03-10  3:50     ` Jon Bendtsen
  2 siblings, 0 replies; 16+ messages in thread
From: Luca Berra @ 2003-03-10  2:05 UTC (permalink / raw)
  To: linux-lvm

Peter Yao wrote:
>> why would you need to hide the hardware details from md ?
> 
> I am using some hot-plugging disks and their device number may change 
> after reboot. For example, if i build md with /dev/sda and /dev/sdb, 
> after reboot md may cannot start because the two disks' device name 
> change to /dev/sdc and /dev/sdd. If i build md on top of lvm this 
> problem is avoided. Can you give me some advice for this issue?

it depends on what you use to start your md devices, using raidstart 
with an /etc/raidtab file shows this behaviour, using auto-detect does 
not but is only available at boot. best thing would be to use mdadm 
instead of raidstart

http://www.cse.unsw.edu.au/~neilb/source/mdadm

with this you can define your raid arrays based on UUID instead.

to create mdadm conf file use:

echo "DEVICE partitions" >> /etc/mdadm.conf
mdadm -E -s |grep ARRAY >>  /etc/mdadm.conf

-- 
Luca Berra -- bluca@comedia.it
  /"\
  \ /     ASCII RIBBON CAMPAIGN
   X        AGAINST HTML MAIL
  / \

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] lvm and md
  2003-03-07  9:42 ` Jon Bendtsen
@ 2003-03-09 19:35   ` Peter Yao
  2003-03-10  2:05     ` Luca Berra
                       ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Peter Yao @ 2003-03-09 19:35 UTC (permalink / raw)
  To: linux-lvm

Jon Bendtsen wrote:
> Peter Yao wrote:
> 
>>Should we build lvm volumns on top of soft raid(md) or build md on top
>>of lvm volumns?
>>I prefer to build md on top of lvm volumns because lvm can hide the
>>hardware details from md. Just want to know how do you think about this.
>>Or any URLs? Thanks.
> 
> 
> why would you need to hide the hardware details from md ?
I am using some hot-plugging disks and their device number may change 
after reboot. For example, if i build md with /dev/sda and /dev/sdb, 
after reboot md may cannot start because the two disks' device name 
change to /dev/sdc and /dev/sdd. If i build md on top of lvm this 
problem is avoided. Can you give me some advice for this issue?

> The way i do it is to md 2 disks together into a pair, and
> then pvcreate it and add it to my VG. That way i can get 
> more and more disks into the system. I have thought about
> creating 2 VG's, and then run md ontop of that, but it's more
> work, as you would have to resize 2 LV's, and besides, a harddisk
> failure might trash one of your VG's. Meaning more repair work.
> 
> 
> 
> JonB
> 
> _______________________________________________
> 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/
> 
> 
> 


-- 
Peter Yao

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] lvm and md
  2003-03-07  8:01 Peter Yao
  2003-03-07  8:11 ` Heinz J . Mauelshagen
  2003-03-07  9:42 ` Jon Bendtsen
@ 2003-03-09 16:59 ` Stephan Austermuehle
  2 siblings, 0 replies; 16+ messages in thread
From: Stephan Austermuehle @ 2003-03-09 16:59 UTC (permalink / raw)
  To: linux-lvm

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

On Fri, Mar 07, 2003 at 10:29:07AM +0800, Peter Yao wrote:

> Should we build lvm volumns on top of soft raid(md) or build md on top 
> of lvm volumns?

I propose to use LVM on top of md because that way you have to deal with
one disk mirror only instead of several mirrors per LV.

Stephan

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] lvm and md
  2003-03-07  8:01 Peter Yao
  2003-03-07  8:11 ` Heinz J . Mauelshagen
@ 2003-03-07  9:42 ` Jon Bendtsen
  2003-03-09 19:35   ` Peter Yao
  2003-03-09 16:59 ` Stephan Austermuehle
  2 siblings, 1 reply; 16+ messages in thread
From: Jon Bendtsen @ 2003-03-07  9:42 UTC (permalink / raw)
  To: linux-lvm

Peter Yao wrote:
> 
> Should we build lvm volumns on top of soft raid(md) or build md on top
> of lvm volumns?
> I prefer to build md on top of lvm volumns because lvm can hide the
> hardware details from md. Just want to know how do you think about this.
> Or any URLs? Thanks.

why would you need to hide the hardware details from md ?
The way i do it is to md 2 disks together into a pair, and
then pvcreate it and add it to my VG. That way i can get 
more and more disks into the system. I have thought about
creating 2 VG's, and then run md ontop of that, but it's more
work, as you would have to resize 2 LV's, and besides, a harddisk
failure might trash one of your VG's. Meaning more repair work.



JonB

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] lvm and md
  2003-03-07  8:01 Peter Yao
@ 2003-03-07  8:11 ` Heinz J . Mauelshagen
  2003-03-07  9:42 ` Jon Bendtsen
  2003-03-09 16:59 ` Stephan Austermuehle
  2 siblings, 0 replies; 16+ messages in thread
From: Heinz J . Mauelshagen @ 2003-03-07  8:11 UTC (permalink / raw)
  To: linux-lvm

Peter,
both ways are fine depending on your priorities.

I'ld prefer to group disks together with MD for resilience (i.e RAID1)
and then use those as LVM physical volumes to have the flexibility to allocate
space to logical volumes online.

More convenient this way rather than changing raidtabs which cause interruptions
to your volumes on size changes.

Because a core feature of LVM is to resize logical volumes online, the given
resizing capabilities of filesystems (i.e. reiser, xfs) allow you to
grow the filesystem online as well.


On Fri, Mar 07, 2003 at 10:29:07AM +0800, Peter Yao wrote:
> Should we build lvm volumns on top of soft raid(md) or build md on top 
> of lvm volumns?
> I prefer to build md on top of lvm volumns because lvm can hide the 
> hardware details from md. Just want to know how do you think about this.
> Or any URLs? Thanks.
> -- 
> Peter Yao
> 
> 
> _______________________________________________
> 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/

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Sistina Software Inc.
Senior Consultant/Developer                       Am Sonnenhang 11
                                                  56242 Marienrachdorf
                                                  Germany
Mauelshagen@Sistina.com                           +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [linux-lvm] lvm and md
@ 2003-03-07  8:09 Koch, Steffen
  0 siblings, 0 replies; 16+ messages in thread
From: Koch, Steffen @ 2003-03-07  8:09 UTC (permalink / raw)
  To: 'linux-lvm@sistina.com'

> Should we build lvm volumns on top of soft raid(md) or build 
> md on top of lvm volumns?
> I prefer to build md on top of lvm volumns because lvm can hide the 
> hardware details from md. Just want to know how do you think 
> about this.
> Or any URLs? Thanks.

How do you achieve redundancy with this setup? How would you know on which
disks your LVs are when building the raid??

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [linux-lvm] lvm and md
@ 2003-03-07  8:01 Peter Yao
  2003-03-07  8:11 ` Heinz J . Mauelshagen
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Peter Yao @ 2003-03-07  8:01 UTC (permalink / raw)
  To: linux-lvm

Should we build lvm volumns on top of soft raid(md) or build md on top 
of lvm volumns?
I prefer to build md on top of lvm volumns because lvm can hide the 
hardware details from md. Just want to know how do you think about this.
Or any URLs? Thanks.
-- 
Peter Yao

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2003-03-21  9:54 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-20  3:36 [linux-lvm] lvm and md Rocky Lee
2003-03-20  4:04 ` jon+lvm
  -- strict thread matches above, loose matches on Subject: below --
2003-03-20 19:45 Rocky Lee
2003-03-21  2:22 ` jon+lvm
2003-03-21  9:54 ` Dale J. Stephenson
2003-03-10  6:57 Rechenberg, Andrew
2003-03-07  8:09 Koch, Steffen
2003-03-07  8:01 Peter Yao
2003-03-07  8:11 ` Heinz J . Mauelshagen
2003-03-07  9:42 ` Jon Bendtsen
2003-03-09 19:35   ` Peter Yao
2003-03-10  2:05     ` Luca Berra
2003-03-10  3:05     ` William Blunn
2003-03-10  3:29       ` William Blunn
2003-03-10  3:50     ` Jon Bendtsen
2003-03-09 16:59 ` Stephan Austermuehle

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.