Bug 505061 - RFE: Add tunegfs2 tool to gfs2-utils
Summary: RFE: Add tunegfs2 tool to gfs2-utils
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gfs2-utils
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Steve Whitehouse
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 639369
Blocks: 685136
TreeView+ depends on / blocked
 
Reported: 2009-06-10 14:51 UTC by Steve Whitehouse
Modified: 2011-03-15 11:48 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-12-13 17:02:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Add tunegfs2 main file (4.18 KB, patch)
2010-07-30 00:23 UTC, Goldwyn Rodrigues
no flags Details | Diff
[2/3] Superblock operations (4.86 KB, patch)
2010-07-30 00:24 UTC, Goldwyn Rodrigues
no flags Details | Diff
[3/3] Makefile changes (1.87 KB, patch)
2010-07-30 00:25 UTC, Goldwyn Rodrigues
no flags Details | Diff
[1/3] Add tunegfs2 main file (4.51 KB, patch)
2010-07-31 01:25 UTC, Goldwyn Rodrigues
no flags Details | Diff
[2/3] Superblock operations (5.03 KB, patch)
2010-07-31 01:26 UTC, Goldwyn Rodrigues
no flags Details | Diff
[3/3] Makefile changes (1.87 KB, patch)
2010-07-31 01:27 UTC, Goldwyn Rodrigues
no flags Details | Diff
Fix install path (695 bytes, patch)
2010-08-09 17:15 UTC, Goldwyn Rodrigues
no flags Details | Diff

Description Steve Whitehouse 2009-06-10 14:51:26 UTC
I would like to have a tool called tunegfs2 which would be "argument compatible" with tune2fs where possible. This tool would deal only with settings relating to the super block.

Eventually when gfs2_tool is no longer required to set the various sysfs tune parameters, that tool will be obsolete and tunegfs2 would be the new way to change super block options.

-L for setting the volume label (fsname)
-U for setting the UUID
-l list the contents of the super block
-o to set mount options (i.e. the locking type)

It is debatable as to whether we'd want to support any of the journal adding options since we already have gfs2_jadd and our journal adding is different to that of ext3.

Comment 2 Steve Whitehouse 2010-07-16 13:19:16 UTC
To clarify my thoughts on this one.... I'd like to see a tool which:

