Bug 235931 - gfs2_edit command to set NOALLOC flag
gfs2_edit command to set NOALLOC flag
Status: CLOSED DUPLICATE of bug 369771
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gfs2-utils (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Robert Peterson
: FutureFeature
Depends On: 234168
  Show dependency treegraph
Reported: 2007-04-10 16:56 EDT by Nate Straz
Modified: 2010-01-11 22:38 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-12-12 15:46:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Nate Straz 2007-04-10 16:56:52 EDT
+++ 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 15:20:16 EDT
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 15:28:47 EDT
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 15:38:42 EDT
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 17:03:11 EDT
Created attachment 226091 [details]
Patch to add this function
Comment 5 Robert Peterson 2007-10-12 17:36:58 EDT
It was easier to do this in gfs2_edit rather than gfs2_tool.
Changing summary accordingly.
Comment 6 Robert Peterson 2007-12-12 15:46:11 EST
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.