I am running Ubuntu 16.04 server with a desktop GUI installed. I have two 1TB hard drives divided into four partitions each with a Raid 1 array.
I need to increase the size of the array my root partition is on as it is only 9.3GB and I am getting messages that it is running out of space.
As far as I can tell, there is no space available to do this. I came to this conclusion by adding up the sizes of the partitions in lsblk
which came to 931GB which Google says is the actual capacity of a 1TB HDD.
So I want to reduce the size of one of the arrays which is 913GB and set up as LVM (sdc5 and sdb5) to create room to increase the root array size. I have reduced the VG size to 878.9GB and the file system size to 880GB but I cannot figure out how to reduce the size of the partitions sdc5 and sbd5.
Google says to boot into a live USB and use Gparted to resize the partitions but this is not working. The resize dialogue box says "Minimum size: 935749 MiB" and "Maximum size: 935748 MiB" (the minimum size is in excess of the maximum size?). I am wondering if this is because the partition is part of a Raid set up? Anyway any pointers would be gratefully received.
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----
I am also adding fdisk out put, I asked for a 900GB partition but its offering me only 838GB? That's a big difference. Not sure if I should post this as a separate question but why am I not able to get the 900GB I am asking for?
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
sudo parted -l
and of thislsblk -fmi
– cmak.fr Jun 17 '18 at 12:00