日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

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

發布時間:2025/3/15 linux 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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 ]

總結

以上是生活随笔為你收集整理的linux 重新分区 调整,重新调整磁盘分区linux / vm的大小的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。