Creating The New Logical Volume; Making A File System And Mounting The New Logical Volume; Activating And Mounting The Original Logical Volume; Removing A Disk From A Logical Volume - Red Hat LVM ADMINISTRATOR 5.0 Administrator's Manual

Table of Contents

Advertisement

Chapter 5. LVM Configuration Examples

3.4. Creating the New Logical Volume

After creating the new volume group, you can create the new logical volume
[root@tng3-1 ~]# lvcreate -L5G -n yourlv yourvg
Logical volume "yourlv" created
3.5. Making a File System and Mounting the New Logical
Volume
You can make a file system on the new logical volume and mount it.
[root@tng3-1 ~]#
This will destroy any data on /dev/yourvg/yourlv.
Are you sure you want to proceed? [y/n] y
Device:
Blocksize:
Filesystem Size:
Journals:
Resource Groups:
Locking Protocol:
Lock Table:
Syncing...
All Done
[root@tng3-1 ~]# mount /dev/yourvg/yourlv /mnt

3.6. Activating and Mounting the Original Logical Volume

Since you had to deactivate the logical volume
can mount it.
root@tng3-1 ~]# lvchange -a y mylv
[root@tng3-1 ~]# mount /dev/myvg/mylv /mnt
[root@tng3-1 ~]# df
Filesystem
/dev/yourvg/yourlv
/dev/myvg/mylv

4. Removing a Disk from a Logical Volume

This example shows how you can remove a disk from an existing logical volume, either to
64
gfs_mkfs -plock_nolock -j 1 /dev/yourvg/yourlv
/dev/yourvg/yourlv
4096
1277816
1
20
lock_nolock
1K-blocks
24507776
24507776
, you need to activate it again before you
mylv
Used Available Use% Mounted on
32
24507744
1% /mnt
32
24507744
1% /mnt
.
yourlv

Advertisement

Table of Contents
loading

This manual is also suitable for:

Configuration and administration 5.0

Table of Contents