Chapter 5. LVM Configuration Examples
5.1.4. Creating the File System
The following command creates a GFS file system on the logical volume.
[root@tng3-1 ~]# gfs_mkfs -plock_nolock -j 1 /dev/new_vol_group/
new_logical_volume
This will destroy any data on /dev/new_vol_group/new_logical_volume.
Are you sure you want to proceed? [y/n] y
Device:
Blocksize:
Filesystem Size:
Journals:
Resource Groups:
Locking Protocol:
Lock Table:
Syncing...
All Done
The following commands mount the logical volume and report the file system disk space usage.
[root@tng3-1 ~]# mount /dev/new_vol_group/new_logical_volume /mnt
[root@tng3-1 ~]# df
Filesystem
/dev/new_vol_group/new_logical_volume
5.2. Creating a Striped Logical Volume
This example creates an LVM striped logical volume called striped_logical_volume that stripes
data across the disks at /dev/sda1, /dev/sdb1, and /dev/sdc1.
5.2.1. Creating the Physical Volumes
Label the disks you will use in the volume groups as LVM physical volumes.
Warning
This command destroys any data on /dev/sda1, /dev/sdb1, and /dev/sdc1.
[root@tng3-1 ~]# pvcreate /dev/sda1 /dev/sdb1 /dev/sdc1
Physical volume "/dev/sda1" successfully created
Physical volume "/dev/sdb1" successfully created
54
/dev/new_vol_group/new_logical_volume
4096
491460
1
8
lock_nolock
1K-blocks
Used Available Use% Mounted on
1965840
20
1965820
1% /mnt
Need help?
Do you have a question about the ENTERPRISE LINUX 4 - LVM ADMINISTRATOR and is the answer not in the manual?
Questions and answers