Blame gfs2/man/gfs2_edit.8

Packit Service 360c39
.TH gfs2_edit 8
Packit Service 360c39
Packit Service 360c39
.SH NAME
Packit Service 360c39
gfs2_edit - Display, print or edit GFS2 or GFS internal structures.
Packit Service 360c39
Packit Service 360c39
.SH SYNOPSIS
Packit Service 360c39
.B gfs2_edit
Packit Service 360c39
[\fIOPTION\fR]... [\fIDEVICE\fR]
Packit Service 360c39
Packit Service 360c39
.SH DESCRIPTION
Packit Service 360c39
The gfs2_edit command is a tool used to examine, edit or
Packit Service 360c39
display internal data structures of a GFS2 or GFS file system.
Packit Service 360c39
The gfs2_edit command can be run interactively, as described
Packit Service 360c39
below in INTERACTIVE MODE.
Packit Service 360c39
Packit Service 360c39
Caution: Several options of the gfs2_edit command alter the
Packit Service 360c39
file system metadata and can cause file system corruption.
Packit Service 360c39
These options should be used with great care.
Packit Service 360c39
Packit Service 360c39
.SH OPTIONS
Packit Service 360c39
.TP
Packit Service 360c39
\fB-p\fP [\fIstruct\fR | \fIblock\fR] [\fIblocktype\fR] [\fIblockalloc [val]\fR] [\fIblockbits\fR] [\fIblockrg\fR] [\fIfind sb|rg|rb|di|in|lf|jd|lh|ld|ea|ed|lb|13|qc\fR] [\fIfield <field> [val]\fR]
Packit Service 360c39
Print a gfs2 data structure in human-readable format to stdout.
Packit Service 360c39
You can enter either a block number or a data structure name.  Block numbers
Packit Service 360c39
may be specified in hex (e.g., 0x10) or decimal (e.g., 16).
Packit Service 360c39
Packit Service 360c39
You can specify the following well-known locations with the -p option.
Packit Service 360c39
Packit Service 360c39
\fIsb\fR, \fIsuperblock\fR - Print the superblock.
Packit Service 360c39
Packit Service 360c39
\fIroot\fR - Print the root directory.
Packit Service 360c39
Packit Service 360c39
\fImaster\fR - Print the master system directory.
Packit Service 360c39
Packit Service 360c39
\fIjindex\fR - Print the journal index system directory.
Packit Service 360c39
Packit Service 360c39
\fIper_node\fR - Print the per_node system directory.
Packit Service 360c39
Packit Service 360c39
\fIinum\fR - Print the system inum file.
Packit Service 360c39
Packit Service 360c39
\fIstatfs\fR - Print the system statfs file.
Packit Service 360c39
Packit Service 360c39
\fIrindex\fR, \fIrgindex\fR - Print the resource group index system file.
Packit Service 360c39
Packit Service 360c39
\fIrg X\fR - Print the resource group information for RG X (zero-based).
Packit Service 360c39
Packit Service 360c39
\fIrgs\fR - Print the resource group information.
Packit Service 360c39
Packit Service 360c39
\fIquota\fR - Print the contents of the system quota file.
Packit Service 360c39
Packit Service 360c39
\fIidentify\fR - Identify a data block rather than print the block's contents.
Packit Service 360c39
Packit Service 360c39
\fIsize\fR - Print the device size information.
Packit Service 360c39
Packit Service 360c39
\fIjournalX\fR - Print the contents of journal X, where X is a journal
Packit Service 360c39
number from 0 to <the number of journals in your file system - 1>.
Packit Service 360c39
Only the journal headers and journal descriptors are dumped.  For journal
Packit Service 360c39
descriptors, this option prints out every file system block number logged
Packit Service 360c39
in that section of the journal.  The actual journaled blocks are not printed.
Packit Service 360c39
Packit Service 360c39
If you specify a block number rather than a structure name, gfs2_edit will
Packit Service 360c39
print out a breakdown of the structure for that block.
Packit Service 360c39
For example: \fBgfs2_edit -p sb\fP will print the superblock, but so does
Packit Service 360c39
\fBgfs2_edit -p 0x10\fP and \fBgfs2_edit -p 16\fP.
Packit Service 360c39
Packit Service 360c39
If you specify -p without a block or structure name, gfs2_edit prints the
Packit Service 360c39
superblock.
Packit Service 360c39
Packit Service 360c39
You can specify more than one data structure with a single -p option.
Packit Service 360c39
For example, \fBgfs2_edit -p inum statfs /dev/sda1\fP prints the system inum
Packit Service 360c39
file and the system statfs file on /dev/sda1.
Packit Service 360c39
Packit Service 360c39
Optionally, you may specify the keyword \fIblocktype\fR to print out the
Packit Service 360c39
gfs2 block type for the specified block.  Valid gfs2 block types are:
Packit Service 360c39
0 (Clump), 1 (Superblock), 2 (Resource Group Header), 3 (Resource Group
Packit Service 360c39
Bitmap), 4 (Dinode), 5 (Indirect Block), 6 (Leaf), 7 (Journaled data),
Packit Service 360c39
8 (Log Header), 9 (Log descriptor), 10 (Extended attribute),
Packit Service 360c39
11 (Eattr Data), 12 (Log Buffer), 13 (Invalid), and 14 (Quota Change).
Packit Service 360c39
Packit Service 360c39
Optionally, you may specify the keyword \fIblockalloc\fR with an
Packit Service 360c39
optional value to assign.  If no value is specified, the blockalloc
Packit Service 360c39
keyword will print the block allocation type for the specified block.
Packit Service 360c39
Valid block allocation types are: 0 (Free block), 1 (Data block),
Packit Service 360c39
2 (Unlinked block), and 3 (Metadata block).  If a value from 0 to 3 is
Packit Service 360c39
specified, the resource group bitmap will be changed to the new value.
Packit Service 360c39
This may be used, for example, to artificially free or allocate a block
Packit Service 360c39
in order to test fsck.gfs2's ability to detect and fix the problem.
Packit Service 360c39
Packit Service 360c39
Optionally, you may specify the keyword \fIblockbits\fR.  This option
Packit Service 360c39
will locate and print the block containing the bitmap corresponding to
Packit Service 360c39
the specified block.
Packit Service 360c39
Packit Service 360c39
Optionally, you may specify the keyword \fIblockrg\fR.  This option
Packit Service 360c39
will locate and print the block number of the resource group that holds
Packit Service 360c39
information about the specified block.
Packit Service 360c39
Packit Service 360c39
You may also use gfs2_edit to find the next occurrence of a metadata
Packit Service 360c39
block of a certain type.  Valid metadata types are: \fInone\fR (unused
Packit Service 360c39
metadata clump block), \fIsb\fR (superblock), \fIrg\fR (resource group),
Packit Service 360c39
\fIrb\fR (rg bitmap), \fIdi\fR (disk inode aka dinode), \fIin\fR (indirect
Packit Service 360c39
block list), \fIlf\fR (directory leaf), \fIjd\fR (journaled data),
Packit Service 360c39
\fIlh\fR (journal log header), \fIld\fR (journal log descriptor),
Packit Service 360c39
\fIea\fR (extended attribute), \fIed\fR (ea data block), \fIlb\fR (log buffer),
Packit Service 360c39
\fI13\fR (unused block type 13), \fIqc\fR (quota change).
Packit Service 360c39
The block AFTER the one specified with -p is the starting point for
Packit Service 360c39
the search.  For example, if you specify \fBgfs2_edit -p rg 12 find rg
Packit Service 360c39
/dev/your/device\fP, it will find the rg that follows rg 12 (normally,
Packit Service 360c39
this would be rg 13).  Note, however, that since metadata often appears
Packit Service 360c39
in the journals, it could be a copy of a different RG, inside a journal.
Packit Service 360c39
Also note that gfs2_edit will only find \fBallocated\fR metadata blocks
Packit Service 360c39
unless the type specified is none, sb, rg or rb.  In other words, if you
Packit Service 360c39
try to find a disk inode, it will only find an allocated dinode, not a
Packit Service 360c39
deallocated one.
Packit Service 360c39
Packit Service 360c39
Optionally, you may specify the keyword \fIfield\fR followed by a
Packit Service 360c39
valid metadata field name.  Right now, only the fields in disk inodes
Packit Service 360c39
and resource groups are allowed.  If no value is specified after the
Packit Service 360c39
field, the value of the field will be printed to stdout.  If a value
Packit Service 360c39
is specified, the field's value will be changed.  This may be used,
Packit Service 360c39
for example, to artificially change the di_size field for an inode
Packit Service 360c39
in order to test fsck.gfs2's ability to detect and fix the problem.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
\fB-s\fs [\fIstructure\fR | \fIblock\fR]
Packit Service 360c39
Specify a starting block for interactive mode.  Any of the well-known
Packit Service 360c39
locations found in the -p option may be specified.  If you want to start
Packit Service 360c39
on a particular resource group, specify it in quotes, e.g. -s "rg 3"
Packit Service 360c39
.TP
Packit Service 360c39
\fB-h, -help, -usage\fP
Packit Service 360c39
Print help information.
Packit Service 360c39
.TP
Packit Service 360c39
\fB-c\fP [\fI0\fR | \fI1\fR]
Packit Service 360c39
Use alternate color scheme for interactive mode: 0=normal (dark colors on
Packit Service 360c39
white background), or 1 (light colors on black background).
Packit Service 360c39
.TP
Packit Service 360c39
\fB-V\fP
Packit Service 360c39
Print program version information only.
Packit Service 360c39
.TP
Packit Service 360c39
\fB-x\fP
Packit Service 360c39
Print in hex mode.
Packit Service 360c39
.TP
Packit Service 360c39
\fB-z <0-9>\fP
Packit Service 360c39
Compress metadata with gzip compression level 1 to 9 (default 9). 0 means no compression at all.
Packit Service 360c39
.TP
Packit Service 360c39
\fBrg\fP \fI<rg>\fR \fI<device>\fR
Packit Service 360c39
Print the contents of Resource Group \fI<rg>\fR on \fI<device>\fR.
Packit Service 360c39
Packit Service 360c39
\fI<rg>\fR is a number from 0 to X - 1, where X is the number of RGs.
Packit Service 360c39
.TP
Packit Service 360c39
\fBrgcount\fP \fI<device>\fR
Packit Service 360c39
Print the number of Resource Groups in the file system on \fI<device>\fR.
Packit Service 360c39
.TP
Packit Service 360c39
\fBrgflags\fP \fI<rg>\fR [\fInew_value\fR] \fI<device>\fR
Packit Service 360c39
Print and/or modify the rg_flags value of Resource Group \fI<rg>\fR on
Packit Service 360c39
\fI<device>\fR.
Packit Service 360c39
Packit Service 360c39
\fI<rg>\fR is a number from 0 to X - 1, where X is the number of RGs.
Packit Service 360c39
If \fInew_value\fR is not specified, the current rg_flags value will be
Packit Service 360c39
printed but not modified.  If \fInew_value\fR is specified, the rg_flags
Packit Service 360c39
field will be overwritten with the new value.
Packit Service 360c39
.TP
Packit Service 360c39
\fBprintsavedmeta\fP \fI<filename.gz>\fR
Packit Service 360c39
Print off a list of blocks from <filename.gz> that were saved with the savemeta
Packit Service 360c39
option.
Packit Service 360c39
.TP
Packit Service 360c39
\fBsavemeta\fP \fI<device>\fR \fI<filename.gz>\fR
Packit Service 360c39
Save off the GFS2 metadata (not user data) for the file system on the
Packit Service 360c39
specified device to a file given by <filename>.  You can use this option
Packit Service 360c39
to analyze file system problems without revealing sensitive information
Packit Service 360c39
that may be contained in the files.  This option works quickly by
Packit Service 360c39
using the system bitmap blocks in the resource groups to determine the
Packit Service 360c39
location of all the metadata.  If there is corruption
Packit Service 360c39
in the bitmaps, resource groups or rindex file, this method may fail and
Packit Service 360c39
you may need to use the savemetaslow option.  The destination file is
Packit Service 360c39
compressed using gzip unless -z 0 is specified.
Packit Service 360c39
.TP
Packit Service 360c39
\fBsavemetaslow\fP \fI<device>\fR \fI<filename.gz>\fR
Packit Service 360c39
Save off GFS2 metadata, as with the savemeta option, examining every
Packit Service 360c39
block in the file system for metadata.  This option is less prone to failure
Packit Service 360c39
due to file system corruption than the savemeta option, but it is 
Packit Service 360c39
extremely slow.  The destination file is compressed using gzip unless
Packit Service 360c39
-z 0 is specified.
Packit Service 360c39
.TP
Packit Service 360c39
\fBsavergs\fP \fI<device>\fR \fI<filename.gz>\fR
Packit Service 360c39
Save off only the GFS2 resource group metadata for the file system on the
Packit Service 360c39
specified device to a file given by <filename>.  The destination file is
Packit Service 360c39
compressed using gzip unless -z 0 is specified.
Packit Service 360c39
.TP
Packit Service 360c39
\fBrestoremeta\fP \fI<filename>\fR \fI<dest device>\fR
Packit Service 360c39
Take a compressed or uncompressed file created with the savemeta option and
Packit Service 360c39
restores its contents on top of the specified destination device.
Packit Service 360c39
\fBWARNING\fP: When you use this option, the file system and all data on the
Packit Service 360c39
destination device is destroyed.  Since only metadata (but no data) is
Packit Service 360c39
restored, every file in the resulting file system is likely to be corrupt.  The
Packit Service 360c39
ONLY purpose of this option is to examine and debug file system problems by
Packit Service 360c39
restoring and examining the state of the saved metadata.  If the destination
Packit Service 360c39
file system is the same size or larger than the source file system where the
Packit Service 360c39
metadata was saved, the resulting file system will be the same size as the
Packit Service 360c39
source.  If the destination device is smaller than the source file system,
Packit Service 360c39
gfs2_edit will restore as much as it can, then quit, leaving you with a file
Packit Service 360c39
system that probably will not mount, but from which you might still be able to
Packit Service 360c39
figure out what is wrong with the source file system.
Packit Service 360c39
Packit Service 360c39
.SH INTERACTIVE MODE
Packit Service 360c39
If you specify a device on the gfs2_edit command line and you specify
Packit Service 360c39
no options other than -c, gfs2_edit will act as an interactive GFS2
Packit Service 360c39
file system editor for the file system you specify.  There
Packit Service 360c39
are three display modes: hex mode, structure mode and pointers mode.
Packit Service 360c39
You use the m key to switch between the modes, as described below.
Packit Service 360c39
The modes are as follows:
Packit Service 360c39
.TP
Packit Service 360c39
Hex mode (default)
Packit Service 360c39
Display or edit blocks of the file system in hexadecimal and ascii.
Packit Service 360c39
Packit Service 360c39
Lines at the top indicate the currently displayed block in both hex and
Packit Service 360c39
decimal.  If the block contains a GFS2 data structure, the name of that
Packit Service 360c39
structure will appear in the upper right corner of the display.
Packit Service 360c39
If the block is a well-known block, such as the superblock or rindex,
Packit Service 360c39
there will be a line to indicate what it is.
Packit Service 360c39
Packit Service 360c39
In hex mode, you can edit blocks by pressing \fB<enter>\fP and entering
Packit Service 360c39
hexadecimal digits to replace the highlighted hex digits.  Do NOT precede
Packit Service 360c39
the numbers with "0x".  For example, if you want to change the value at
Packit Service 360c39
offset 0x60 from a 0x12 to 0xef, position your cursor to offset 0x60,
Packit Service 360c39
so that the 12 is highlighted, then press \fB<enter>\fP and type in "ef".
Packit Service 360c39
Press \fB<escape>\fP or \fB<enter>\fP to exit edit mode.
Packit Service 360c39
Packit Service 360c39
In hex mode, different colors indicate different things.
Packit Service 360c39
For example, in the default color scheme, the GFS2 data structure will
Packit Service 360c39
be black, data offsets will be light blue, and actual data (anything after
Packit Service 360c39
the gfs2 data structure) will be red.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
Structure mode
Packit Service 360c39
Decode the file system block into its GFS2 structure and
Packit Service 360c39
display the values of that structure.  This mode is most useful for
Packit Service 360c39
jumping around the file system.  For example, you can use the arrow 
Packit Service 360c39
keys to position down to a pointer and press \fBJ\fP to jump to that block.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
Pointers mode
Packit Service 360c39
Display any additional information appearing on the block.
Packit Service 360c39
For example, if an inode has block pointers, this will display them and
Packit Service 360c39
allow you to scroll through them.  You can also position to one of them
Packit Service 360c39
and press \fBJ\fP to jump to that block.
Packit Service 360c39
Packit Service 360c39
.SH Interactive mode command keys:
Packit Service 360c39
.TP
Packit Service 360c39
\fBq\fP or \fB<esc>\fP
Packit Service 360c39
The \fBq\fP or \fB<escape>\fP keys are used to exit gfs2_edit.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
\fB<arrow/movement keys>\fP up, down, right, left, pg-up, pg-down, home, end
Packit Service 360c39
The arrow keys are used to highlight an area of the display.  The \fBJ\fP
Packit Service 360c39
key may be used to jump to the block that is highlighted.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
\fBm\fP - Mode switch
Packit Service 360c39
The \fBm\fP key is used to switch between the three display modes.
Packit Service 360c39
The initial mode is hex mode.  Pressing the \fBm\fP key once switches to
Packit Service 360c39
structure mode.  Pressing it a second time switches from structure mode
Packit Service 360c39
to pointers mode.  Pressing it a third time takes you back to hex mode again.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
\fBj\fP - Jump to block
Packit Service 360c39
The \fBj\fP key jumps to the block number that is currently highlighted.
Packit Service 360c39
In hex mode, hitting J will work when any byte of the pointer is highlighted.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
\fBg\fP - Goto block
Packit Service 360c39
The \fBg\fP key asks for a block number, then jumps there.  Note that
Packit Service 360c39
in many cases, you can also arrow up so that the current block number
Packit Service 360c39
is highlighted, then press \fB<enter>\fP to enter a block number to jump to.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
\fBh\fP - Help display
Packit Service 360c39
The \fBh\fP key causes the interactive help display to be shown.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
\fBe\fP - Extended mode
Packit Service 360c39
The \fBe\fP key causes gfs2_edit to switch to extended ("pointers") mode.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
\fBc\fP - Color scheme
Packit Service 360c39
The \fBc\fP key causes gfs2_edit to switch to its alternate color scheme.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
\fBf\fP - Forward block
Packit Service 360c39
The \fBf\fP key causes you to scroll forward one block.  This does
Packit Service 360c39
not affect the "jump" status.  In other words, if you use the \fBf\fP
Packit Service 360c39
key to move forward several blocks, pressing \fB<backspace>\fP will
Packit Service 360c39
not roll you back up.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
\fB<enter>\fP - Edit value
Packit Service 360c39
The \fB<enter>\fP key causes you to go from display mode to edit mode.
Packit Service 360c39
If you are in hex mode and you hit enter, you can type new hex values
Packit Service 360c39
at the cursor's current location.  Note: pressing \fB<enter>\fP
Packit Service 360c39
in structure mode allows you to enter a new value, with the following
Packit Service 360c39
restrictions:  For gfs2 disk inodes and resource groups, it will
Packit Service 360c39
actually change the value on disk. However, inode numbers may not be
Packit Service 360c39
changed.  For all other structures, the values entered are ignored.
Packit Service 360c39
Packit Service 360c39
If you use the up arrow key to highlight the block number, then press
Packit Service 360c39
\fB<enter>\fP, you may then enter a new block number, or any of the
Packit Service 360c39
well-known block locations listed above (e.g. sb, rindex, inum, rg 17,
Packit Service 360c39
etc.) and gfs2_edit will jump to the block specified.  If you specify
Packit Service 360c39
a slash character followed by a metadata type, gfs2_edit will search for
Packit Service 360c39
the next occurrence of that metadata block type, and jump there.  It
Packit Service 360c39
will take you to block 0 if it does not find any more blocks of the
Packit Service 360c39
specified metadata type.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
\fB<home>\fP
Packit Service 360c39
If you are in pointers mode, this takes you back to the starts of the
Packit Service 360c39
pointers you are viewing.  Otherwise it takes you back to the superblock.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
\fB<backspace>\fP
Packit Service 360c39
This takes you back to the block you were displaying before a jump.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
\fB<space>\fP
Packit Service 360c39
This takes you forward to the block you were displaying when you hit
Packit Service 360c39
\fB<backspace>\fP.
Packit Service 360c39
Packit Service 360c39
.SH EXAMPLES
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit /dev/roth_vg/roth_lv
Packit Service 360c39
Display and optionally edit the file system on /dev/roth_vg/roth_lv
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit -p sb /dev/vg0/lvol0
Packit Service 360c39
Print the superblock of the gfs2 file system located on
Packit Service 360c39
/dev/vg0/lvol0.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit -p identify 2746 2748 /dev/sda2
Packit Service 360c39
Print out what kind of blocks are at block numbers 2746 and 2748 on
Packit Service 360c39
device /dev/sda2.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit -p rindex /dev/sda1
Packit Service 360c39
Print the resource group index system file located on device
Packit Service 360c39
/dev/sda1.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit savemeta /dev/sda1 /tmp/our_fs.gz
Packit Service 360c39
Save off all metadata (but no user data) to file /tmp/our_fs.gz
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit -p root /dev/my_vg/my_lv
Packit Service 360c39
Print the contents of the root directory in /dev/my_vg/my_lv.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2-edit -x -p 0x3f7a /dev/sda1
Packit Service 360c39
Print the contents of block 16250 of /dev/sda1 in hex.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit -p 12345 /dev/sdc2
Packit Service 360c39
Print the gfs2 data structure at block 12345.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit rgcount /dev/sdb1
Packit Service 360c39
Print how many Resource Groups exist for /dev/sdb1.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit -p rg 17 /dev/sdb1
Packit Service 360c39
Print the contents of the eighteenth Resource Group on /dev/sdb1.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit rgflags 3 /dev/sdb1
Packit Service 360c39
Print the rg_flags value for the fourth Resource Group on /dev/sdb1.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit rgflags 3 8 /dev/sdb1
Packit Service 360c39
Set the GFS2_RGF_NOALLOC flag on for the fourth Resource Group on /dev/sdb1.
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit -p 25 blockalloc /dev/roth_vg/roth_lv
Packit Service 360c39
Print the block allocation type of block 25.
Packit Service 360c39
May produce this output:
Packit Service 360c39
3 (Metadata)
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit -p 25 blockalloc 1 /dev/roth_vg/roth_lv
Packit Service 360c39
Change the block allocation type of block 25 to data.
Packit Service 360c39
May produce this output:
Packit Service 360c39
1
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit -p 25 blocktype /dev/roth_vg/roth_lv
Packit Service 360c39
Print the metadata block type of block 25.
Packit Service 360c39
May produce this output:
Packit Service 360c39
4 (Block 25 is type 4: Dinode)
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit -p 25 field di_size /dev/roth_vg/roth_lv
Packit Service 360c39
Print the di_size field of block 25.
Packit Service 360c39
May produce this output:
Packit Service 360c39
134217728
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit -x -p 25 field di_size /dev/roth_vg/roth_lv
Packit Service 360c39
Print the di_size field of block 25, in hexadecimal.
Packit Service 360c39
May produce this output:
Packit Service 360c39
0x8000000
Packit Service 360c39
Packit Service 360c39
.TP
Packit Service 360c39
gfs2_edit -p 25 field di_size 0x4000 /dev/roth_vg/roth_lv
Packit Service 360c39
Change the di_size field of block 25 to the hexadecimal value 0x4000.
Packit Service 360c39
May produce this output:
Packit Service 360c39
16384
Packit Service 360c39
.SH KNOWN BUGS
Packit Service 360c39
.TP
Packit Service 360c39
The directory code does not work well.  It might be confused
Packit Service 360c39
by directory "sentinel" entries.