1. Supports both gfs and gfs2 (obviously -U option doesn't apply to gfs1)
2. Does not use libgfs2 (standalone)
3. Has the hooks in it for translation of strings (see other gfs2-tools for example)
4. Is small and simple

Comment 3 Steve Whitehouse 2010-07-22 09:39:20 UTC
Goldwyn, you should be able to see everything now. Let me know if there is anything more you need.

Comment 4 Goldwyn Rodrigues 2010-07-24 01:36:32 UTC
Steve: Could you elaborate on -o option of the tool. How do you want the -o option to work?

Is it to be specified as "-o lock_dlm" or "-o lock_nolock"? If yes, won't -p be a better option like it is in mkfs?

Comment 5 Steve Whitehouse 2010-07-24 15:30:46 UTC
I was thinking -o lockproto=lock_dlm,locktable=sometable

In other words, they should be specified as if they are mount options to the filesystem in order to match the tune2fs way of doing things. We cannot specify the defaults for other mount options at the moment, due to the way in which the lock info is stored in the sb, but doing it this way would allow us to add such things should we change the sb to allow it in the future.

I'd rather stick with the tune2fs arguments rather than use the ones from our mkfs function some of which are non-standard, like -p

Comment 6 Goldwyn Rodrigues 2010-07-30 00:23:12 UTC
Created attachment 435437 [details]
Add tunegfs2 main file

Comment 7 Goldwyn Rodrigues 2010-07-30 00:24:45 UTC
Created attachment 435438 [details]
[2/3] Superblock operations

I am not sure the way I am calculating the start of superblock. Could someone verify that?

Comment 8 Goldwyn Rodrigues 2010-07-30 00:25:33 UTC
Created attachment 435439 [details]
[3/3] Makefile changes

Comment 9 Steve Whitehouse 2010-07-30 09:33:14 UTC
That looks like a pretty good start to me. Do you have access to the gfs2-utils git tree? if not then we should try and arrange access for you.

My only real comments are that it would be nice to eliminate the need for libgfs2 (even if that means copying the odd function into the code) since the functions in the library are, in general, not very well designed and it is tricky to make changes since they tend to be used by a number of different utilities and they often all want something slightly different from the same function. Its not that big a deal though if its going to be tricky to do.

Also we need to allow for gfs1 support too. That will probably require copying in the header with gfs1 on-disk structures from the gfs1 code.

Otherwise, that looks like a really good start, many thanks for looking into this and for making such fast progress. It is very much appreciated.

Comment 10 Goldwyn Rodrigues 2010-07-30 14:19:05 UTC
(In reply to comment #9)
> That looks like a pretty good start to me. Do you have access to the gfs2-utils
> git tree? if not then we should try and arrange access for you.

Yes, I have read-only access.

> My only real comments are that it would be nice to eliminate the need for
> libgfs2 (even if that means copying the odd function into the code) since the
> functions in the library are, in general, not very well designed and it is
> tricky to make changes since they tend to be used by a number of different
> utilities and they often all want something slightly different from the same
> function. Its not that big a deal though if its going to be tricky to do.

I am not using the libgfs2 library, but the header only. In any case, we should be able to eliminate the header as well. Let me check that.

> 
> Also we need to allow for gfs1 support too. That will probably require copying
> in the header with gfs1 on-disk structures from the gfs1 code.

I din't look hard enough for these data structures.. only looked in the kernel tree. I have now found them in the gfs1-utils, and will incorporate it.

Comment 11 Steve Whitehouse 2010-07-30 15:32:29 UTC
Ok, sounds good. We should be able to arrange write access to gfs2-utils for you rather than just read access. Do you have a FAS account?

Comment 12 Goldwyn Rodrigues 2010-07-31 01:24:45 UTC
(In reply to comment #11)
> Ok, sounds good. We should be able to arrange write access to gfs2-utils for
> you rather than just read access. Do you have a FAS account?    

Thanks. Just created a FAS account. username: goldwyn

Comment 13 Goldwyn Rodrigues 2010-07-31 01:25:54 UTC
Created attachment 435705 [details]
[1/3] Add tunegfs2 main file

Comment 14 Goldwyn Rodrigues 2010-07-31 01:26:29 UTC
Created attachment 435706 [details]
[2/3] Superblock operations

Comment 15 Goldwyn Rodrigues 2010-07-31 01:27:00 UTC
Created attachment 435707 [details]
[3/3] Makefile changes

Comment 16 Goldwyn Rodrigues 2010-07-31 01:31:36 UTC
I figured out that importing structures is not required. All requirements to include libgfs2.h have been eliminated. Only linux_endian.h from the group includes is required now. 

The program now reads gfs1 data into the gfs2 structure. The program behaves differently only to handle UUID (which is missing in GFS1)

Comment 21 Goldwyn Rodrigues 2010-08-07 02:56:46 UTC
Patches committed to gfs2-utils.git
Now it has better UUID handling.

Not sure what the status of the bug should be now.

Comment 22 Steve Whitehouse 2010-08-09 15:10:27 UTC
Well with Fedora bugs, I don't tend to worry too much. We could close it as "upstream" or keep it open until the tools appears in fedora and close it then. Might be useful to keep it open just for a little bit to track progress and then close it if there are no further issues in a little while.

Thanks for working on this one though, its really helped push this forward.

Comment 23 Fabio Massimo Di Nitto 2010-08-09 15:17:40 UTC
Can we please get the install path of the tool fixed?

I mailed a comment for the Makefile.am patch that is incorrect, I´d like that to see addressed.

Comment 24 Goldwyn Rodrigues 2010-08-09 17:15:11 UTC
Created attachment 437655 [details]
Fix install path

(In reply to comment #23)
> Can we please get the install path of the tool fixed?
> 
> I mailed a comment for the Makefile.am patch that is incorrect, I´d like that
> to see addressed.

I did not receive any mail. Did you send it to the mailing list?
In any case, the attached patch should put the installable in /usr/sbin instead of /sbin. If that is correct, I will push the patch.

Comment 25 Fabio Massimo Di Nitto 2010-08-09 18:01:41 UTC
(In reply to comment #24)
> Created an attachment (id=437655) [details]
> Fix install path

ACK'ed.

> 
> (In reply to comment #23)
> > Can we please get the install path of the tool fixed?
> > 
> > I mailed a comment for the Makefile.am patch that is incorrect, I´d like that
> > to see addressed.
> 
> I did not receive any mail. Did you send it to the mailing list?

Both to cluster-devel and your fedora email address.

> In any case, the attached patch should put the installable in /usr/sbin instead
> of /sbin. If that is correct, I will push the patch.    

Yeps, that's fine. Push at will.

Fabio

Comment 26 Goldwyn Rodrigues 2010-08-09 19:34:34 UTC
(In reply to comment #25)
> (In reply to comment #24)
> > Created an attachment (id=437655) [details] [details]
> > Fix install path
> 
> ACK'ed.
> 

This patch is pushed as well. Thanks for your review.

Comment 27 Steve Whitehouse 2010-10-04 10:15:04 UTC
This will appear in fedora just as soon a gfs2-utils reappears as a package in its own right.

Comment 28 Fedora Admin XMLRPC Client 2010-12-02 17:06:23 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.


Note You need to log in before you can comment on or make changes to this bug.