Ext4 Available Space
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2016
    Cape Canaveral
    Windows 7 Firefox 61.0

    Ext4 Available Space


    Are there any charts or formulas to indicate how much available space a drive should have using Ext4?

    I am asking as I was provisioned a 6.5 terabyte drive (showing as 6.5 terabytes using lsblk). After partitioning it showed 5.9 terabytes while the disk shows 6.5 terabytes.

    Commands Used:
    parted /dev/sdb
    (parted) mklabel gpt
    (parted) unit TB
    (parted) mkpart primary 0.00TB 6.50TB
    (parted) print
    (parted) quit

    Then after mkfs.ext4 /dev/sdb1 and mounting as /u01, df -h shows 5.6TB available.

    I have created many 3-4 terabyte drives and dont remember it using this much overhead.

    Is this right? If not what can you recommend to use Ext4 for this disk?


    Last edited by micahel8773; 10th August 2018 at 08:01 PM.

  2. #2
    Join Date
    Apr 2018
    Linux (Fedora) Chrome 67.0.3396.79

    Re: Ext4 Available Space

    Is this related to your problem?
    If you chose to use ext2/3/4 you should also be aware of reserved space. By default ext2/3/4 will reserve 5% of the drives space, which only root is able to write to. This is done so a user cannot fill the drive and prevent critical daemons writing to it, but 5% of a large RAID array which isn’t going to be written to by critical daemons anyway, is a lot of wasted space. Set the reserved space to 0%, using tune2fs:

  3. #3
    Join Date
    Jun 2005
    Montreal, Que, Canada
    Linux (Fedora) Firefox 61.0

    Re: Ext4 Available Space

    I ran into a similar problem with my root partition.
    RedHat or Centos or SUSE Linux recommends xfs for /
    I use xfs for slash and this week, I got a warning that / was low in space.
    I did some housekeeping and cleared out old logs and stuff. It was not enough

    Compared to ext4, an empty xfs partition uses much less space for the file meta data and for it's own management.
    What I do not know, and I have not tried to determine is the overhead reserved for meta data.
    Should 20,000 files on an ext4 volume consume more space than the same 20,000 files on an xfs volume?
    I am planning to find out. Stay tuned.
    Leslie in Montreal

    Interesting web sites list

  4. #4
    Join Date
    Jun 2004
    Maryland, US
    Linux (Fedora) Firefox 61.0

    Re: Ext4 Available Space

    ext4 used to default to losing 10% to reserve, now it's 5% which is still a huge 200GB lost on a hypothetical 4TB partition.
    I usually go in and run "tune2fs -r 0 <partition>"
    Ex: tune2fs -r 0 /dev/sda2

    for all my ext4 partitions.
    Personally I'm not too worried about the chance of a log file running away and filling up a partition so that -r 0 means the reserve block count is 0 for that partition. If you want some reserve you can set a reasonable reserve size like 100MB (standard block size is 4096B)

    tune2fs -r 25000 <partition>

    The idea is to have root given enough free reserve space to unpack some files and packages in case of a runaway disk usage eating up all the space for the other users, so maybe 100M would be fine. Why RedHat thinks reserve space should scale linearly to partition size makes no sense to me. I would think it should scale up to some kind of ceiling and then stop at that ceiling of maybe a few gigabytes.

  5. #5
    Join Date
    Nov 2016
    Cape Canaveral
    Windows 7 Firefox 61.0

    Re: Ext4 Available Space

    Great responses all. Thanks.

    Should I also make my file system on top of the ext4 disk (without creating a partition for it), i.e. is this the industry best practice at this point?

    I have always created a single partition taking up the entire disk and made the file system on that.

    Last edited by micahel8773; Yesterday at 01:16 PM.

  6. #6
    Join Date
    Dec 2017
    Linux (Fedora) Firefox 60.0

    Re: Ext4 Available Space

    I am uncertain that any "industry standard" exists. On VMs in any enterprise-style virtualization methodology, I generally see different mount points for /, /home, /opt, /usr, /var, /etc and so on. It can be whatever the organization cares about. In my organization, we have a few extra (/var/log and /var/log/audit) that I haven't seen elsewhere before. On a home system, I just do / and /home and half the time I skip the /home. Sometimes I don't even use lvm.

    If you have any need to limit the max size of directories due to application or user behavior, go ahead and split out /home and /opt and /var and so on. If there is no hope of ever changing how much your system is allocated, just make a single lv or partition for / and save yourself the trouble of making lots of partitions/logical volumes.

Similar Threads

  1. Replies: 22
    Last Post: 14th August 2014, 12:58 PM
  2. How can i convert free space into unallocated space?
    By bridge531 in forum Hardware & Laptops
    Replies: 1
    Last Post: 7th April 2014, 03:49 PM
  3. Ext4 Free space problem
    By arpspatel in forum Using Fedora
    Replies: 0
    Last Post: 28th June 2009, 02:40 AM
  4. How-to realocate space from empty hard drive space to Fedora Core 5 partiton
    By JoeyJoJoe in forum Guides & Solutions (Not For Questions)
    Replies: 3
    Last Post: 3rd February 2008, 05:09 PM
  5. Hard disk -- Free space not equal to available space ??
    By michaeleekk in forum Hardware & Laptops
    Replies: 2
    Last Post: 30th August 2006, 02:20 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts