RE: Volume expansion

"Collins, Kevin [MindWorks]" <[email protected]>
Newsgroups gmane.linux.redhat.release.taroon.general
Message-ID <D7E00CB28E5BFE45B20F13AF1FF85460013C941F@CHVPKNTXC1MC.chvpk.chevrontexaco.net>
No, you can't add a disk to a volume group without a pvcreate, which
will cause data loss.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of nathan r. hruby
Sent: Thursday, June 08, 2006 10:51 AM
To: Discussion of Red Hat Enterprise Linux 3 (Taroon)
Subject: Re: Volume expansion

On Thu, 8 Jun 2006, Ed Wilts wrote:

> I'll admit to not having done much with LVM and now I need to know
it...
> I've got a 400GB disk (/dev/sde1) mounted on /foo.  I want to double
> the volume size without creating a new volume and moving the existing
> data over.  I can't just move some directories to the new volume - it
> has to be one big volume when I'm done.  Any suggestions on how best
to
> do this with LVM in RHEL 3?  This is a SAN-based volume and it's
> possible that I can grab another 400GB on the same frame and grow the
> LUN if that makes it easier.

This ought to work (having not tested it, YMMV)
- grow_lun_from_san()
- vgextend $vg /dev/sde1
- vgdisplay and grab the number of total PE's
- lvextend -l $total_pe /dev/vg/lv
- umount /volume
- fsck -f /dev/vg/lv
- resize2fs -p /dev/vg/lv
- mount /volume

It may be that you can't vgextend a device already in a VG.  If that's
the
case, you can either

- make the remaining space on the LUN another partition and add it into
   the volume group instead (pvcreate /dev/sde2 ; vgextend $vg
/dev/sde2)

- make another lun and add it similar to the above, though the above
make
   for one nice shiny LUN, which might me easier

- Make an 800GB LUN, add it to the VG and then pvmove the data from one
   LUN to the other, then extend the lv and filesystem, and drop the
older
   small LUN our of the VG.

HTH,

-n

-- 
-------------------------------------------
nathan hruby <[email protected]>
uga enterprise information technology services
core services  support
-------------------------------------------
"In 1972 a crack commando unit was sent to
  prison by a military court for a crime they
  didn't commit...."

--
Taroon-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/taroon-list



--
Taroon-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/taroon-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.