[Linux-cluster] gfs2-utils source for recovery purpose of a corrupt gfs2 partition

Markus Wolfgart markus.wolfgart at dlr.de
Mon Mar 29 10:49:19 UTC 2010


Hallo Cluster and GFS Experts,

I'm a new  subscriber of this mailing list and appologise
in the case my posting is offtopic.

I'm looking for help concerning a corrupt gfs2 file system
which could not be recovered by me by fsck.gfs2 (Ver. 3.0.9)
due to to less less physical memory (4GB) eaven if increasing it
by a additional swap space (now about 35GB).

I would like to parse a image created of the lost fs (the first 6TB)
with the code provided in the new gfs2-utils release.

Due to this circumstance I hope to find in this mailing list some hints
concerning an automated step by step recovery of lost data.

Many Thanks in advance for your help

Markus

PS.: some infos concerning the damaged fs:

*******************************************************
Markus Wolfgart
DLR Oberpfaffenhofen
German Remote Sensing Data Center
.
.
.
e-mail: markus.wolfgart at dlr.de
**********************************************************




gfs2_edit -p sb /dev/oa_vg_storage1/oa_lv_storage1
=========================================
Block #16    (0x10) of 3097745408 (0xB8A3D800) (superblock)

Superblock:
  mh_magic              0x01161970(hex)
  mh_type               1                   0x1
  mh_format             100                 0x64
  sb_fs_format          1801                0x709
  sb_multihost_format   1900                0x76c
  sb_bsize              4096                0x1000
  sb_bsize_shift        12                  0xc
  master dir:           2                   0x2
        addr:           51                  0x33
  root dir  :           1                   0x1
        addr:           50                  0x32
  sb_lockproto          fsck_dlm
  sb_locktable          oa-dp:oa_gfs1
  sb_uuid               00000000-0000-0000-0000-000000000000

The superblock has 2 directories
     1. (1). 50 (0x32): Dir     root
     2. (2). 51 (0x33): Dir     master
------------------------------------------------------

gfs2_edit -p root /dev/oa_vg_storage1/oa_lv_storage1
==========================================
Block #50    (0x32) of 3097745408 (0xB8A3D800) (disk inode)
--------------- Root directory ------------------
Dinode:
  mh_magic              0x01161970(hex)
  mh_type               4                   0x4
  mh_format             400                 0x190
  no_formal_ino         1                   0x1
  no_addr               50                  0x32
  di_mode               040777(decimal)
  di_uid                10069               0x2755
  di_gid                10060               0x274c
  di_nlink              14                  0xe
  di_size               3864                0xf18
  di_blocks             1                   0x1
  di_atime              1269603308          0x4bac9bec
  di_mtime              1269429185          0x4ba9f3c1
  di_ctime              1269429185          0x4ba9f3c1
  di_major              0                   0x0
  di_minor              0                   0x0
  di_goal_meta          50                  0x32
  di_goal_data          50                  0x32
  di_flags              0x00000001(hex)
  di_payload_format     1200                0x4b0
  di_height             0                   0x0
  di_depth              0                   0x0
  di_entries            19                  0x13
  di_eattr              0                   0x0

This directory block contains 19 directory entries.
     1. (1). 50 (0x32): Dir     .
     2. (2). 50 (0x32): Dir     ..
     3. (3). 881038445 (0x3483946d): Dir     x  <== masked by me ;-)
     4. (4). 929563055 (0x376801af): Dir     x
     5. (5). 1623975855 (0x60cbe7af): File    x
     6. (6). 881038473 (0x34839489): Dir     x
     7. (7). 881042981 (0x3483a625): File    x
     8. (8). 881043493 (0x3483a825): File    x
     9. (9). 1028392434 (0x3d4c05f2): Dir     lost+found
     10. (10). 1028392437 (0x3d4c05f5): Dir     x
     11. (11). 1028394418 (0x3d4c0db2): Dir     x
     12. (12). 1028518858 (0x3d4df3ca): Dir     x
     13. (13). 1028518874 (0x3d4df3da): Dir     x
     14. (14). 1028518886 (0x3d4df3e6): Dir     x
     15. (15). 1058257256 (0x3f13b968): Symlink x
     16. (16). 1072794841 (0x3ff18cd9): Dir     x
     17. (17). 367165514 (0x15e2804a): Dir     x
     18. (18). 1623975860 (0x60cbe7b4): File    x
     19. (19). 1667192704 (0x635f5780): Dir     markus
------------------------------------------------------

