Bug 235931 - gfs2_edit command to set NOALLOC flag
Summary: gfs2_edit command to set NOALLOC flag
Keywords:
Status: CLOSED DUPLICATE of bug 369771
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gfs2-utils
Version: 5.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Robert Peterson
QA Contact:
URL:
Whiteboard:
Depends On: 234168
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-04-10 20:56 UTC by Nate Straz
Modified: 2010-01-12 03:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-12-12 20:46:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to add this function (10.17 KB, patch)
2007-10-12 21:03 UTC, Robert Peterson
no flags Details | Diff

Description Nate Straz 2007-04-10 20:56:52 UTC
+++ This bug was initially created as a clone of Bug #234168 +++

We will eventually need to add an interface which allows setting of the flags,
but for now, just making sure that the NOALLOC flag is obeyed correctly is the
priority so that its there for future use.

Comment 1 Robert Peterson 2007-09-17 19:20:16 UTC
This should be straightforward to do in gfs2_edit, but the question is:
what's the most useful way for this to work for you?  Suppose you have
a 50GB file system that contains 200 RGs.  Do you want to specify a
size range?  For example, something like:

gfs2_edit -rgflag NOALLOC 0G 49G /dev/vg/lv

This example would set the NOALLOC flag on for all RGs within the
range 0G to 49G.  The two RGs for 49G and 50G wouldn't have the flag.
Is that what you had in mind?  Or do you want to specify a specific
block range?  Or RG number?   RG range?  RG percent?


Comment 2 Nate Straz 2007-09-17 19:28:47 UTC
Since it's an RG flag, I would expect to specify RG numbers or a range.  That
said, is it easy to get the number of RGs?

Comment 3 Robert Peterson 2007-09-17 19:38:42 UTC
To get the number of rg index entries (and thus RGs) you can do
something like this:

gfs2_edit -p rindex /dev/roth_vg/roth1 | grep "RG index entries found: " | cut
-d ' ' -f 5

Specifying an rg number, range of numbers or series of numbers would be
easier than trying to calculate what range those RGs cover.


Comment 4 Robert Peterson 2007-10-12 21:03:11 UTC
Created attachment 226091 [details]
Patch to add this function

Comment 5 Robert Peterson 2007-10-12 21:36:58 UTC
It was easier to do this in gfs2_edit rather than gfs2_tool.
Changing summary accordingly.


Comment 6 Robert Peterson 2007-12-12 20:46:11 UTC
This should be available in the RHEL5.2 version of gfs2_edit from
gfs2-utils.  It was done for RHEL5 as part of bug #369771.  Since
most of the QE tests are needed for RHEL anyway (not Fedora) I'm
changing the product to RHEL5 and closing this bug as a duplicate
of 369771.  BTW, the fix also appears in the HEAD and RHEL5 branches
of CVS.  Here are some example commands:

gfs2_edit -p rgs /dev/sdb1
   Print all the rgs for the device

gfs2_edit -p rg 17 /dev/sdb1
   Print the contents of the eighteenth Resource Group on /dev/sdb1.

gfs2_edit rgflags 3 /dev/sdb1
   Print the rg_flags value for the fourth Resource Group on /dev/sdb1.

gfs2_edit rgflags 3 8 /dev/sdb1
   Set the GFS2_RGF_NOALLOC flag on for the fourth Resource Group.


*** This bug has been marked as a duplicate of 369771 ***


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