From: Dan White <ygor@comcast.net>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Cannot unmount logical volume to reduce it
Date: Tue, 8 Nov 2011 20:05:11 +0000 (UTC) [thread overview]
Message-ID: <254604864.2010919.1320782711864.JavaMail.root@sz0126a.westchester.pa.mail.comcast.net> (raw)
In-Reply-To: <4EB9720F.1030709@q7.com>
Thanks Joe. That was a great suggestion.
Here's what I did (for the benefit of others trying to do this):
Boot into the rescue CD, did NOT mount the file systems.
At the prompt:
lvm vgscan
This created /dev/volgrp01
Then:
lvm vgchange -ay
This created /dev/volgrp01/usrVol /dev/volgrp01/varVol etc
These are the volume group and logical group names I gave the original OS installation.
Then, using /dev/volgrp01/usrVol as an example, to be resized to 10 gigabytes:
e2fsck -pvf /dev/volgrp01/usrVol
resize2fs -f /dev/volgrp01/usrVol 10g
lvm lvresize -v -L 10g /dev/volgrp01/usrVol
The system warns and whines aboiut the last step, but I did not mess up my file systems.
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)
----- Joe Pruett <joey@q7.com> wrote:
> when you use the rescue disk, you need to tell it to skip the mounting
> of the drives. and i hope you know that you need to shrink the file
> system first before you reduce the lv. i don't know if the appropriate
> tools will be available on the rescue disk without mounting the main
> system drive, though. using a livecd might be needed.
>
> On 11/08/2011 10:00 AM, Dan White wrote:
> > RHEL5.7 x86_64
> > I want to reduce the size of the logical volumes on a server.
> > The two giving me trouble are mounted on /var and /usr
> >
> > I cannot unmount them to reduce them. Even tried booting into a rescue disc.
> >
> > Any suggestions ?
> >
> > “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
> > Bill Waterson (Calvin & Hobbes)
> >
> > _______________________________________________
> > 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/
> >
>
> _______________________________________________
> 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/
prev parent reply other threads:[~2011-11-08 20:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-08 18:00 [linux-lvm] Cannot unmount logical volume to reduce it Dan White
2011-11-08 18:16 ` Joe Pruett
2011-11-08 18:52 ` Dan White
2011-11-09 9:44 ` James Hawtin
2011-11-08 20:05 ` Dan White [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=254604864.2010919.1320782711864.JavaMail.root@sz0126a.westchester.pa.mail.comcast.net \
--to=ygor@comcast.net \
--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 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).