linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Mounting two logical volumes to the same mount point
@ 2006-06-20 19:07 Aad Rijnberg
  2006-06-20 20:14 ` Georg Klein
  2006-06-21  8:24 ` Heinz Mauelshagen
  0 siblings, 2 replies; 4+ messages in thread
From: Aad Rijnberg @ 2006-06-20 19:07 UTC (permalink / raw)
  To: linux-lvm

Hi,

my logical volume that contains /usr appears to be too small. I already 
removed some applications that I did not need, but it is still on the edge. 
Now that there are a lot of updates, I get the complaint of yum that there is 
not enough free space on /usr.

I just bought an additional harddisk which I also needed for other purposes, 
and would like to reserve part of this new drive for extra LVM space. I have 
just created a new volume group (VolGroup01) on the new drive, and a logical 
volume (LogVol01) inside that physical volume group. 

Can I mount both /dev/mapper/VolGroup00-LogVol01 (which contains the /usr data 
on the "old" drive) and /dev/mapper/VolGroup01-LogVol01 to the /usr mount 
point? Or can only one logical volume be mounted to a mount point?

Aad

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

* Re: [linux-lvm] Mounting two logical volumes to the same mount point
  2006-06-20 19:07 [linux-lvm] Mounting two logical volumes to the same mount point Aad Rijnberg
@ 2006-06-20 20:14 ` Georg Klein
  2006-06-21  8:24 ` Heinz Mauelshagen
  1 sibling, 0 replies; 4+ messages in thread
From: Georg Klein @ 2006-06-20 20:14 UTC (permalink / raw)
  To: linux-lvm

Hi,

On Tue, 20 Jun 2006 21:07:29 +0200
Aad Rijnberg <Aad.Rijnberg@zonnet.nl> wrote:

> Hi,
> 
> my logical volume that contains /usr appears to be too small. I
> already removed some applications that I did not need, but it is
> still on the edge. Now that there are a lot of updates, I get the
> complaint of yum that there is not enough free space on /usr.

is it a own lv or is it just a directory on a lv?

> 
> I just bought an additional harddisk which I also needed for other
> purposes, and would like to reserve part of this new drive for extra
> LVM space. I have just created a new volume group (VolGroup01) on the
> new drive, and a logical volume (LogVol01) inside that physical
> volume group.

Extend the logical volume /usr is on. Partition your new hard disk,
make a partition a physical volume (pvcreate), extend your volume
group (vgextend) , extend your logical volume (lvextend) and resize the
file system. Done. That's what LVM is good for ;-)

> 
> Can I mount both /dev/mapper/VolGroup00-LogVol01 (which contains
> the /usr data on the "old" drive) and /dev/mapper/VolGroup01-LogVol01
> to the /usr mount point? Or can only one logical volume be mounted to
> a mount point?

just one device to a mount point. However, xou can mount the new lv to
a subdirectory of /usr - but the better (and LVM compliant) way is to
extend your existing lv.


Georg

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

