[linux-lvm] How do I use free PE?

Stuart D. Gathman stuart at bmsi.com
Fri Oct 23 15:41:37 UTC 2009

On Fri, 23 Oct 2009, Rod Rook wrote:

> I've installed Fedora 10 on a 250GB SATA hard drive.
> I want to use the unused portion (free PE= 4378, about 140GB), but I don't
> know how I go about doing it.
> I don't want to add it to VolGroup00, but I want it made accessible as a
> general storage space.
>   PV Name               /dev/sdb2
>   VG Name               VolGroup00
>   PV Size               232.69 GB / not usable 4.58 MB
>   Total PE              7446
>   Free PE               4376
>   Allocated PE          3070

It already *is* part of VolGroup00.  To use it, you can:

1) increase the size of an existing filesystem, e.g. / on LogVol00.

2) allocate another LV and create a filesystem on that.  

I don't use the GUI tools, but here is how you could do (2) on
the command line:

# lvcreate -L 100G -n data VolGroup00
# mke2fs -j -L/data /dev/VolGroup00/data
# mkdir /data

Edit /etc/fstab and add a line like the following:

LABEL=/data             /data                   ext3    noexec,nodev    1 0

# mount /data

Be sure to leave a gig or two of free space on VolGroup00 so that you
can make a snapshot of LogVol00 (or data) for backup:

# lvcreate -s -L1G -n LogVol00_snap VolGroup00/LogVol00
# mkdir /mnt/LogVol00
# mount -r /dev/VolGroup00/LogVol00_snap /mnt/LogVol00
# rsync -ravHX /mnt/LogVol00/ /path/to/directory/on/large/backup/disk
# lvremove VolGroup00/LogVol00_snap

	      Stuart D. Gathman <stuart at bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

More information about the linux-lvm mailing list