hard drive - Where is the Missing Disk Space on Linux Software Raid

20
2014-04
  • Nite

    Purchased (4) 2TiB Drives (actual disk space) and created a RAID5 array expecting to have 6TB of useable disk space, however actual useable space is 5.46TiB.

    So, the question is where did the disk space go?

    First off, I can say for certainty the disks actual useable is verified at 2TB each have mounted and formated on a non-linux system (OSX).


    Disks - 2TB Per disk, Tested HFS, Actual 2TB Useable

    root@server:/server# fdisk -l 2>/dev/null | egrep "sd[hijk]" | grep Disk
    Disk /dev/sdh: 2000.4 GB, 2000398934016 bytes
    Disk /dev/sdj: 2000.4 GB, 2000398934016 bytes
    Disk /dev/sdk: 2000.4 GB, 2000398934016 bytes
    Disk /dev/sdi: 2000.4 GB, 2000398934016 bytes


    Created RAID5 Array Using (4) Devices Above

    /sbin/mdadm --create --verbose /dev/md1 --level=5 --raid-devices=4 /dev/sdh1 /dev/sdi1 /dev/sdj1 /dev/sdk1


    Existing Array

    Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
    md1 : active raid5 sdk1[3] sdj1[2] sdi1[1] sdh1[0]
    5860535808 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]


    fdisk Info

    root@server:/server# fdisk -l /dev/sdh

    Device Boot Start End Blocks Id System
    /dev/sdh1 1 243201 1953512001 fd Linux raid autodetect


    Block Comparison

    Blocks Per Disk * Number of Useable Disks = Total Blocks
    1953512001 * 3 = 5860536003

    Does Not Match md1 Block Count


    Missing 500G

    root@server:/server# pvs | grep md1
    /dev/md1 ICYvg lvm2 a- 5.46t 1.96t

  • Answers
  • Psychoholic

    2000GB as specified by the manufacturer is only about 1830-ish GB as seen by the computer, because of the difference in the way manufacturers define 1GB vs. the way the computer defines 1GB.

    I have a 2TB drive that reads as 1.81TB on the computer.

    Computer GB = 1048576000 bytes

    Manufacturer GB = 1000000000 bytes

  • 8088

    Ok, thought I had addressed that above... but your post forced me to go back and do the math:

    root@server:/server# fdisk -l 2>/dev/null | egrep "sd[hijk]" | grep Disk 
    Disk /dev/sdh: 2000.4 GB, 2000398934016 bytes
    
    
    2000398934016 bytes = 1.81935224 TiB
    
    1.81935224 TiB *3 = 5.45TiB
    

    So, it is actually the drive size, but the drive is reporting itself at 2000.4GB when it is not and OSX reports it as 2TB when it is not.


  • Related Question

    Hard Drive missing drive space
  • Chance Robertson

    I have a 500 GB hard drive which I previously attached to my Mac. I detached the drive without going through the eject procedure. When I did this a message showed up, which of course I did not read. I could not use the drive until I formatted again. Now, when I attach the drive it says it is formatted NTFS and has 280.39 of 500 GB free. When I open the drive in Windows Explorer, Finder, or in Linux, is only shows a handful of files totaling 54 MB. How can I find out what is taking up all the space.

    Edit: Output of fdisk -l:

    Disk /dev/sda: 68.7 GB, 68719476736 bytes
    255 heads, 63 sectors/track, 8354 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00031a5e
    
    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 8068 64804864 83 Linux
    /dev/sda2 8069 8355 2300929 5 Extended
    /dev/sda5 8069 8355 2300928 82 Linux swap / Solaris
    
    
    Disk /dev/sdb: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x288d48f2
    
    Device Boot Start End Blocks Id System
    /dev/sdb1 1 60802 488383488 7 HPFS/NTFS
    

  • Related Answers
  • Mike

    In Windows, use Disk Manager. In Linux, use something like fdisk or Gpartd. I think you may have a partition taking up space.

  • Essobi

    On OSX, *BSD or Linux

    cd /Volumes/NAME_OF_DISK
    du -a | sort -nrk1 | more

    You will see all files on the volume (including ones that begin with .) sorted from the largest to smallest. The "." and ".." entries in this mode are misleading as they represent the current working directory and the parent. Ignore them.

    df -h will show you the mounts in 'human readable format'