All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Robinson <zxvdr.au@gmail.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] question about install on a new disk
Date: Fri, 01 Feb 2008 15:22:53 +1000	[thread overview]
Message-ID: <47A2ACAD.4020406@gmail.com> (raw)
In-Reply-To: <47A19CB9.6030503@math-info.univ-paris5.fr>

Fran�ois Patte wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Bonjour,
> 
> I have presently an install of fedora 6 on a disk sdb with partitions:
> 
> sdb1 / (ext3)
> sdb2 LVM with lv: /usr, /var, /opt, /tmp, /home
> 
> I would like to perform a new install on sda with partitions:
> 
> sda1 / (ext3)
> sda2 LVM with same lv except /home
> 
> 
> How can I mount the "old" logical volumes located on sdb when the new
> system will be running on sda?

You just need to make sure that you use a different Volume Group name 
for the new installation. If both installations have the same Volume 
Group name you'll run into difficulties. Its easiest to avoid duplicate 
names at install time.

> As devices /dev/mapper/VolGroup00-LogVol00 etc. are created at boot time
> in the /dev of the running system I will be unable to access the logical
> volumes located on sdb....

You will be able to access them if you use a different volume group 
name. For example, if you use the volume group name "vg0" on the new 
installation, and "VolGroup00" on the old installation:

old# mount | grep mapper
/dev/mapper/VolGroup00-root on / type ext3 (rw)
/dev/mapper/VolGroup00-usr on /usr type ext3 (rw)
/dev/mapper/VolGroup00-var on /var type ext3 (rw)
/dev/mapper/VolGroup00-opt on /opt type ext3 (rw)
/dev/mapper/VolGroup00-tmp on /tmp type ext3 (rw)
/dev/mapper/VolGroup00-home on /home type ext3 (rw)


new# mount | grep mapper
/dev/mapper/vg0-root on / type ext3 (rw)
/dev/mapper/vg0-usr on /usr type ext3 (rw)
/dev/mapper/vg0-var on /var type ext3 (rw)
/dev/mapper/vg0-opt on /opt type ext3 (rw)
/dev/mapper/vg0-tmp on /tmp type ext3 (rw)

Now assuming you want to mount the /home filesystem from the old 
installation:

new# mount /dev/VolGroup00/home /home
new# mount | grep home
/dev/mapper/VolGroup00-home on /home type ext3 (rw)

You could even use the one volume group for all the logical volumes, but 
that's a bit trickier still.

--Dave

      reply	other threads:[~2008-02-01  5:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-31 10:02 [linux-lvm] question about install on a new disk François Patte
2008-02-01  5:22 ` David Robinson [this message]

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=47A2ACAD.4020406@gmail.com \
    --to=zxvdr.au@gmail.com \
    --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.