[root@ywcrmdb ~]# fdisk -l
Disk /dev/sda: 751.6 GB, 751619276800 bytes
255 heads, 63 sectors/track, 91379 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000923d9
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 65271 523774976 8e Linux LVM
Disk /dev/mapper/vg_ywcrmdb-lv_root: 473.1 GB, 473117491200 bytes
255 heads, 63 sectors/track, 57519 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_ywcrmdb-lv_root doesn't contain a valid partition table
Disk /dev/mapper/vg_ywcrmdb-lv_swap: 10.6 GB, 10552868864 bytes
255 heads, 63 sectors/track, 1282 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_ywcrmdb-lv_swap doesn't contain a valid partition table
Disk /dev/mapper/vg_ywcrmdb-lv_home: 52.7 GB, 52672069632 bytes
255 heads, 63 sectors/track, 6403 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_ywcrmdb-lv_home doesn't contain a valid partition table
扩展后容量变为751G,需要划分余下未分配的空间
fdisk /dev/sda
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (65271-91379, default 65271):
Using default value 65271
Last cylinder, +cylinders or +size{K,M,G} (65271-91379, default 91379):
Using default value 91379
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
重启主机后,多出了sda3
[root@ywcrmdb dev]# ls -ltr sd*
brw-rw---- 1 root disk 8, 3 4月 28 11:23 sda3
brw-rw---- 1 root disk 8, 2 4月 28 11:23 sda2
brw-rw---- 1 root disk 8, 1 4月 28 11:23 sda1
brw-rw---- 1 root disk 8, 0 4月 28 11:24 sda
[root@ywcrmdb dev]# pvcreate /dev/sda3
Writing physical volume data to disk "/dev/sda3"
Physical volume "/dev/sda3" successfully created
[root@ywcrmdb dev]# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name vg_ywcrmdb
PV Size 499.51 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 127874
Free PE 0
Allocated PE 127874
PV UUID qoLfbb-Vsu5-damB-VtNI-Rn3L-PNF5-yvWsEk
"/dev/sda3" is a new physical volume of "200.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sda3
VG Name
PV Size 200.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID P2mUfD-BO2J-Oinz-av6G-Oz1H-UYRD-hGciOE
[root@ywcrmdb dev]# vgextend vg_ywcrmdb /dev/sda3
Volume group "vg_ywcrmdb" successfully extended
[root@ywcrmdb dev]# vgdisplay
--- Volume group ---
VG Name vg_ywcrmdb
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 2
Act PV 2
VG Size 699.50 GiB
PE Size 4.00 MiB
Total PE 179073
Alloc PE / Size 127874 / 499.51 GiB
Free PE / Size 51199 / 200.00 GiB
VG UUID 5FA4n9-p3o6-TeR4-KbwO-Bg6J-NB8Z-JXo9UX
[root@ywcrmdb dev]# lvextend -L +100G /dev/mapper/vg_ywcrmdb-lv_root
Extending logical volume lv_root to 540.62 GiB
Logical volume lv_root successfully resized
相关文章
- 虚拟机LUN扩大后,重新分区
- win10+ubuntu双系统,完全删除ubuntu后,重新分区
- 虚拟机忘记密码后如何重新设置密码
- VMware Workstation虚拟机打开系统时,提示“无法打开内核设备“\\.\Global\vmx86”: 系统找不到指定的文件。是否在安装 VMware Workstation 后重新引导?
- 启动虚拟机异常(完整版)——如果已在 BIOS/固件设置中禁用 Intel VT-x,或主机自更改此设置后从未重新启动,则Intel VT-x处于禁用状态
- LUN挂载到Linux主机后,如何对磁盘进行分区
- Mac OS X磁盘重新分区后 BootCamp Windows启动项丢失
- LINUX SAN 500G重新分区、格式化,后成功恢复数据90%
- 硬盘重新分区并格式化后,还能恢复原来C盘数据吗?
- 硬盘重新分区并格式化后,还能恢复原来C盘数据吗?