* Re: [linux-lvm] Mounting two logical volumes to the same mount point
  2006-06-20 19:07 [linux-lvm] Mounting two logical volumes to the same mount point Aad Rijnberg
  2006-06-20 20:14 ` Georg Klein
@ 2006-06-21  8:24 ` Heinz Mauelshagen
  2006-06-21 22:24   ` Aad Rijnberg
  1 sibling, 1 reply; 4+ messages in thread
From: Heinz Mauelshagen @ 2006-06-21  8:24 UTC (permalink / raw)
  To: LVM general discussion and development

On Tue, Jun 20, 2006 at 09:07:29PM +0200, Aad Rijnberg wrote:
> Hi,
> 
> my logical volume that contains /usr appears to be too small. I already 
> removed some applications that I did not need, but it is still on the edge. 
> Now that there are a lot of updates, I get the complaint of yum that there is 
> not enough free space on /usr.
> 
> I just bought an additional harddisk which I also needed for other purposes, 
> and would like to reserve part of this new drive for extra LVM space. I have 
> just created a new volume group (VolGroup01) on the new drive, and a logical 
> volume (LogVol01) inside that physical volume group. 
> 
> Can I mount both /dev/mapper/VolGroup00-LogVol01 (which contains the /usr data 
> on the "old" drive) and /dev/mapper/VolGroup01-LogVol01 to the /usr mount 
> point? Or can only one logical volume be mounted to a mount point?

Aad,

you can only mount one device with a filesystem on the same mountpoint.

What needs doing in order to grow your logical volume containing the usr
filesystem, is to *add* the second drive to the existing volume group on the
first one and grow usr afterwards (LV and FS).

Carry out the follwoing steps (or use system-config-lvm):

lvremove VolGroup01/LogVol01
vgremove VolGroup01
vgextend VolGroup00 /dev/sdb # or whatever the drive is

# replace 5G with the capacity you want to add
lvextend -L+5G VolGroup00/LogVol01

How to grow the FS depends on the type; for ext2/3 you'ld run:

ext2online /dev/VolGroup00/LogVol00


> 
> Aad
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.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                                 Red Hat GmbH
Consulting Development Engineer                   Am Sonnenhang 11
Storage Development                               56242 Marienrachdorf
                                                  Germany
Mauelshagen@RedHat.com                            PHONE +49  171 7803392
                                                  FAX   +49 2626 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

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

* Re: [linux-lvm] Mounting two logical volumes to the same mount point
  2006-06-21  8:24 ` Heinz Mauelshagen
@ 2006-06-21 22:24   ` Aad Rijnberg
  0 siblings, 0 replies; 4+ messages in thread
From: Aad Rijnberg @ 2006-06-21 22:24 UTC (permalink / raw)
  To: linux-lvm

On Wednesday 21 June 2006 10:24, Heinz Mauelshagen wrote:
> On Tue, Jun 20, 2006 at 09:07:29PM +0200, Aad Rijnberg wrote:
> > Hi,
> >
> > my logical volume that contains /usr appears to be too small. I already
> > removed some applications that I did not need, but it is still on the
> > edge. Now that there are a lot of updates, I get the complaint of yum
> > that there is not enough free space on /usr.
> >
> > I just bought an additional harddisk which I also needed for other
> > purposes, and would like to reserve part of this new drive for extra LVM
> > space. I have just created a new volume group (VolGroup01) on the new
> > drive, and a logical volume (LogVol01) inside that physical volume group.
> >
> > Can I mount both /dev/mapper/VolGroup00-LogVol01 (which contains the /usr
> > data on the "old" drive) and /dev/mapper/VolGroup01-LogVol01 to the /usr
> > mount point? Or can only one logical volume be mounted to a mount point?
>
> Aad,
>
> you can only mount one device with a filesystem on the same mountpoint.
>
> What needs doing in order to grow your logical volume containing the usr
> filesystem, is to *add* the second drive to the existing volume group on
> the first one and grow usr afterwards (LV and FS).
>
> Carry out the follwoing steps (or use system-config-lvm):
>
> lvremove VolGroup01/LogVol01
> vgremove VolGroup01
> vgextend VolGroup00 /dev/sdb # or whatever the drive is
>
> # replace 5G with the capacity you want to add
> lvextend -L+5G VolGroup00/LogVol01
>
> How to grow the FS depends on the type; for ext2/3 you'ld run:
>
> ext2online /dev/VolGroup00/LogVol00
>
Hi Heinz and Georg,

thanks for the clear descriptions.

I performed the operations with the Logical Volume Management tool provided 
with Fedora Core 5 (system-config-lvm), which has an intuitive GUI and now 
my /usr "partition" has grown by 5G. It's as easy as ... ;-)

Thanks for the support!

Aad

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

end of thread, other threads:[~2006-06-21 22:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-20 19:07 [linux-lvm] Mounting two logical volumes to the same mount point Aad Rijnberg
2006-06-20 20:14 ` Georg Klein
2006-06-21  8:24 ` Heinz Mauelshagen
2006-06-21 22:24   ` Aad Rijnberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).