Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
    
Just to clarify, this is the status after I already set the amount of reserved blocks on /dev/md3 to 0. –  SyRenity Mar 23 '11 at 11:51
add comment

5 Answers

up vote 3 down vote accepted

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.

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

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?

share|improve this answer
    
RAID 5, which explains the missing 25%. –  SyRenity Mar 25 '11 at 2:26
add comment

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.

share|improve this answer
    
RAID 5 indeed, completely forgot it works that way. –  SyRenity Mar 25 '11 at 2:26
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.