gfs2_edit -p master /dev/oa_vg_storage1/oa_lv_storage1
============================================
Block #51    (0x33) of 3097745408 (0xB8A3D800) (disk inode)
-------------- Master directory -----------------
Dinode:
  mh_magic              0x01161970(hex)
  mh_type               4                   0x4
  mh_format             400                 0x190
  no_formal_ino         2                   0x2
  no_addr               51                  0x33
  di_mode               040755(decimal)
  di_uid                0                   0x0
  di_gid                0                   0x0
  di_nlink              4                   0x4
  di_size               3864                0xf18
  di_blocks             1                   0x1
  di_atime              1221815862          0x48d36e36
  di_mtime              1221815862          0x48d36e36
  di_ctime              1221815862          0x48d36e36
  di_major              0                   0x0
  di_minor              0                   0x0
  di_goal_meta          51                  0x33
  di_goal_data          51                  0x33
  di_flags              0x00000201(hex)
  di_payload_format     1200                0x4b0
  di_height             0                   0x0
  di_depth              0                   0x0
  di_entries            8                   0x8
  di_eattr              0                   0x0

This directory block contains 8 directory entries.
     1. (1). 51 (0x33): Dir     .
     2. (2). 51 (0x33): Dir     ..
     3. (3). 52 (0x34): Dir     jindex
     4. (4). 262725 (0x40245): Dir     per_node
     5. (5). 264798 (0x40a5e): File    inum
     6. (6). 264799 (0x40a5f): File    statfs
     7. (7). 264800 (0x40a60): File    rindex
     8. (8). 264940 (0x40aec): File    quota
------------------------------------------------------

gfs2_edit -p statfs /dev/oa_vg_storage1/oa_lv_storage1
===========================================
Block #264799    (0x40a5f) of 3097745408 (0xB8A3D800) (disk inode)
---------------- statfs file -------------------
Dinode:
  mh_magic              0x01161970(hex)
  mh_type               4                   0x4
  mh_format             400                 0x190
  no_formal_ino         38                  0x26
  no_addr               264799              0x40a5f
  di_mode               0100600(decimal)
  di_uid                0                   0x0
  di_gid                0                   0x0
  di_nlink              1                   0x1
  di_size               24                  0x18
  di_blocks             1                   0x1
  di_atime              1269421208          0x4ba9d498
  di_mtime              1221815862          0x48d36e36
  di_ctime              1221815862          0x48d36e36
  di_major              0                   0x0
  di_minor              0                   0x0
  di_goal_meta          264799              0x40a5f
  di_goal_data          264799              0x40a5f
  di_flags              0x00000201(hex)
  di_payload_format     0                   0x0
  di_height             0                   0x0
  di_depth              0                   0x0
  di_entries            0                   0x0
  di_eattr              0                   0x0
statfs file contents:
  sc_total              6049365640          0x16891fe88
  sc_free               4561998802          0x10fea93d2
  sc_dinodes            920663              0xe0c57
------------------------------------------------------

gfs2_edit -p per_node /dev/oa_vg_storage1/oa_lv_storage1
==============================================
Block #262725    (0x40245) of 3097745408 (0xB8A3D800) (disk inode)
--------------- Per-node Dir -------------------
Dinode:
  mh_magic              0x01161970(hex)
  mh_type               4                   0x4
  mh_format             400                 0x190
  no_formal_ino         12                  0xc
  no_addr               262725              0x40245
  di_mode               040700(decimal)
  di_uid                0                   0x0
  di_gid                0                   0x0
  di_nlink              2                   0x2
  di_size               3864                0xf18
  di_blocks             1                   0x1
  di_atime              1221815862          0x48d36e36
  di_mtime              1221815862          0x48d36e36
  di_ctime              1221815862          0x48d36e36
  di_major              0                   0x0
  di_minor              0                   0x0
  di_goal_meta          262725              0x40245
  di_goal_data          262725              0x40245
  di_flags              0x00000201(hex)
  di_payload_format     1200                0x4b0
  di_height             0                   0x0
  di_depth              0                   0x0
  di_entries            26                  0x1a
  di_eattr              0                   0x0

