LMV2 boot from another Volume Group?

2009-07-26 Thread Tony Nelson
I have two hard drives I want to boot from, each with its own LVM2 
Volume Group.  I can boot from the one on the same drive as Grub, but 
not from the other one.  Apparantly, only Logical Volumes from the boot 
drive's Volume Group are detected before / is mounted (something about 
"activation", perhaps?).  Googling only shows how to detect Volume 
Groups and activate Logical Volumes after / is mounted.  I can't find 
any kernel LVM parameters that would affect this (and I'd need the LVM 
stuff built-in to the kernel, not as a module).

Can Linux use a Volume Group that isn't on Grub's boot volume?

Must I add a boot partition on the second disk and chainload to it?

-- 

TonyN.:'   
  '  

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: LMV2 boot from another Volume Group?

2009-07-27 Thread Mikkel L. Ellertson
Tony Nelson wrote:
> I have two hard drives I want to boot from, each with its own LVM2 
> Volume Group.  I can boot from the one on the same drive as Grub, but 
> not from the other one.  Apparantly, only Logical Volumes from the boot 
> drive's Volume Group are detected before / is mounted (something about 
> "activation", perhaps?).  Googling only shows how to detect Volume 
> Groups and activate Logical Volumes after / is mounted.  I can't find 
> any kernel LVM parameters that would affect this (and I'd need the LVM 
> stuff built-in to the kernel, not as a module).
> 
> Can Linux use a Volume Group that isn't on Grub's boot volume?
> 
> Must I add a boot partition on the second disk and chainload to it?
> 
What do you mean by boot from each drive? Are you talking about
selecting what drive to boot from in the BIOS, or selecting what
drive is / by setting the root= in /boot/grub.conf?

Second question - do the two VGs have different names?

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!



signature.asc
Description: OpenPGP digital signature
-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Re: LMV2 boot from another Volume Group?

2009-07-27 Thread Aldo Foot
On Sun, Jul 26, 2009 at 8:40 PM, Tony
Nelson wrote:
> I have two hard drives I want to boot from, each with its own LVM2
> Volume Group.  I can boot from the one on the same drive as Grub, but
> not from the other one.  Apparantly, only Logical Volumes from the boot
> drive's Volume Group are detected before / is mounted (something about
> "activation", perhaps?).  Googling only shows how to detect Volume
> Groups and activate Logical Volumes after / is mounted.  I can't find
> any kernel LVM parameters that would affect this (and I'd need the LVM
> stuff built-in to the kernel, not as a module).
>
> Can Linux use a Volume Group that isn't on Grub's boot volume?
>
> Must I add a boot partition on the second disk and chainload to it?



Are you saying that you have /boot in a VG and you can boot from it?

Not sure what you mean by "activate". The LVs are treated like any other
partition with its filesystem that it's checked at boot time. There is
no "switch"
to turn LVs on and off, except for the entry in /etc/fstab that looks
for a device
to check and mount according to what you specify.

~af

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: LMV2 boot from another Volume Group?

2009-07-27 Thread Tony Nelson
On 09-07-27 13:08:33, Aldo Foot wrote:
> On Sun, Jul 26, 2009 at 8:40 PM, Tony
> Nelson wrote:
> > I have two hard drives I want to boot from, each with its own LVM2
> > Volume Group.  I can boot from the one on the same drive as Grub,
> > but not from the other one.  Apparantly, only Logical Volumes from 
> > the boot drive's Volume Group are detected before / is mounted 
> > (something about "activation", perhaps?).  Googling only shows how 
> > to detect Volume Groups and activate Logical Volumes after / is 
> > mounted.  I can't find any kernel LVM parameters that would affect 
> > this (and I'd need the LVM stuff built-in to the kernel, not as a 
> > module).
> >
> > Can Linux use a Volume Group that isn't on Grub's boot volume?
> >
> > Must I add a boot partition on the second disk and chainload to it?
> 
> 
> 
> Are you saying that you have /boot in a VG and you can boot from it?

