Ubuntu

增加虛擬 Ubuntu 伺服器上的分區大小

  • September 18, 2013

我是一名網路開發人員,負責工作中的小型虛擬化網路伺服器。不幸的是,我以前從未做過任何與伺服器管理員有關的事情,所以我有點迷茫。

負責虛擬機的人增加了虛擬硬體的大小,我嘗試遵循幾個關於如何使用 LVM 增加空間的指南,但我對它有點迷茫,擔心我有點搞砸了。

fdisk -l 顯示以下內容:

Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders, total 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e6ec9

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758    52426751    25962497    5  Extended
/dev/sda3          499712      501757        1023   8e  Linux LVM
/dev/sda5          501760    52426751    25962496   8e  Linux LVM

Partition table entries are not in disk order

Disk /dev/mapper/TBD--WEB1-root: 9403 MB, 9403629568 bytes
255 heads, 63 sectors/track, 1143 cylinders, total 18366464 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/TBD--WEB1-root doesn't contain a valid partition table

Disk /dev/mapper/TBD--WEB1-swap_1: 17.2 GB, 17179869184 bytes
255 heads, 63 sectors/track, 2088 cylinders, total 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/TBD--WEB1-swap_1 doesn't contain a valid partition table

和 df -h 顯示:

Filesystem                  Size  Used Avail Use% Mounted on
/dev/mapper/TBD--WEB1-root  8.7G  7.3G  979M  89% /
udev                        7.9G  4.0K  7.9G   1% /dev
tmpfs                       3.2G  244K  3.2G   1% /run
none                        5.0M     0  5.0M   0% /run/lock
none                        7.9G     0  7.9G   0% /run/shm
/dev/sda1                   228M  221M     0 100% /boot

提前感謝您提供的任何幫助

試試以前的答案 - 它可能不完全符合要求,但應該概述完成工作所需的基本步驟。

引用自:https://serverfault.com/questions/539865