All of lore.kernel.org
 help / color / mirror / Atom feed
From: Georges Giralt <georges.giralt@free.fr>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Query regarding conversion of root partition to LV
Date: Wed, 04 Feb 2009 15:23:31 +0100	[thread overview]
Message-ID: <4989A4E3.6040201@free.fr> (raw)
In-Reply-To: <a80c86b70902040505l257e8ab8k4bad5ac121520e3f@mail.gmail.com>

Prateek Donni a écrit :
> I have a fedora 9 installation with two partitions swap and /
> partition. Now i want to mirror the files on the root partition to
> another disk using LVM mirroring. Since i dint make root on a LV and
> have no allocated space left so i am thinking of using the free space
> on the root partition as a block device that can be converted into PV
> and then mirrored after making it a LV.
> Is this feasible?
> Can someone let me know wht can be done?
> 
> Thanks
> Prateek
>
Hi Prateek !
IMHO this won't work.
As you spoke about mirroring, you can do this :
1) add another disk to the system (ideally same size of the original one)
2) partition it as :
	part #1 used as /boot (about a 100 MB, Ext2/3 FS )
	part #2 the remaining of the disk tagged as LVM.
3) boot your system under Fedora 9 and using LVM mamger create a PV ont 
the second partition, then a VG on the PV and then as much LV as you 
need. Do not forget to create the swap LV.
4) Format and temporary mount each LV ont the filesystem, recreating the 
correct layout but under, say, /mnt.
5) copy the data using a command like : cd / && tar cf - . |(cd /mnt && 
tar xf -)
6) under the /mnt layout correct the Grub menu file, then using this as 
the root with chroot, re-run grub-install.
7) boot under the new disk and test your system.
If fine,
8) create the same partition layout on the old disk as the new one and 
create 2 software raid 1 (mirror) using mdadm, one for the first 
partition used as /boot , the other one for the PV.
9) synchronize the md.
Enjoy.
Be carefull and read the man pages before proceding. A complete backup 
may prove usefull, also.
Hope this helps.

-- 
If the only tool you have is a hammer, you tend to see every problem as 
a nail.
                 Abraham Maslow
A British variant :
Any tool can serve as a hammer but a screwdriver makes the best chisel.

  reply	other threads:[~2009-02-04 14:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-04 13:05 [linux-lvm] Query regarding conversion of root partition to LV Prateek Donni
2009-02-04 14:23 ` Georges Giralt [this message]
2009-02-04 18:36   ` Prateek Donni
2009-02-04 19:23     ` Georges Giralt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4989A4E3.6040201@free.fr \
    --to=georges.giralt@free.fr \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.