2

I have a CentOS server with 4 disks, each with 1TB that totals to 3.636 TB of usable space (according to http://www.jonathanlaliberte.com/2007/12/18/calculating-actual-hard-disk-space/).

But the server df command shows the following status:

Filesystem            Size  Used Avail Use% Mounted on
/dev/md1              5.5G  3.0G  2.3G  57% /
/dev/md3              2.7T  2.7T   55G  99% /media
/dev/md0              181M   12M  160M   7% /boot

The swap is:

Swap:         5721         12       5708

So on overall, I'm about 900 GB short.

Any idea where that space went, and how I can get it back?

Thanks!

1
  • Just to clarify, this is the status after I already set the amount of reserved blocks on /dev/md3 to 0.
    – SyRenity
    Mar 23, 2011 at 11:51

5 Answers 5

3

How are the MD devices configured? If you use a RAID1 (mirroring) or Raid5 (striped with parity), you will loose capacity. A RAID1 will have half the capacity of all disks, and a RAID5 will have the capacity of n-1 disks.

3
  • Good call. 4 1TB disks in RAID 5 will give you approximately 2.72 TB
    – Hyppy
    Mar 23, 2011 at 12:00
  • (s/loose/lose/)
    – Javier
    Mar 23, 2011 at 14:02
  • Wow, I managed to completely forget how RAID 5 works. Speaking of overwork... Thanks for reminding!
    – SyRenity
    Mar 25, 2011 at 2:16
2

Either of the following commands

sudo fdisk -l
sudo parted -l

Should shed more light on what is going on, giving you the exact reported capacity of your drives that the OS sees. How is your RAID set up?

1
  • RAID 5, which explains the missing 25%.
    – SyRenity
    Mar 25, 2011 at 2:26
2

It seems like sofware raid (/dev/md* devices belongs to linux md raid). Probably there is something like raid5. Take a look to /proc/mdstat.

1
  • RAID 5 indeed, completely forgot it works that way.
    – SyRenity
    Mar 25, 2011 at 2:26
1

The usable space calculation on the website appears to just convert between GB and GiB, without any consideration for file system structures, reserved space, your RAID arrays (and their overhead) and so on. Furthermore, it's entirely possible that you have unpartitioned space on the drives or other partitions that aren't mounted.

Check cat /proc/partitions to see the actual partition and device size information (in 1KiB blocks) not counting the overhead.

1

For all we know, the 900 GB could be unpartitioned space. Also, 2.7T is not very precise. Try df -k to see the file system size in KiB instead.

You need to show how the metadevices are configured, and how the 4 disks are partitioned.

cat /proc/mdstat should be a good starting point.

You must log in to answer this question.

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