No.

> Not sure what you mean by "activate". The LVs are treated like any
> other partition with its filesystem that it's checked at boot time. 
> There is no "switch" o turn LVs on and off, except for the entry in /
> etc/fstab that looks for a device to check and mount according to 
> what you specify.

This is wrong.  In order to use an LVM Logicial Volume, first a 
`vgscan` may be needed to make the Volume Groups known, and then the 
desired Logical Volumes must be Activated with `vgchange -ay`.  Only 
Available Logical Volumes can be mounted.

-- 

TonyN.:'   
  '  


-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: LMV2 boot from another Volume Group?

2009-07-27 Thread Tony Nelson
On 09-07-27 10:08:50, Mikkel L. Ellertson wrote:
> Tony Nelson wrote:
> > I have two hard drives I want to boot from, each with its own LVM2 
> > Volume Group.  I can boot from the one on the same drive as Grub,
> > but not from the other one.  Apparantly, only Logical Volumes from 
> > the boot drive's Volume Group are detected before / is mounted  
> > (something about"activation", perhaps?).  Googling only shows how  
> > to detect Volume Groups and activate Logical Volumes after / is 
> > mounted.  I can't find  any kernel LVM parameters that would affect 

> > this (and I'd need the LVM stuff built-in to the kernel, not as a 
> > module).
> > 
> > Can Linux use a Volume Group that isn't on Grub's boot volume?
> > 
> > Must I add a boot partition on the second disk and chainload to it?
> > 
> What do you mean by boot from each drive? Are you talking about
> selecting what drive to boot from in the BIOS, or selecting what
> drive is / by setting the root= in /boot/grub.conf?

Either way (with suitable changes to grub.conf).


> Second question - do the two VGs have different names?

Yes.

Even when the boot drive is set in the BIOS to be the drive containing 
the Volume Group to use, VolGroup01, all Volume Groups are recognized, 
and then VolGroup00's volumes are activated.  I see that nash has 
started.  In the initrd, the nash script "init" contains the offending 
settings.  I suppose I need to use mkinitrd to fix this, so that 
VolGroup01 (and also VolGroup00 which contains the swap partition) is 
activated.

(I'm baffled as to why `grep -rI nash .` in the unpacked initrd would 
cause endless spew of RETURN characters into any active window, as if 
from the keyboard, making the computer unusuable and also hard to 
reboot.  "-rIl" spews something else, maybe spaces, not quite as hard 
to reboot.)

-- 

TonyN.:'   
  '  



-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: LMV2 boot from another Volume Group?

2009-07-27 Thread Mikkel L. Ellertson
Tony Nelson wrote:
> On 09-07-27 10:08:50, Mikkel L. Ellertson wrote:
>> What do you mean by boot from each drive? Are you talking about
>> selecting what drive to boot from in the BIOS, or selecting what
>> drive is / by setting the root= in /boot/grub.conf?
> 
> Either way (with suitable changes to grub.conf).
> 
It gets a bit complicated because Grub uses the BIOS to access the
drives. To use the BIOS to select the drive to boot from, you need a
grub first stage on the MBR of both drives. But the first stage on
the second drive has to point to /boot on the first drive. The
things is, when you change the boot drive in the BIOS, the boot
drive becomes (hd0) and the original drive becomes (hd1). This can
be made to work, but you need to mount /boot from the first
installation in the second installation. It works much better to
have a /boot partition on the second drive. Please keep in mind that
the /boot partition can not be in an LVM.
> 
>> Second question - do the two VGs have different names?
> 
> Yes.
> 
> Even when the boot drive is set in the BIOS to be the drive containing 
> the Volume Group to use, VolGroup01, all Volume Groups are recognized, 
> and then VolGroup00's volumes are activated.  I see that nash has 
> started.  In the initrd, the nash script "init" contains the offending 
> settings.  I suppose I need to use mkinitrd to fix this, so that 
> VolGroup01 (and also VolGroup00 which contains the swap partition) is 
> activated.
> 
It would help to see /boot/grub/grub.conf - I suspect that is part
of the problem. If you run the Gnome desktop, you can run System -->
Administration --> Logical Volume Management for an easy way to
manage LVMs.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!