This directory block contains 26 directory entries.
     1. (1). 262725 (0x40245): Dir     .
     2. (2). 51 (0x33): Dir     ..
     3. (3). 262726 (0x40246): File    inum_range0
     4. (4). 262727 (0x40247): File    statfs_change0
     5. (5). 262728 (0x40248): File    quota_change0
     6. (6). 262985 (0x40349): File    inum_range1
     7. (7). 262986 (0x4034a): File    statfs_change1
     8. (8). 262987 (0x4034b): File    quota_change1
     9. (9). 263244 (0x4044c): File    inum_range2
     10. (10). 263245 (0x4044d): File    statfs_change2
     11. (11). 263246 (0x4044e): File    quota_change2
     12. (12). 263503 (0x4054f): File    inum_range3
     13. (13). 263504 (0x40550): File    statfs_change3
     14. (14). 263505 (0x40551): File    quota_change3
     15. (15). 263762 (0x40652): File    inum_range4
     16. (16). 263763 (0x40653): File    statfs_change4
     17. (17). 263764 (0x40654): File    quota_change4
     18. (18). 264021 (0x40755): File    inum_range5
     19. (19). 264022 (0x40756): File    statfs_change5
     20. (20). 264023 (0x40757): File    quota_change5
     21. (21). 264280 (0x40858): File    inum_range6
     22. (22). 264281 (0x40859): File    statfs_change6
     23. (23). 264282 (0x4085a): File    quota_change6
     24. (24). 264539 (0x4095b): File    inum_range7
     25. (25). 264540 (0x4095c): File    statfs_change7
     26. (26). 264541 (0x4095d): File    quota_change7
------------------------------------------------------

gfs2_edit -p inum /dev/oa_vg_storage1/oa_lv_storage1
===========================================
Block #264798    (0x40a5e) of 3097745408 (0xB8A3D800) (disk inode)
---------------- Inum file ---------------------
Dinode:
  mh_magic              0x01161970(hex)
  mh_type               4                   0x4
  mh_format             400                 0x190
  no_formal_ino         37                  0x25
  no_addr               264798              0x40a5e
  di_mode               0100600(decimal)
  di_uid                0                   0x0
  di_gid                0                   0x0
  di_nlink              1                   0x1
  di_size               8                   0x8
  di_blocks             1                   0x1
  di_atime              1221815862          0x48d36e36
  di_mtime              1221815862          0x48d36e36
  di_ctime              1221815862          0x48d36e36
  di_major              0                   0x0
  di_minor              0                   0x0
  di_goal_meta          264798              0x40a5e
  di_goal_data          264798              0x40a5e
  di_flags              0x00000201(hex)
  di_payload_format     0                   0x0
  di_height             0                   0x0
  di_depth              0                   0x0
  di_entries            0                   0x0
  di_eattr              0                   0x0
Next inode num = 4194345 (0x400029)
------------------------------------------------------

gfs2_edit -p rgs /dev/oa_vg_storage1/oa_lv_storage1 >
/tmp/dev_oa_vg_storage1_oa_lv_storage1.rgs
===============================================================================
bad seek: Invalid argument from parse_rindex:991: block 3098269649
(0xb8abd7d1)


Block #RG List        of 3097745408 (0xB8A3D800)
------------------ RG List ----------------------
Dinode:
  mh_magic              0x01161970(hex)
  mh_type               4                   0x4
  mh_format             400                 0x190
  no_formal_ino         2                   0x2
  no_addr               51                  0x33
  di_mode               040755(decimal)
  di_uid                0                   0x0
  di_gid                0                   0x0
  di_nlink              4                   0x4
  di_size               3864                0xf18
  di_blocks             1                   0x1
  di_atime              1221815862          0x48d36e36
  di_mtime              1221815862          0x48d36e36
  di_ctime              1221815862          0x48d36e36
  di_major              0                   0x0
  di_minor              0                   0x0
  di_goal_meta          51                  0x33
  di_goal_data          51                  0x33
  di_flags              0x00000201(hex)
  di_payload_format     1200                0x4b0
  di_height             0                   0x0
  di_depth              0                   0x0
  di_entries            8                   0x8
  di_eattr              0                   0x0
RG index entries found: 11541.
RG #0 located at: 17 (0x11)
  mh_magic              0x01161970(hex)
  mh_type               2                   0x2
  mh_format             200                 0xc8
  rg_flags              0                   0x0
  rg_free               13                  0xd
  rg_dinodes            891                 0x37b
RG #1 located at: 529580 (0x814ac)
  mh_magic              0x01161970(hex)
  mh_type               2                   0x2
  mh_format             200                 0xc8
  rg_flags              0                   0x0
  rg_free               17                  0x11
  rg_dinodes            1068                0x42c

...  trancated by me ( could be sent on demand by mail if necessary!)

RG #5908 located at: 3097221167 (0xb89bd82f)
  mh_magic              0x01161970(hex)
  mh_type               2                   0x2
  mh_format             200                 0xc8
  rg_flags              0                   0x0
  rg_free               524208              0x7ffb0
  rg_dinodes            0                   0x0
RG #5909 located at: 3097745408 (0xb8a3d800)
  mh_magic              0x00000000(hex)
  mh_type               0                   0x0
  mh_format             0                   0x0
  rg_flags              0                   0x0
  rg_free               0                   0x0
  rg_dinodes            0                   0x0
RG #5910 located at: 3098269649 (0xb8abd7d1)


-- 




More information about the Linux-cluster mailing list