Splitting the Volume Group
55
/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 VG myvg lvm2 [17.15 GB / 0 free]
PV /dev/sdb1 VG myvg lvm2 [17.15 GB / 10.80 GB free]
PV /dev/sdc1 VG myvg lvm2 [17.15 GB / 17.15 GB free]
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 VSize VFree
myvg 2 1 0 wz--n- 34.30G 10.80G
yourvg 1 0 0 wz--n- 17.15G 17.15G
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.
Содержание CLUSTER SUITE 4.7 - CLUSTER LVM ADMINISTRATORS
Страница 1: ...Red Hat Cluster Suite 4 7 Cluster Logical Volume Manager LVM Administrator s Guide ...
Страница 6: ...vi ...
Страница 12: ...xii ...
Страница 24: ...12 ...
Страница 62: ...50 ...
Страница 72: ...60 ...
Страница 82: ...70 ...
Страница 84: ...72 ...
Страница 86: ...74 ...
Страница 96: ...84 ...
Страница 103: ...91 Appendix E Revision History Revision History Revision 1 0 ...
Страница 104: ...92 ...
Страница 108: ...96 ...