我有多少可用空间?

我有多少可用空间?

我正在运行安装了桌面 GUI 的 Ubuntu 16.04 服务器。我有两个 1TB 硬盘,分为四个分区,每个分区都有一个 Raid 1 阵列。

我需要增加根分区所在阵列的大小,因为它只有 9.3GB,而且我收到空间不足的消息。

据我所知,没有可用空间来执行此操作。我通过将分区的大小相加得出这个结论,结果为lsblk931GB,Google 表示这是 1TB HDD 的实际容量。

因此,我想减小其中一个阵列(913GB)的大小,并将其设置为 LVM(sdc5 和 sdb5),以便腾出空间来增加根阵列的大小。我已将 VG 大小减小到 878.9GB,将文件系统大小减小到 880GB,但我不知道如何减小分区 sdc5 和 sbd5 的大小。

Google 建议启动实时 USB 并使用 Gparted 调整分区大小,但此方法无效。调整大小对话框显示“最小大小:935749 MiB”和“最大大小:935748 MiB”(最小大小是否超过了最大大小?)。我想知道这是否是因为分区是 Raid 设置的一部分?无论如何,任何指示都将不胜感激。

ubuntu@ubuntu:~$ sudo parted -l
Model: ATA WDC WD2500AAKS-0 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  250GB  250GB  primary               lvm


Model: ATA ST3160815AS (scsi)
Disk /dev/sdb: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  160GB  160GB  primary  ext4


Model: ATA WDC WD10EZEX-00M (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  1000MB  999MB   primary   ext4            boot, raid
 2      1000MB  9000MB  8000MB  primary   linux-swap(v1)  raid
 3      9000MB  19.0GB  10.0GB  primary   ext4            raid
 4      19.0GB  1000GB  981GB   extended
 5      19.0GB  1000GB  981GB   logical   ext4            raid


Model: ATA WDC WD10EZEX-00M (scsi)
Disk /dev/sdd: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  1000MB  999MB   primary   ext4            boot, raid
 2      1000MB  9000MB  8000MB  primary   linux-swap(v1)  raid
 3      9000MB  19.0GB  10.0GB  primary   ext4            raid
 4      19.0GB  1000GB  981GB   extended
 5      19.0GB  1000GB  981GB   logical   ext4            raid


Model: General USB Flash Disk (scsi)
Disk /dev/sde: 8023MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  8023MB  8022MB  primary  fat32        boot, lba


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/fileserver-sda1: 107GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags: 

Number  Start  End    Size   File system  Flags
 1      0.00B  107GB  107GB  ext4


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/fileserver-sda2: 107GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags: 

Number  Start  End    Size   File system  Flags
 1      0.00B  107GB  107GB  ext4


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/fileserver-sda3: 35.3GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags: 

Number  Start  End     Size    File system  Flags
 1      0.00B  35.3GB  35.3GB  ext4

lsblk -fmi

NAME                FSTYPE            LABEL       UUID                                   MOUNTPOINT NAME                  SIZE OWNER GROUP MODE
sdd                                                                                                 sdd                 931.5G root  disk  brw-rw----
|-sdd2              linux_raid_member ubuntu:1    a22d92d5-47cb-5c9a-8b96-7fc011d0f92f   [SWAP]     |-sdd2                7.5G root  disk  brw-rw----
|-sdd5              linux_raid_member ubuntu:3    737f5b0e-d298-54b6-03d8-8880efcfc975              |-sdd5              913.8G root  disk  brw-rw----
|-sdd3              linux_raid_member ubuntu:2    2415dcac-1137-5e3b-8b9e-9081ea4dec55              |-sdd3                9.3G root  disk  brw-rw----
`-sdd1              linux_raid_member ubuntu:0    e9109b99-4fe9-f2b6-822f-b337ad263be4              `-sdd1                953M root  disk  brw-rw----
sdb                                                                                                 sdb                 149.1G root  disk  brw-rw----
`-sdb1              ext4                          a67ad9ce-c929-49cc-8a20-5e19c1ed4dcd              `-sdb1              149.1G root  disk  brw-rw----
sde                                                                                                 sde                   7.5G root  disk  brw-rw----
`-sde1              vfat              UBUNTU 16_0 BE8A-FD07                              /cdrom     `-sde1                7.5G root  disk  brw-rw----
loop0               squashfs                                                             /rofs      loop0                 1.4G root  disk  brw-rw----
sdc                                                                                                 sdc                 931.5G root  disk  brw-rw----
|-sdc2              linux_raid_member ubuntu:1    a22d92d5-47cb-5c9a-8b96-7fc011d0f92f   [SWAP]     |-sdc2                7.5G root  disk  brw-rw----
|-sdc5              linux_raid_member ubuntu:3    737f5b0e-d298-54b6-03d8-8880efcfc975              |-sdc5              913.8G root  disk  brw-rw----
|-sdc3              linux_raid_member ubuntu:2    2415dcac-1137-5e3b-8b9e-9081ea4dec55              |-sdc3                9.3G root  disk  brw-rw----
`-sdc1              linux_raid_member ubuntu:0    e9109b99-4fe9-f2b6-822f-b337ad263be4              `-sdc1                953M root  disk  brw-rw----
sda                                                                                                 sda                 232.9G root  disk  brw-rw----
`-sda1              LVM2_member                   xGPEez-V4f7-cnpX-c0Hd-o5bE-JCG1-7a91cy            `-sda1              232.9G root  disk  brw-rw----
  |-fileserver-sda2 ext4              sda2        4d26bf3c-c47f-4f11-a73c-562b236d7b37                |-fileserver-sda2   100G root  disk  brw-rw----
  |-fileserver-sda3 ext4              sda3        b1a667b4-a686-456a-b0ac-6ee97392417c                |-fileserver-sda3  32.9G root  disk  brw-rw----
  `-fileserver-sda1 ext4              sda1        233c3363-bfa5-4e63-8452-7ecdf951abf0                `-fileserver-sda1   100G root  disk  brw-rw----

我还添加了 fdisk 输出,我要求 900GB 分区,但它只提供 838GB?差别很大。不确定我是否应该将此作为单独的问题发布,但为什么我无法获得我要求的 900GB?

 s   create a new empty Sun partition table


Command (m for help): p
Disk /dev/sdc5: 913.8 GiB, 981202894848 bytes, 1916411904 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x3aeea0a0

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): e
Partition number (1-4, default 1): 
First sector (2048-1916411903, default 2048): 
Last sector, +sectors or +size{K,M,G,T,P} (2048-1916411903, default 1916411903): +900GB

Created a new partition 1 of type 'Extended' and of size 838.2 GiB.

Command (m for help): a

相关内容