Discussion:
[linux-lvm] lvm2 conf on boot disk
Alfredo De Luca
2014-07-08 09:56:30 UTC
Permalink
Hi all.
I have red hat 5.7 with no lvm2 installed. Now I want to configure
lvm2 on the root and swap partition then later on adding a couple of
LUNs to create a VG
What's the best practice/procedure to install lvm2 on the boot disk?
Is it possible? I guess I have to run Linux CD in rescue mode

Regards
--
Alfredo
Jack Waterworth
2014-07-09 16:46:18 UTC
Permalink
There is no way to do an in-place convert from a partitioned device to
LVM without losing data. I would recommend adding a new disk, reinstall
the OS on the new disk with LVM, and then moving over any data that was
required after installation.

You may be able to do this in rescue mode within a chrooted environment,
but things could get messy. Add the new device, build the lvm stack,
copy over the data then chroot into the NEW lvm root. Mount everything
appropriately, recreate the initrd and re-install grub onto the new
disk. Go in with the expectation that you may be fixing things after
the reboot from rescue mode.

Jack Waterworth, RHCE
Senior Technical Support Engineer
Red Hat Global Support Services
Post by Alfredo De Luca
Hi all.
I have red hat 5.7 with no lvm2 installed. Now I want to configure
lvm2 on the root and swap partition then later on adding a couple of
LUNs to create a VG
What's the best practice/procedure to install lvm2 on the boot disk?
Is it possible? I guess I have to run Linux CD in rescue mode
Regards
Alfredo De Luca
2014-07-11 12:54:46 UTC
Permalink
Hi Jack.
Thanks for that. I did pretty much what you said but not sure how to
re-create the initrd then install the grub.
Do you have a specific procedure?
I followed the procedure in attachment but it's slightly different
from what I am looking for.
There is no way to do an in-place convert from a partitioned device to LVM
without losing data. I would recommend adding a new disk, reinstall the OS
on the new disk with LVM, and then moving over any data that was required
after installation.
You may be able to do this in rescue mode within a chrooted environment, but
things could get messy. Add the new device, build the lvm stack, copy over
the data then chroot into the NEW lvm root. Mount everything appropriately,
recreate the initrd and re-install grub onto the new disk. Go in with the
expectation that you may be fixing things after the reboot from rescue mode.
Jack Waterworth, RHCE
Senior Technical Support Engineer
Red Hat Global Support Services
Post by Alfredo De Luca
Hi all.
I have red hat 5.7 with no lvm2 installed. Now I want to configure
lvm2 on the root and swap partition then later on adding a couple of
LUNs to create a VG
What's the best practice/procedure to install lvm2 on the boot disk?
Is it possible? I guess I have to run Linux CD in rescue mode
Regards
_______________________________________________
linux-lvm mailing list
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
--
Alfredo
Jack Waterworth
2014-07-11 23:15:13 UTC
Permalink
The rebuild of the ramdisk should use the 'mkinitrd' command:

# mkinitrd /boot/initrd-<version>.img <version>

grub install would be either 'grub' or 'grub-install'.

# grub-install /dev/sda

If you have an active Red Hat subscription both procedures should be
documented on the customer portal.

Jack Waterworth, RHCE
Senior Technical Support Engineer
Red Hat Global Support Services
Post by Alfredo De Luca
Hi Jack.
Thanks for that. I did pretty much what you said but not sure how to
re-create the initrd then install the grub.
Do you have a specific procedure?
I followed the procedure in attachment but it's slightly different
from what I am looking for.
There is no way to do an in-place convert from a partitioned device to LVM
without losing data. I would recommend adding a new disk, reinstall the OS
on the new disk with LVM, and then moving over any data that was required
after installation.
You may be able to do this in rescue mode within a chrooted environment, but
things could get messy. Add the new device, build the lvm stack, copy over
the data then chroot into the NEW lvm root. Mount everything appropriately,
recreate the initrd and re-install grub onto the new disk. Go in with the
expectation that you may be fixing things after the reboot from rescue mode.
Jack Waterworth, RHCE
Senior Technical Support Engineer
Red Hat Global Support Services
Post by Alfredo De Luca
Hi all.
I have red hat 5.7 with no lvm2 installed. Now I want to configure
lvm2 on the root and swap partition then later on adding a couple of
LUNs to create a VG
What's the best practice/procedure to install lvm2 on the boot disk?
Is it possible? I guess I have to run Linux CD in rescue mode
Regards
_______________________________________________
linux-lvm mailing list
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
_______________________________________________
linux-lvm mailing list
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Continue reading on narkive:
Search results for '[linux-lvm] lvm2 conf on boot disk' (Questions and Answers)
10
replies
What is AIX Box?
started 2006-05-08 15:58:44 UTC
hardware
Loading...