Ubuntu – Ubuntu show wrong disk sizes, how to solve it

hard drivepartitioningraid

I have a server with these characteristics:

CPU: Intel Core i7-2600
PLUSRAID Controller 4-Port SATA PCI-E – Adaptec 5405
One each, SATA SSD, 240 GB
Two each, SATA HDDs, 3.0 TB Enterprise
Two each, 8 GB DDR3 RAM

I installed Ubuntu on it, but it shows the space such as this, far less than the true capacity:

root@ns1 /boot # lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sdb       8:16   1 238.4G  0 disk
├─sdb2    8:18   1   512M  0 part
│ └─md1   9:1    0 511.4M  0 raid1 /boot
├─sdb3    8:19   1 229.9G  0 part
│ └─md2   9:2    0 229.8G  0 raid1 /
└─sdb1    8:17   1     8G  0 part
  └─md0   9:0    0     8G  0 raid1 [SWAP]
sda       8:0    1   2.7T  0 disk
├─sda2    8:2    1   512M  0 part
│ └─md1   9:1    0 511.4M  0 raid1 /boot
├─sda3    8:3    1 229.9G  0 part
│ └─md2   9:2    0 229.8G  0 raid1 /
└─sda1    8:1    1     8G  0 part
  └─md0   9:0    0     8G  0 raid1 [SWAP]

and

root@ns1 /boot # df -lh
Filesystem      Size  Used Avail Use% Mounted on
udev            7.8G     0  7.8G   0% /dev
tmpfs           1.6G  5.3M  1.6G   1% /run
/dev/md2        226G   17G  198G   8% /
tmpfs           7.8G     0  7.8G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
/dev/md1        488M  176M  287M  38% /boot
tmpfs           1.6G     0  1.6G   0% /run/user/0

I don't seem to be using all the space available on the sda disk at all, the two 3 terabytes disks.

What am I doing wrong?

Thanks!

Best Answer

It looks like that you have made raid1 (mirror) between partitions on your SSD and HDD. This is not best practice, since it more or less restricts performance to that of the slowest disk.

You can see that /boot, / and [ SWAP ] is defined on partitions on both /dev/sda and /dev/sdb.

sdb       8:16   1 238.4G  0 disk
├─sdb2    8:18   1   512M  0 part
│ └─md1   9:1    0 511.4M  0 raid1 /boot
├─sdb3    8:19   1 229.9G  0 part
│ └─md2   9:2    0 229.8G  0 raid1 /
└─sdb1    8:17   1     8G  0 part
  └─md0   9:0    0     8G  0 raid1 [SWAP]
sda       8:0    1   2.7T  0 disk
├─sda2    8:2    1   512M  0 part
│ └─md1   9:1    0 511.4M  0 raid1 /boot
├─sda3    8:3    1 229.9G  0 part
│ └─md2   9:2    0 229.8G  0 raid1 /
└─sda1    8:1    1     8G  0 part
  └─md0   9:0    0     8G  0 raid1 [SWAP]

I would recommend that you reinstall Ubuntu using only SSD for /boot, / and SWAP. If yopu really want a raid1/mirror setup, you should buy one more 240 GB SSD, so you mirror between similar type and size disks.

Anyway .. if you take a look at your disks with gparted (or fdisk -l) you should see a huge unallocated amount of data on /dev/sda.

Related Question