LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Puppy (https://www.linuxquestions.org/questions/puppy-71/)
-   -   Lower reserved space used in partitions (https://www.linuxquestions.org/questions/puppy-71/lower-reserved-space-used-in-partitions-4175525238/)

Fixit7 11-12-2014 05:53 PM

Lower reserved space used in partitions
 
I have a partition with a single file of 47,000 bytes.

Yet, G-Parted says there are 648 Mbs being used ?

Code:

What filesystem is it formatted in? What is the size of the partition?

Linux filesystems have "reserved" space to avoid out of space errors. This can be reduced.

I used tune2fs -l /dev/sda3 which is supposed to reduce the number of reserved blocks. (Is that the same as sectors ?)

It did not change the % of reserved blocks. ??

It is still 5 %.

Any tune2fs gurus who can help ? :-)

# tune2fs -l /dev/sda3
tune2fs 1.42.9 (4-Feb-2014)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: a1fd8206-accd-4db5-adb6-759ef3131583
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype sparse_super large_file
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 3178496
Block count: 12712192
Reserved block count: 635609
Free blocks: 12466631
Free inodes: 3178485
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 1020
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8192
Inode blocks per group: 512
Filesystem created: Tue Nov 11 17:51:01 2014
Last mount time: Wed Nov 12 12:22:47 2014
Last write time: Wed Nov 12 12:35:51 2014
Mount count: 6
Maximum mount count: -1
Last checked: Tue Nov 11 17:51:01 2014
Check interval: 0 (<none>)
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 28
Desired extra isize: 28
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: 65911735-63a7-4bd0-a206-10c5d12304a4
Journal backup: inode blocks

rknichols 11-12-2014 06:31 PM

First, the reserved space does not show up as "used" in gparted. Two things that do cause "used" space on an otherwise empty filesystem are (a) the journal and (b) space claimed by the resize inode. But, those should not be using up 648MB on your 52GB filesystem. Something around 180MB to 200MB would be more likely.

Second, tune2fs with the "-l" option just displays the filesystem status. It doesn't change anything.

Does this filesystem contain any directories that are in use as mount points? If so, there can be files hidden under those mount point directories.

And BTW, eliminating the reserved space is not advised on a filesystem for general use. If you reduce the free space much below 5% fragmentation can become an issue since the allocator is forced to pick up whatever scraps of space it can find. If you really want to reduce it, "tune2fs -m <percentage>" or "tune2fs -r <blocks>" will do that, e.g., "tune2fs -r 0 /dev/sda3".

Fixit7 11-12-2014 08:03 PM

Quote:

Originally Posted by rknichols (Post 5268963)
First, the reserved space does not show up as "used" in gparted. Two things that do cause "used" space on an otherwise empty filesystem are (a) the journal and (b) space claimed by the resize inode. But, those should not be using up 648MB on your 52GB filesystem. Something around 180MB to 200MB would be more likely.

Second, tune2fs with the "-l" option just displays the filesystem status. It doesn't change anything.

Does this filesystem contain any directories that are in use as mount points? If so, there can be files hidden under those mount point directories.".

I do not understand the last statement.

I also have no plans to eliminate all the reserved space.

I know NTFS is a different file system, but it does not reserve 5% of disk space.

I will be happy reducing it to 3%.

Thanks and take care.

Fixit7 11-12-2014 08:36 PM

After rebooting, nothing changed.

Time to give up.

Fixit7 11-13-2014 09:57 PM

Knowing that ext3 is much more secure if there is a power outage or my computer freezes up, is worth 5% of the hard drive.

Speaking of freezing up.

If my computer does freeze up, and Ctrl Alt Delete does not help, is there anything else I can do besides push my power button ?

Does Puppy keep a log file of "fatal events" so I can tell what is causing the problem ?

rknichols 11-14-2014 10:53 AM

The 5% reserved space doesn't really have any relation to the robustness of the filesystem. It's just to leave some working room for recovery if a non-privileged program runs amok filling space and also to allow the spae allocator to work efficiently. The biggest factor in robustness is the journal. And FWIW, NTFS is also considered to be a pretty robust filesystem not prone to major corruption from OS crashes or power cuts.

If your computer freezes, one possibility is that it's just the graphic subsystem that froze up, and if you have a second networked machine you might be able to log in via SSH and perhaps kill a hung screensaver (if that's the problem) or restart the GUI by switching to a non-GUI runlevel and then back, or perhaps just do a controlled reboot. Without that, if a short press on the power button doesn't initiate a power-down sequence and the machine lacks a reset button, the only choice is a long press on the power button. If there is a reset button, using that is a bit easier on the hardware than a forced power-down. The two are pretty much the same from an OS viewpoint.

From your "Time to give up" statement, I take it you're not interested in pursuing what is using those 648MB, right? I can suggest some things to look at if you're interested in doing that.

Fixit7 11-14-2014 06:48 PM

I would still like to know what is using those 648 Mbtes.

I love learning new things.

rknichols 11-14-2014 08:37 PM

OK. With the filesystem mounted, what does "df" report for /dev/sda3, and if you "cd" to the directory where it is mounted, what does "du -c -k --max-depth=1 ." report? (If there are any names in that listing that you would rather not reveal, feel free to change them to something harmless.)

Fixit7 11-14-2014 09:22 PM

# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda5 84816360 2311952 80781024 3% /
devtmpfs 1505304 0 1505304 0% /dev
shmfs 747860 0 747860 0% /dev/shm
tmpfs 747860 504 747356 1% /tmp
/dev/sda1 45458396 11248968 34209428 25% /mnt/sda1
/dev/sdb1 488386524 29234604 459151920 6% /mnt/sdb1
/dev/sda4 110797640 9117620 99428740 9% /mnt/sda4
/dev/sdc1 1952008 1951748 260 100% /mnt/sdc1

# du -c -k --max-depth=1

2832 ./audit
51056111 ./mnt
6136 ./boot
1300 ./var
du: cannot access ‘./proc/11210/task/11210/fd/4’: No such file or directory
du: cannot access ‘./proc/11210/task/11210/fdinfo/4’: No such file or directory
du: cannot access ‘./proc/11210/fd/4’: No such file or directory
du: cannot access ‘./proc/11210/fdinfo/4’: No such file or directory
0 ./proc
4412 ./slackosave-Puppy_5.9.3
12 ./Recycled
4 ./data
3864 ./etc
6596 ./bin
1244628 ./usr
8 ./install
4 ./opt
99036 ./lib
750848 ./root
0 ./sys
504 ./tmp
0 ./dev
4028 ./sbin
53180331 .
53180331 total
#

rknichols 11-14-2014 10:17 PM

Your original post was about /dev/sda3, which supposedly had just one 47000 byte file. I don't see that drive listed anywhere in the df output, and the du output is for your root filesystem (/dev/sda5). I can't match up any of that df output with the tune2fs listing that you originally posted. If you are interested in /dev/sda3, you will have to mount that partition somewhere, then "cd" to that directory and run the "df" and "du -c -k --max-depth=1 ." commands.

Fixit7 11-15-2014 02:34 PM

I don't have that partition anymore.

I did those commands on my primary O.S.

rknichols 11-15-2014 09:17 PM

Quote:

Originally Posted by Fixit7 (Post 5270250)
I don't have that partition anymore.

Then there's no point in pursuing this.

Fixit7 11-15-2014 10:02 PM

Why not ?

Does the partition have to be empty ?

I would still like to free up some space if possible.

michaelk 11-15-2014 10:15 PM

Look at the tune2fs -m option.

The partition does not have to be empty but since it was deleted any clues to solve your question are now gone.

Fixit7 11-15-2014 11:34 PM

All partitions have that 5% reserved. It should not matter because if I delete and then create a new partition, it will also have the same large 5% reserved. Do not help if you don't want to. I am curious that Ntfs is a stable file system without any reserved sectors.


All times are GMT -5. The time now is 01:05 AM.