[opensuse] Percentage of blocks reserved for root on ext3 formatted partitions
In Yast Partitioner, when formatting a partition as ext3, there is an option described as 'Percentage of blocks reserved for root'. The default value is 'auto' = 5% What does this mean? Is 5% of the partition not available to an ordinary user? Bob -- Registered Linux User #463880 FSFE Member #1300 GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E openSUSE 11.0, Kernel 2.6.25.11-0.1-default, KDE 4.1.1 Intel Celeron 2.53GB, 2GB DDR RAM, nVidia GeForce 7600GS -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Bob Williams pecked at the keyboard and wrote:
In Yast Partitioner, when formatting a partition as ext3, there is an option described as 'Percentage of blocks reserved for root'. The default value is 'auto' = 5%
What does this mean? Is 5% of the partition not available to an ordinary user?
Bob
That is correct. The 5% is reserved for logs that get too big or root, more correctly so root can log in and create his login temp files while working to free up space. This number can be changed but never change it to 0. -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sunday 21 September 2008 17:55:56 Ken Schneider wrote:
Bob Williams pecked at the keyboard and wrote:
In Yast Partitioner, when formatting a partition as ext3, there is an option described as 'Percentage of blocks reserved for root'. The default value is 'auto' = 5%
What does this mean? Is 5% of the partition not available to an ordinary user?
Bob
That is correct. The 5% is reserved for logs that get too big or root, more correctly so root can log in and create his login temp files while working to free up space. This number can be changed but never change it to 0.
That's very interesting. On a 750GB disc, the amount allocated to root is therefore 37.5GB, which seems a mighty big log file. Or does it function as a kind of local swapfile if the disc gets too full? Similar to Windows defragmenter needing 15% freespace. Do you think 1% (equivalent to 7.5GB in my example above) would be sufficient? I'm talking about an external SATA drive that's used for backups and archives. Bob -- Registered Linux User #463880 FSFE Member #1300 GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E openSUSE 11.0, Kernel 2.6.25.11-0.1-default, KDE 4.1.1 Intel Celeron 2.53GB, 2GB DDR RAM, nVidia GeForce 7600GS -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Bob Williams a écrit :
That's very interesting. On a 750GB disc, the amount allocated to root is therefore 37.5GB, which seems a mighty big log file. Or does it function as a kind of local swapfile if the disc gets too full? Similar to Windows defragmenter needing 15% freespace.
it's not allocated to root, it's only the minimum amount of free space a disk allow a simple user to let. A normal user can't use the disk if free space is under this value. anyway, nearly no system will work with so little room. are you sure this is for *any* partition? should be only for root (/) jdd -- jdd for the Linux Documentation Project http://wiki.tldp.org http://www.dodin.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sunday 21 September 2008 18:30:11 jdd for http://tldp.org wrote:
Bob Williams a écrit :
That's very interesting. On a 750GB disc, the amount allocated to root is therefore 37.5GB, which seems a mighty big log file. Or does it function as a kind of local swapfile if the disc gets too full? Similar to Windows defragmenter needing 15% freespace.
it's not allocated to root, it's only the minimum amount of free space a disk allow a simple user to let. A normal user can't use the disk if free space is under this value.
anyway, nearly no system will work with so little room.
are you sure this is for *any* partition? should be only for root (/)
Yes. *Any* partition. -- Registered Linux User #463880 FSFE Member #1300 GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E openSUSE 11.0, Kernel 2.6.25.11-0.1-default, KDE 4.1.1 Intel Celeron 2.53GB, 2GB DDR RAM, nVidia GeForce 7600GS -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sunday 21 September 2008 12:30:11 pm jdd for http://tldp.org wrote:
Bob Williams a écrit :
That's very interesting. On a 750GB disc, the amount allocated to root is therefore 37.5GB, which seems a mighty big log file. Or does it function as a kind of local swapfile if the disc gets too full? Similar to Windows defragmenter needing 15% freespace.
it's not allocated to root, it's only the minimum amount of free space a disk allow a simple user to let. A normal user can't use the disk if free space is under this value.
anyway, nearly no system will work with so little room.
are you sure this is for *any* partition? should be only for root (/)
It is for / on another disk that has no system on it, so probably no need for even 1% reserved. That is set during file system creation and probably can be changed with tune2fs utility, if ext3 is used. -- Regards, Rajko -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2008/09/21 18:11 (GMT+0100) Bob Williams composed:
On Sunday 21 September 2008 17:55:56 Ken Schneider wrote:
Bob Williams pecked at the keyboard and wrote:
In Yast Partitioner, when formatting a partition as ext3, there is an option described as 'Percentage of blocks reserved for root'. The default value is 'auto' = 5%
What does this mean? Is 5% of the partition not available to an ordinary user?
That is correct. The 5% is reserved for logs that get too big or root, more correctly so root can log in and create his login temp files while working to free up space. This number can be changed but never change it to 0.
Also, the reserved space is non-existent in df output. As root, you can still grow files after disk use hits 100%.
Do you think 1% (equivalent to 7.5GB in my example above) would be sufficient? I'm talking about an external SATA drive that's used for backups and archives.
Probably depends on actual usage of the space it contains. If I ever actually used a triple digit partition size, I certainly would reduce it. For storing infrequently written mostly A/V &/or iso files, you might consider also using ext2, and having no journal files eating into available space or cutting into net I/O speed. -- "Unless the Lord builds the house, its builders labor in vain." Psalm 127:1 NIV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hello, On Sun, 21 Sep 2008, Bob Williams wrote: [..]
That's very interesting. On a 750GB disc, the amount allocated to root is therefore 37.5GB, which seems a mighty big log file. Or does it function as a kind of local swapfile if the disc gets too full? Similar to Windows defragmenter needing 15% freespace.
No, it's functions only as "reserved", for when the disk is (almost) full and some space for logging is required or root needs some space left to clean up.
Do you think 1% (equivalent to 7.5GB in my example above) would be sufficient?
Yes. More than sufficient. 0.1% would feel about right, unless it's just a data-dump seeing no "live action". With "data-dump" defined as a filesystem, to or from which files are moved/copied occasionally and otherwise "rest" unchanged on that filesystem. I.e. no log-files, no textfiles being edited etc., no stuff being generated by some program.
I'm talking about an external SATA drive that's used for backups and archives.
In that case, I'd simply use '0%' as that seems to qualify as a "data-dump". If the disk is full, it's full, and the backup fails. And backups run usually as root anyway. The 5% default is from times when drives and partitions were much smaller than today. I dare say 1 GB of reserved space is the upper limit of usefulness in most cases. On smallish partitions (<20 GB), used as /, /var or /home etc., I use the default 5%, on largish partitions less (e.g. 2%), depending on use. On mere "data-dumps" like your external drive '0%' is reasonable. If you store only few large files on a FS, creating the FS with fewer inodes could also be considered (e.g. '-T largefile', see 'man mke2fs' for details. Ext2 can be considered, but what's the e.g. 130 MB of the journal vs. fsck-time after a crash? Especially when, as in my uses, filesizes are mostly 300 MB and above anyway. If all else fails, you can convert ext3 back to ext2 (tune2fs -O ^has_journal) as long as you haven't used other ext3 specific features. BTW, at least 'tune2fs -m' understands decimals, so you can use e.g. tune2fs -m 0.1 /dev/... This little "one-liner"[1] might help, it assumes all partitions are ext2/3: ==== #!/bin/bash for d in $(awk '/dev\/([hs]d|root)/ { print $1; }' /proc/mounts); do tune2fs -l "$d" | awk -vd="$d" -F':' ' BEGIN { G=1024^3; } /Block size/ { S=$2; } /Reserved block count/ { r = $2; } /Block count/ { b = $2; } END { printf "%s\t % 4.1f GB of % 6.1f GB = %.0f%%\n", d, r*S/G, b*S/G, r*100/b; }'; done ==== It prints the device, the size of reserved space, the size of the partition and the corresponding percentage of reserved space. HTH & HAND, -dnh [1] developed as such, changed here for readability -- So Linus, what are we doing tonight? The same thing we do every night Tux. Try to take over the world! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Ken Schneider wrote:
Bob Williams pecked at the keyboard and wrote:
In Yast Partitioner, when formatting a partition as ext3, there is an option described as 'Percentage of blocks reserved for root'. The default value is 'auto' = 5%
What does this mean? Is 5% of the partition not available to an ordinary user?
Bob
That is correct. The 5% is reserved for logs that get too big or root, more correctly so root can log in and create his login temp files while working to free up space. This number can be changed but never change it to 0.
Quite so. I have on occasion noticed that root could log in, while mere mortals couldn't. It was usually caused by the partition holding /tmp getting full. -- Use OpenOffice.org <http://www.openoffice.org> -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (7)
-
Bob Williams
-
David Haller
-
Felix Miata
-
James Knott
-
jdd for http://tldp.org
-
Ken Schneider
-
Rajko M.