linux 邏輯卷等
linux 邏輯卷的使用
給磁碟分割槽並新增lvm標示
[root@node1 /]# fdisk /dev/sdb
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 183 1469916 83 Linux
/dev/sdb2 184 366 1469947+ 8e Linux LVM
/dev/sdb3 367 1218 6843690 8e Linux LVM
Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 8e
Changed system type of partition 1 to 8e (Linux LVM)
Command (m for help): p
Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 183 1469916 8e Linux LVM
/dev/sdb2 184 366 1469947+ 8e Linux LVM
/dev/sdb3 367 1218 6843690 8e Linux LVM
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
刪除卷組合物理卷
[root@node1 /]# vgremove lvm_test
Volume group "lvm_test" successfully removed
[root@node1 /]# pvremove /dev/sdb2
Labels on physical volume "/dev/sdb2" successfully wiped
[root@node1 /]# pvremove /dev/sdb1
Labels on physical volume "/dev/sdb1" successfully wiped
建立物理卷
[root@node1 /]# pvcreate /dev/sdb1
Physical volume "/dev/sdb1" successfully created
[root@node1 /]# pvcreate /dev/sdb2
Physical volume "/dev/sdb2" successfully created
[root@node1 /]# pvcreate /dev/sdb3
Physical volume "/dev/sdb3" successfully created
顯示物理卷
[root@node1 /]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a- 19.88G 0
/dev/sdb1 lvm2 -- 1.40G 1.40G
/dev/sdb2 lvm2 -- 1.40G 1.40G
/dev/sdb3 lvm2 -- 6.53G 6.53G
建立vg並將兩個物理卷加入卷組
[root@node1 /]# vgcreate lvm_test /dev/sdb1 /dev/sdb2
Volume group "lvm_test" successfully created
在現有的卷組上新增一個物理卷
[root@node1 /]# vgextend lvm_test /dev/sdb3
Volume group "lvm_test" successfully extended
建立邏輯卷
[root@node1 /]# lvcreate -L 1500 -n test lvm_test
Logical volume "test" created
[root@node1 /]# lvcreate -L 1500 -n test2 lvm_test
Logical volume "test2" created
[root@node1 /]# lvcreate -L 1500 -n test3 lvm_test
Logical volume "test3" created
[root@node1 /]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
LogVol00 VolGroup00 -wi-ao 17.88G
LogVol01 VolGroup00 -wi-ao 2.00G
test lvm_test -wi-a- 1.46G
test2 lvm_test -wi-a- 1.46G
test3 lvm_test -wi-a- 1.46G
給磁碟分割槽並新增lvm標示
[root@node1 /]# fdisk /dev/sdb
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 183 1469916 83 Linux
/dev/sdb2 184 366 1469947+ 8e Linux LVM
/dev/sdb3 367 1218 6843690 8e Linux LVM
Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 8e
Changed system type of partition 1 to 8e (Linux LVM)
Command (m for help): p
Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 183 1469916 8e Linux LVM
/dev/sdb2 184 366 1469947+ 8e Linux LVM
/dev/sdb3 367 1218 6843690 8e Linux LVM
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
刪除卷組合物理卷
[root@node1 /]# vgremove lvm_test
Volume group "lvm_test" successfully removed
[root@node1 /]# pvremove /dev/sdb2
Labels on physical volume "/dev/sdb2" successfully wiped
[root@node1 /]# pvremove /dev/sdb1
Labels on physical volume "/dev/sdb1" successfully wiped
建立物理卷
[root@node1 /]# pvcreate /dev/sdb1
Physical volume "/dev/sdb1" successfully created
[root@node1 /]# pvcreate /dev/sdb2
Physical volume "/dev/sdb2" successfully created
[root@node1 /]# pvcreate /dev/sdb3
Physical volume "/dev/sdb3" successfully created
顯示物理卷
[root@node1 /]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a- 19.88G 0
/dev/sdb1 lvm2 -- 1.40G 1.40G
/dev/sdb2 lvm2 -- 1.40G 1.40G
/dev/sdb3 lvm2 -- 6.53G 6.53G
建立vg並將兩個物理卷加入卷組
[root@node1 /]# vgcreate lvm_test /dev/sdb1 /dev/sdb2
Volume group "lvm_test" successfully created
在現有的卷組上新增一個物理卷
[root@node1 /]# vgextend lvm_test /dev/sdb3
Volume group "lvm_test" successfully extended
建立邏輯卷
[root@node1 /]# lvcreate -L 1500 -n test lvm_test
Logical volume "test" created
[root@node1 /]# lvcreate -L 1500 -n test2 lvm_test
Logical volume "test2" created
[root@node1 /]# lvcreate -L 1500 -n test3 lvm_test
Logical volume "test3" created
[root@node1 /]# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
LogVol00 VolGroup00 -wi-ao 17.88G
LogVol01 VolGroup00 -wi-ao 2.00G
test lvm_test -wi-a- 1.46G
test2 lvm_test -wi-a- 1.46G
test3 lvm_test -wi-a- 1.46G
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29108064/viewspace-1075955/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux LVM邏輯卷LinuxLVM
- Linux的邏輯卷管理Linux
- linux 邏輯卷介紹Linux
- linux系統掛載邏輯卷和擴充套件邏輯卷組Linux套件
- linux之LVM邏輯卷LinuxLVM
- linux LVM邏輯卷配置LinuxLVM
- Linux擴充套件邏輯卷Linux套件
- Linux下LVM邏輯卷管理LinuxLVM
- linux邏輯卷組建立以及修改Linux
- 邏輯卷LVMLVM
- linux邏輯卷方式管理硬碟資源Linux硬碟
- 如何新建邏輯卷及磁碟掛載,邏輯卷擴容
- Linux—磁碟配額,管理LVM邏輯卷LinuxLVM
- Linux下的磁碟分割槽和邏輯卷Linux
- Linux邏輯盤卷管理LVM詳解LinuxLVM
- LVM 邏輯卷管理LVM
- 邏輯卷管理-LVMLVM
- Linux-使用者管理與建立邏輯卷Linux
- 給linux新增磁碟並擴充套件邏輯卷Linux套件
- 在Linux中,如何使用LVM管理邏輯卷?LinuxLVM
- linux系統下分割槽邏輯卷擴容Linux
- LVM_邏輯卷管理LVM
- HP-UX 建立邏輯卷UX
- HP-UX邏輯卷管理UX
- linux建立邏輯卷,遠端共享為備份盤Linux
- linux 磁碟分割槽掛載-LVM-物理卷PV,卷組VG,邏輯卷LVLinuxLVM
- LVM邏輯卷管理器LVM
- 擴充套件邏輯卷空間套件
- 邏輯卷管理---LVM2LVM
- 【AIX 命令學習】建立邏輯卷!AI
- 【Linux】Linux檔案系統管理5 lvm邏輯卷管理LinuxLVM
- Linux LVM Logical Volume Management 邏輯卷的管理LinuxLVM
- lvm收縮邏輯卷空間LVM
- Centos8中遷移邏輯卷CentOS
- 【AIX 命令學習】lslv 顯示邏輯卷所跨越的物理卷及邏輯卷在物理捲上的分佈!AI
- lvm 擴充邏輯卷空間(linux的磁碟擴容)LVMLinux
- Linux 系統 LVM(Logical Volume Manager)邏輯卷管理LinuxLVM
- Linux 系統邏輯盤卷管理LVM 詳細介紹LinuxLVM