signature.asc
Description: OpenPGP digital signature
-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Re: LMV2 boot from another Volume Group?

2009-07-27 Thread Aldo Foot
On Mon, Jul 27, 2009 at 10:46 AM, Tony
Nelson wrote:
> On 09-07-27 13:08:33, Aldo Foot wrote:
>> Not sure what you mean by "activate". The LVs are treated like any
>> other partition with its filesystem that it's checked at boot time.
>> There is no "switch" o turn LVs on and off, except for the entry in /
>> etc/fstab that looks for a device to check and mount according to
>> what you specify.
>
> This is wrong.  In order to use an LVM Logicial Volume, first a
> `vgscan` may be needed to make the Volume Groups known, and then the
> desired Logical Volumes must be Activated with `vgchange -ay`.  Only
> Available Logical Volumes can be mounted.

I stand corrected. Vgchange will activate the LVs making them visible
or not to the kernel.

~af

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


[solved] Re: LMV2 boot from another Volume Group?

2009-07-28 Thread Tony Nelson
I'm back now, with an updated system.  In order to copy a system to a 
new disk and Volume Group, one needs, along with a fresh install of 
Grub, a new initrd with info from the new updated /etc/fstab.  It's not 
necessarily an LVM issue.


On 09-07-27 14:14:45, Mikkel L. Ellertson wrote:
> Tony Nelson wrote:
> > On 09-07-27 10:08:50, Mikkel L. Ellertson wrote:
> >> What do you mean by boot from each drive? Are you talking about
> >> selecting what drive to boot from in the BIOS, or selecting what
> >> drive is / by setting the root= in /boot/grub.conf?
> > 
> > Either way (with suitable changes to grub.conf).
> > 
> It gets a bit complicated because Grub uses the BIOS to access the
> drives. To use the BIOS to select the drive to boot from, you need a
> grub first stage on the MBR of both drives. But the first stage on
> the second drive has to point to /boot on the first drive. The
> things is, when you change the boot drive in the BIOS, the boot
> drive becomes (hd0) and the original drive becomes (hd1). This can
> be made to work, but you need to mount /boot from the first
> installation in the second installation. It works much better to
> have a /boot partition on the second drive. Please keep in mind that
> the /boot partition can not be in an LVM.

All this was fine, as booting had started (kernel loaded, initrd 
loaded).


> >> Second question - do the two VGs have different names?
> > 
> > Yes.
> > 
> > Even when the boot drive is set in the BIOS to be the drive 
> > containing the Volume Group to use, VolGroup01, all Volume Groups 
> > are recognized, and then VolGroup00's volumes are activated.  I see 
> > that nash has started.  In the initrd, the nash script "init"  
> > contains the offending settings.  I suppose I need to use mkinitrd  
> > to fix this, so that VolGroup01 (and also VolGroup00 which contains 
> > the swap partition) is activated.

Doing `mkinitrd -f /boot/initrd- ` 
fixed the problem.  Note that mkinitrd trusts /etc/inittab, so that had 
better be right.


> It would help to see /boot/grub/grub.conf - I suspect that is part
> of the problem. If you run the Gnome desktop, you can run System -->
> Administration --> Logical Volume Management for an easy way to
> manage LVMs.

None of that had anything to do with the problem.  As I mentioned 
previously, nash had started (so Grub was well out of the picture) and 
then not all needed Logical Volumes were activated.  I'd heard of nash, 
but had never known quite where it was in the boot process.  I'd never 
looked into the initrd either.

Thank you for your efforts.

-- 

TonyN.:'   
  '  


-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines