/dev/sdc1: Moved: 76.6%
/dev/sdc1: Moved: 92.2%
/dev/sdc1: Moved: 100.0%
After moving the data, you can see that all of the space on /dev/sdc1 is free.
[root@tng3-1 ~]# pvscan
PV /dev/sda1
PV /dev/sdb1
PV /dev/sdc1
Total: 3 [51.45 GB] / in use: 3 [51.45 GB] / in no VG: 0 [0
5.3.3. Splitting the Volume Group
To create the new volume group yourvg, use the vgsplit command to split the volume group myvg.
Before you can split the volume group, the logical volume must be inactive. If the file system is
mounted, you must unmount the file system before deactivating the logical volume.
You can deactivate the logical volumes with the lvchange command or the vgchange command.
The following command deactivates the logical volume mylv and then splits the volume group
yourvg from the volume group myvg, moving the physical volume /dev/sdc1 into the new volume
group yourvg.
[root@tng3-1 ~]# lvchange -a n /dev/myvg/mylv
[root@tng3-1 ~]# vgsplit myvg yourvg /dev/sdc1
Volume group "yourvg" successfully split from "myvg"
You can use the vgs command to see the attributes of the two volume groups.
[root@tng3-1 ~]# vgs
VG
#PV #LV #SN Attr
myvg
2
1
yourvg
1
0
5.3.4. Creating the New Logical Volume
After creating the new volume group, you can create the new logical volume yourlv.
[root@tng3-1 ~]# lvcreate -L5G -n yourlv yourvg
Logical volume "yourlv" created
5.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.
VG myvg
lvm2 [17.15 GB / 0
VG myvg
lvm2 [17.15 GB / 10.80 GB free]
VG myvg
lvm2 [17.15 GB / 17.15 GB free]
VSize
0 wz--n- 34.30G 10.80G
0 wz--n- 17.15G 17.15G
free]
VFree
Splitting the Volume Group
]
57
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