我有一台带有 Ubuntu 的传统专用服务器(仅限控制台模式)。根据文档(价格等),我看到服务器必须有 250+ GB,但我看到的要少得多:
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md1 3.7G 1.6G 2.2G 43% /
none 2.0G 196K 2.0G 1% /dev
none 2.0G 0 2.0G 0% /dev/shm
none 2.0G 3.2M 2.0G 1% /tmp
none 2.0G 84K 2.0G 1% /var/run
none 2.0G 0 2.0G 0% /var/lock
none 2.0G 0 2.0G 0% /lib/init/rw
/dev/mapper/vg00-usr 4.0G 2.2G 1.9G 55% /usr
/dev/mapper/vg00-var 4.0G 1.9G 2.2G 48% /var
/dev/mapper/vg00-home
4.0G 1.8G 2.3G 45% /home
我不知道谁/何时以及如何配置该服务器。不幸的是,我无法从头开始重新安装它。
所以我的问题是,如何找到空闲分区/未分配空间?
以防万一它很容易:
$ fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 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: 0x4ed88842
Device Boot Start End Blocks Id System
/dev/sda1 1 487 3911796 fd Linux raid autodetect
/dev/sda2 488 731 1959930 82 Linux swap / Solaris
/dev/sda3 732 60801 482512275 fd Linux raid autodetect
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 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: 0x0b9943b0
Device Boot Start End Blocks Id System
/dev/sdb1 1 487 3911796 fd Linux raid autodetect
/dev/sdb2 488 731 1959930 82 Linux swap / Solaris
/dev/sdb3 732 60801 482512275 fd Linux raid autodetect
Disk /dev/md1: 4005 MB, 4005560320 bytes
2 heads, 4 sectors/track, 977920 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/md1 doesn't contain a valid partition table
Disk /dev/md3: 494.1 GB, 494092484608 bytes
2 heads, 4 sectors/track, 120628048 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/md3 doesn't contain a valid partition table