LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-11-2018, 09:00 AM   #1
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 8,620
Blog Entries: 14

Rep: Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056
Reserved Blocks Does Not Keep


I have used this to set reserved blocks to 1%, but it always reverts back to 5%.

Code:
sudo tune2fs -m 1 /dev/sda1
How can I stop that from occurring?
 
Old 06-11-2018, 09:06 AM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro
Posts: 6,397

Rep: Reputation: 1238Reputation: 1238Reputation: 1238Reputation: 1238Reputation: 1238Reputation: 1238Reputation: 1238Reputation: 1238Reputation: 1238
it's just what i thought,
Code:
-m reserved-blocks-percentage
    Set the percentage of the filesystem which may only be allocated by 
privileged processes. Reserving some number of filesystem blocks for use by 
privileged processes is done to avoid filesystem fragmentation, and to allow system daemons, such as syslogd(8), to continue to function correctly after non-
privileged processes are prevented from writing to the filesystem. Normally, the
 default percentage of reserved blocks is 5%.
you can rewrite the code, find where it sets it to 5% then change that, compile it then reinstall it, but I do not know what bad effects it may have on your system.

Plus maintaining that program will then fall into your hands. that copy of it that is.

Last edited by BW-userx; 06-11-2018 at 09:18 AM.
 
1 members found this post helpful.
Old 06-11-2018, 09:28 AM   #3
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: AntiX
Posts: 2,343

Rep: Reputation: Disabled
I regularly set my / partition to just 1% & my /home partition to 0% on my AntiX/Debian based systems - never had any problems as a 'normal' user.

(It could well be the way that Slackware compiles it.)
 
1 members found this post helpful.
Old 06-11-2018, 09:34 AM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,937

Rep: Reputation: 1716Reputation: 1716Reputation: 1716Reputation: 1716Reputation: 1716Reputation: 1716Reputation: 1716Reputation: 1716Reputation: 1716Reputation: 1716Reputation: 1716
Quote:
Originally Posted by Ztcoracat View Post
I have used this to set reserved blocks to 1%, but it always reverts back to 5%.

Code:
sudo tune2fs -m 1 /dev/sda1
Where (and when) are you seeing that it has reverted to 5%?

Please post the output from "tune2fs -l /dev/sda1|grep -i 'block count'.
 
1 members found this post helpful.
Old 06-12-2018, 02:22 PM   #5
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 8,620
Blog Entries: 14

Original Poster
Rep: Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056
Thanks for the quick reply's-

I'll run that cmd and post the output when I'm off of work:-
 
Old 06-12-2018, 04:43 PM   #6
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 8,620
Blog Entries: 14

Original Poster
Rep: Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056
Here's what I get:

Code:
Block count:              421958912
Reserved block count:     4219589
 
Old 06-12-2018, 04:58 PM   #7
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19 MATE
Posts: 5,290
Blog Entries: 2

Rep: Reputation: 1707Reputation: 1707Reputation: 1707Reputation: 1707Reputation: 1707Reputation: 1707Reputation: 1707Reputation: 1707Reputation: 1707Reputation: 1707Reputation: 1707
Quote:
Originally Posted by Ztcoracat View Post
Here's what I get:

Code:
Block count:              421958912
Reserved block count:     4219589
Looks like 1% to me.
 
Old 06-12-2018, 08:31 PM   #8
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 8,620
Blog Entries: 14

Original Poster
Rep: Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056
The problem was intermittent.

I have a script:-

Last edited by Ztcoracat; 06-12-2018 at 09:33 PM.
 
Old 06-12-2018, 08:52 PM   #9
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 19 MATE
Posts: 5,290
Blog Entries: 2

Rep: Reputation: 1707Reputation: 1707Reputation: 1707Reputation: 1707Reputation: 1707Reputation: 1707Reputation: 1707Reputation: 1707Reputation: 1707Reputation: 1707Reputation: 1707
If it's intermittent in that you're setting it to 1%, it sticks, but at some point it reverts to 5%, then my only assumption is that some other program is setting it back. Can't imagine what though, unless you're running some unusual disk utility.
 
Old 06-12-2018, 09:43 PM   #10
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 8,620
Blog Entries: 14

Original Poster
Rep: Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056
Code:
#!/bin/bash
# Ubuntu_Mate 16.04 LTS
#
# Show reserved blocks
#
#It should show
#Block count:                     421958912
#Reserved block count:     4219589
#

echo marlin | sudo -S tune2fs -l /dev/sda1 > list_tune.txt
# looks for block count and IS case insensitive
#
echo "Reserved Blocks (Reserved block count should be 1% of Block count)" > list_reserved.txt
grep -i "block count" list_tune.txt >> list_reserved.txt

# Show block and reserved block counts
gxmessage -fg red -font  'sans 20' -timeout 3 -file list_reserved.txt
I found out that reducing your reserved blocks, you get more available disk space.
 
Old 06-12-2018, 09:45 PM   #11
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 8,620
Blog Entries: 14

Original Poster
Rep: Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056
Quote:
Originally Posted by hydrurga View Post
If it's intermittent in that you're setting it to 1%, it sticks, but at some point it reverts to 5%, then my only assumption is that some other program is setting it back. Can't imagine what though, unless you're running some unusual disk utility.
Nope not running a unusual disk utility. Only thing I've used so far is g-parted and Filelight.

Last edited by Ztcoracat; 06-12-2018 at 09:48 PM.
 
Old 06-13-2018, 06:39 PM   #12
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware
Posts: 8,620
Blog Entries: 14

Original Poster
Rep: Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056Reputation: 1056
Whatever it was that was causing the issue has stopped.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Setting reserved blocks percentage to 1% Fixit7 Ubuntu 6 08-28-2016 07:01 PM
Delete reserved GDT blocks from partition rockhopper_penguin Linux - Hardware 1 06-25-2014 11:24 AM
Reducing reserved blocks Changes Linux - General 1 10-23-2011 07:03 PM
Reserved blocks percentage for a partition without OS Mr. Alex Linux - Newbie 1 11-30-2010 09:26 AM
reserved-blocks-percentage not changing drive size lindylex Linux - Hardware 9 01-16-2010 05:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration