LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-02-2009, 11:44 AM   #1
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Rep: Reputation: 30
Question where is tune2fs config file?


guess it should have a config file, but cannot find where.

another question: is there a way to 'trace' where a binary file have it's config file? (as ldd does to show dependencies)

thanks in advance
 
Old 04-02-2009, 01:21 PM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
What do you want to configure exactly? The only purpose of tune2fs is to change some parameters of an existing ext2/3 filesystem. As far as I am aware there's no config file related to tune2fs, and I can't think what it would be useful for either...

To find the config files related to any tool the best place to start looking is the tool documentation. In the man pages usually config files are referenced, some man pages also have a section called "SEE ALSO" at the end where related config files and additional tools or whatever are shown as well. Tools that lack a man page maybe has an info one, or readme files under /usr/share/doc, if nothing else, then go to the tool home page and look around.
 
Old 04-02-2009, 01:43 PM   #3
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Original Poster
Rep: Reputation: 30
right, usually such data (config files) figure in the app's man page. but this one's doesn't mention config files.

Quote:
As far as I am aware there's no config file related to tune2fs, and I can't think what it would be useful for either...
do you know where does it save custom configurations? (really dont think it re-compile by itself saving new parameters in its code)

I think any app which is configurable, have to save such configurations somewhere.

what I want is to override just one option of it configuration, but I'm affraid that changing one, others will adopt a default value -and mabye this value is not the one setted right now.
maybe it have an option kinda --show-actual-settings, so after my modification I could call it again to see if something else was changed and -if so, to set back to it previous vaules.
but, let's agree that to reach directly the config file and to change just X parameter is more easy.

thanks for answering.
hasta la vista!
 
Old 04-02-2009, 01:49 PM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
Quote:
Originally Posted by minike View Post
right, usually such data (config files) figure in the app's man page. but this one's doesn't mention config files.



do you know where does it save custom configurations? (really dont think it re-compile by itself saving new parameters in its code)

I think any app which is configurable, have to save such configurations somewhere.

what I want is to override just one option of it configuration, but I'm affraid that changing one, others will adopt a default value -and mabye this value is not the one setted right now.
maybe it have an option kinda --show-actual-settings, so after my modification I could call it again to see if something else was changed and -if so, to set back to it previous vaules.
but, let's agree that to reach directly the config file and to change just X parameter is more easy.

thanks for answering.
hasta la vista!
But what configuration are you speaking about? tune2fs is a command line tool, what kind of behavior is that that you want to modify? It would be like a config file for chmod, I can't imagine what would you want to change about tune2fs at all.

You usually use tune2fs like this (just some examples)

Code:
tune2fs -O dir_index /dev/hda1
tune2fs -c 30 -i 30 /dev/sda2
There's nothing configurable in it, you just use switches to set special properties on your filesystems. And once you set the property, it's there forever, as long as you don't change it again. If you describe exactly what is that that you want to achieve I might be able to help.

Last edited by i92guboj; 04-02-2009 at 01:50 PM.
 
Old 04-02-2009, 03:09 PM   #5
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Original Poster
Rep: Reputation: 30
thanks for you answers.
as I imagine, there are (huge) difference between chmod and tune2fs.
-of course, I can be quite wrong on his- so, let's go step by step.

