8

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!

5
  • 2
    What is wrong ?
    – Soren A
    Aug 6, 2019 at 12:45
  • Thanks Soren, you've pointed something out I hadn't even noticed. So the 3TB disk(s) are there in lsblk but the total capacity I'm allowed to use like this is far less than 3TB. Aug 6, 2019 at 13:16
  • 9
    One problem I see here. You did a RAID 1 (mirrored) on a 3TB drive and a 240GB drive. The problem is that the Mirrored RAID will only be at the size of the SMALLEST drive so you will only get 240GB out of 3TB. Destroy your RAID and do them as separate drives but you will lose data so backup first.
    – Terrance
    Aug 6, 2019 at 13:53
  • Also of note, the SWAP partition should only be on the SSD and not the adaptec, which will slow it to a fraction of its possible performance Aug 7, 2019 at 4:15
  • Thanks people! I'll go for this. Aug 7, 2019 at 9:09

3 Answers 3

12

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 you 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.

1
  • It also looks like sda is a hardware raid mirror, in addition to THAT being a mirror of sdb. Aug 7, 2019 at 4:14
3

The reason why your "3,0 TB" drive (sda) shows up as 2.7T is most likely due to different units being used.

The size is probably about 2.7 Tebibyte, which is approximately the same as 3.0 TB.

You can read about it here: https://en.wikipedia.org/wiki/Tebibyte

2
  • Thank you, but still, it seems like this I only have access to 230 GB, it would be nice if I could use the 2.7 TB Aug 6, 2019 at 13:23
  • 1
    @LexThoonen You do have access to 240GB. Run dmesg | grep blocks in a terminal and you will see something like [ 3.989812] sd 4:0:0:0: [sde] 468862128 512-byte logical blocks: (240 GB/224 GiB) which shows that you are seeing the GiB of the drive and not the GB. The 3TB drive shows up like [ 3.462108] sd 10:0:0:0: [sdb] 732566645 4096-byte logical blocks: (3.00 TB/2.73 TiB)
    – Terrance
    Aug 6, 2019 at 13:44
2

lsblk shows all disk partitions, while df -lh only shows your mounted partitions.

3
  • 1
    Don't do that .. sda2 seems to be a part of a raid1 (mirror) ...
    – Soren A
    Aug 6, 2019 at 13:45
  • You are right. I removed the example. Aug 6, 2019 at 13:47
  • great that you removed it - now your answer has no context. Downvoting.
    – Aries
    Sep 5 at 8:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .