虚拟机有分区的情况下,扩磁盘
2014-04-28 11:34
134 查看
--------磁盘有分区的情况下 [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
相关文章推荐
- 虚拟机无分区的情况下,扩磁盘
- vmware linux添加新磁盘后刷新--重新扫描 SCSI 总线,在不重启虚拟机的情况下添加 SCSI 设备
- 如何动态增加虚拟机镜像模版的磁盘空间?且保证新增磁盘空间不创建新的分区?
- windows下C语言编程获取磁盘(分区)使用情况
- vmware为虚拟机/分区增加磁盘容量过程
- 不用工具就可以在虚拟机安好系统后,并只有c盘的情况下增加分区
- CentOS虚拟机根分区磁盘扩容操作
- Linux查看磁盘已挂载分区使用情况df详解
- windows下C语言编程获取磁盘(分区)使用情况
- vmware12下对虚拟机ubuntu14.10系统所在分区sda1进行磁盘扩容
- IMF Vmvare 中linux 根分区磁盘扩容 gparted 增加虚拟机磁盘空间
- 详解Linux 虚拟机根分区磁盘扩充空间记录
- 对虚拟机ubuntu14.10系统所在分区sda1进行磁盘扩容
- CentOS 5.7下利用LVM分区安装Xen安装虚拟机与磁盘空间动态扩容
- 扩展fedora 16虚拟机的根分区磁盘容量
- Linux - 查看当前磁盘的分区情况
- Vmware centos 虚拟机根分区磁盘扩容(基于LVM)
- RHEL7虚拟机中不重启的情况下加新硬盘及扩展根分区容量
- 通过添加一块分区给虚拟机增加磁盘空间(Windows XP SP3+VMWare7)
- vmware12下对虚拟机ubuntu14.10系统所在分区sda1进行磁盘扩容