chmod sets(modify) r/w properties of the file which is passed as last parameter. the 'holder' of such properties is the file by itself.
(you can trick a config file for chmod where to write defaults values for it, but that's another topic)

(I guess that) tune2fs do not modify a property of the filesystem (it last argument), but set somewhere a bunch of settings which will be readed during boot-time by (which?) application, which will trigger fsck(if it's time to) passing to it those settings. (which can be different if you change them, but ... U cannot do so during boot-time, ergo, have to be 'written somewhere')
so, the last argument of tune2fs(according your examples, of course) is the filesystem over where to excecute fsck, rather than what to modify. (hope to be clear)

what I want is to modify the -c option of tune2fs *without* over-writting the other settings.(as explained in my previous post)

at this time you could tell 'just run it with -c WHAT-YOU-WANT, and other settings won't be overwritted', and this would be fine..
... but now I want to know how its settings are preserved!!!
(I bet it should have one config file.. or really would understand how it works)

cheers
 
Old 04-02-2009, 03:21 PM   #6
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
Quote:
Originally Posted by minike View Post
thanks for you answers.
as I imagine, there are (huge) difference between chmod and tune2fs.
-of course, I can be quite wrong on his- so, let's go step by step.

chmod sets(modify) r/w properties of the file which is passed as last parameter. the 'holder' of such properties is the file by itself.
(you can trick a config file for chmod where to write defaults values for it, but that's another topic)

(I guess that) tune2fs do not modify a property of the filesystem (it last argument), but set somewhere a bunch of settings which will be readed during boot-time by (which?) application, which will trigger fsck(if it's time to) passing to it those settings. (which can be different if you change them, but ... U cannot do so during boot-time, ergo, have to be 'written somewhere')
so, the last argument of tune2fs(according your examples, of course) is the filesystem over where to excecute fsck, rather than what to modify. (hope to be clear)
That's your error. It DOES modify the settings in the file system, and nowhere else. And after all, tuning /dev/hda1 is not different at all to chmoding /home/peter/foo.

These values are not read from a config file at boot up and re-set at boot time, they are stored on the same fs and they are used since the same very moment that the fs driver comes into scene, and not at a later stage.

Quote:
what I want is to modify the -c option of tune2fs *without* over-writting the other settings.(as explained in my previous post)

at this time you could tell 'just run it with -c WHAT-YOU-WANT, and other settings won't be overwritted', and this would be fine..
Those settings are embedded on the fs, and as I said on my other post, they won't change unless you run tune2fs again to change them. So, once you used -c whatever you don't ever need to worry about it again. That value won't change, and it wouldn't make any sense at all if it changed to a default value after each power off, if you think about it.

Using -c shouldn't change anything else either.
 
Old 04-02-2009, 03:24 PM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
Quote:
Originally Posted by minike View Post
maybe it have an option kinda --show-actual-settings,
I forgot about this one, there's a -l parameter that can show many fs settings, give it a try
 
Old 04-02-2009, 03:44 PM   #8
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Original Poster
Rep: Reputation: 30
this is new to me.
is there a proprety within the fs which holds the interval of programmed-checking? thought it would be external to the fs by itself.
-but justify the lack of a config file.

so, gonna use it at last ;-)

thanks 4 the explanation
 
Old 04-02-2009, 04:03 PM   #9
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
Storing data that's important for the fs inside the fs would be an unnecessary pain. You would first need to load the fs driver, mount the block device, read the config file and then adjust everything or even remount it. So it makes sense storing it on the same fs structures where you can reach the info before the fs is mounted. That's just my logic though, I can't say what the ext2 developers thought when programming it.

If you are interested you should read about the "superblock", coolest superhero ever

http://sunsite.nus.sg/LDP/LDP/tlk/node97.html
 
Old 04-02-2009, 05:06 PM   #10
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Original Poster
Rep: Reputation: 30
Thumbs up

Quote:
You would first need to load the fs driver, mount the block device, read the config file and then adjust everything or even remount it. So it makes sense storing it on the same fs structures where you can reach the info before the fs is mounted.
so the whole thing moves in a 'lower level' than what I thought.
btw: I followed the superblock link, and there is it:

Quote:
Mount Count and Maximum Mount Count
Together these allow the system to determine if the file system should be fully checked. The mount count is incremented each time the file system is mounted and when it equals the maximum mount count the warning message ``maximal mount count reached, running e2fsck is recommended'' is displayed,
in my case, aside showing a similar warning message, the ext3 fs also triggers the fsck utility (which is what I wanted to control)
now it's done.

thanks again!
 
Old 04-02-2009, 05:17 PM   #11
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
About fsck, you can control that as well using the sixth field on the relevant line in /etc/fstab (fstab has a man page as well). It controls in which order fs's are checked at init, if the field is zero then it's never checked. Not advisable though.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tune2fs: can't read an inode bitmap while trying to create journal file fhd Linux - Desktop 2 01-18-2007 04:35 AM
tune2fs -c 4 -C 3 calutateo Linux - General 2 07-06-2005 03:13 PM
I have an XF86 config file for video, how do I turn it into XORG config lowpingnoob Linux - Newbie 18 06-12-2005 12:07 PM
krfb --config; Format of config file? Need to allow ports below 1024. SavvyPlayer Linux - Software 0 10-16-2004 08:28 PM
Lan Config file / internet config file Raven_X_Neo Linux - Networking 1 10-30-2002 01:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:32 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
Open Source Consulting | Domain Registration