linux 重新分区 调整,重新调整磁盘分区linux / vm的大小

我运行

Linux客户端的VM Player,我想知道如何扩展磁盘?在VM播放器中,我提供了更多的磁盘空间,但我不确定如何将新的磁盘空间安装/扩展/连接到系统.

我的旧磁盘空间是14GB

[root@localhost ~]# df -h /

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/VolGroup-lv_root

14G 4.5G 8.2G 36% /

然后我扩展了它,现在我看到sda2是新的空间?

[root@localhost ~]# fdisk -l

Disk /dev/sda: 128.8 GB,128849018880 bytes

255 heads,63 sectors/track,15665 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: 0x000cd44d

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 2611 20458496 8e Linux LVM

Disk /dev/mapper/VolGroup-lv_root: 14.5 GB,14537457664 bytes

255 heads,1767 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/VolGroup-lv_swap: 6408 MB,6408896512 bytes

255 heads,779 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

我需要先安装新空间吗?

resize2fs -p /dev/mapper/VolGroup-lv_root 108849018880

resize2fs 1.41.12 (17-May-2010)

The containing partition (or device) is only 3549184 (4k) blocks.

You requested a new size of 1474836480 blocks.

resize2fs -p /dev/mapper/VolGroup-lv_root 128849018880

resize2fs 1.41.12 (17-May-2010)

resize2fs: Invalid new size: 128849018880

[root@localhost ~]# lvextend -L+90GB /dev/mapper/VolGroup-lv_root

Extending logical volume lv_root to 103.54 GiB

Insufficient free space: 23040 extents needed,but only 0 available

[root@localhost ~]# lvextend -L90GB /dev/mapper/VolGroup-lv_root

Extending logical volume lv_root to 90.00 GiB

Insufficient free space: 19574 extents needed,but only 0 available

编辑:

所以在尝试pvcreate / vgextend后到目前为止还没有任何工作.我猜测从VM Player添加的新磁盘空间没有出现?

pvscan

PV /dev/sda2 VG VolGroup lvm2 [19.51 GiB / 0 free]

Total: 1 [19.51 GiB] / in use: 1 [19.51 GiB] / in no VG: 0 [0 ]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值