Results 1 to 4 of 4

Thread: Some assistance with tune2fs

  1. #1
    Join Date
    Jul 2008
    Beans
    28

    Some assistance with tune2fs

    I'm looking for some assistance with tune2fs here. I created a single 2 TB partition on my 2 TB hard drive. When I mount it anywhere, say, /mnt/Media and issue df -h /dev/sdb1 I see this:

    /dev/sdb1 1.9T 28G 1.8T 2% /mnt/Media

    I realize this is because ext4 reserves 5% of the blocks by default.

    So I unmount /dev/sdb1 and issue: tune2fs -m 0 /dev/sdb1 where I see this:

    tune2fs 1.42.2 (9-Apr-2012)
    Setting reserved blocks percentage to 0% (0 blocks)

    Of course, I think, success! So I reboot the machine for good measure, remount the drive, and issue a df -h /dev/sdb1 again where I see that 28 GB or 2% of my drive is still filled.

    tune2fs -l /dev/sdb1 shows me this:

    Block count: 488378368
    Reserved block count: 0
    Free blocks: 480664949

    Which seems to suggest that I don't have any reserved blocks, but some are still being used. This is an empty hard drive as I have just partitioned it.

    If I issue df -h /dev/sdb1 while it is unmounted I see this:

    udev 1.8G 0 1.8G 0% /dev

    but I don't believe that matters much.

    Running du -sh /mnt/Media reveals there is nothing on the drive:
    8.0K /mnt/Media/

    Can someone help me figure out what's really going on here? Why do I still have 28 GB reserved/used when I told it not to reserve anything. This is a hard drive for storage space only. / and /home are on another drive entirely so I really don't feel like I need 28 GB reserved.

  2. #2
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,510
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Some assistance with tune2fs

    Quote Originally Posted by psych1610 View Post
    .........
    Can someone help me figure out what's really going on here? Why do I still have 28 GB reserved/used when I told it not to reserve anything. This is a hard drive for storage space only. / and /home are on another drive entirely so I really don't feel like I need 28 GB reserved.
    Where do you think all the data about what is stored on the filesystem is kept, thin air?
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

  3. #3
    Join Date
    Jul 2008
    Beans
    28

    Re: Some assistance with tune2fs

    dcstar, Of course I realize the data has to be kept somewhere, however, I feel by saying what you did you either did not read or did not understand the question in my post.

    Let me re-state my question for you.

    When ext4 reserves 5% of space on a drive (28 GB in this case) why are there still 28 GB used after I tell it to reserve 0%. At the very least I would expect that number to drop by 5% since, you know, there's no longer anything reserved. Instead it stayed the same.

    I will readily admit to you I don't know a heck of a lot about file systems but it seems like common sense that I should have more space free and less used after the file system has stopped reserving space. Please feel free to elaborate more on what you said and explain why the amount of free space has not changed despite the file system not reserving it anymore.
    Last edited by psych1610; May 22nd, 2012 at 05:41 AM.

  4. #4
    Join Date
    Feb 2005
    Location
    Melbourne, Australia
    Beans
    13,510
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Some assistance with tune2fs

    Quote Originally Posted by psych1610 View Post
    .........
    When ext4 reserves 5% of space on a drive (28 GB in this case) why are there still 28 GB used after I tell it to reserve 0%. At the very least I would expect that number to drop by 5% since, you know, there's no longer anything reserved. Instead it stayed the same.
    ........
    Possibly you have to use resize2fs to restructure the filesystem. When you change the structure of a filesystem you usually must do more than just change a value in the definitions.
    Regards, David.
    Please use the Forum search and Wiki search for immediate help
    Please mark your thread as Solved when appropriate
    New to technical forums?: How To Ask Questions The Smart Way

Bookmarks

Posting Permissions

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