On 10/25/2013 03:47 AM, Daniel Vecerka wrote:
> Hi everyone,
> 
>   we have 24TB SW-RAID6 array with one large JFS partition. There was 
> power failure (bad UPS) when jfs_fsck have been running and after this 
> accident I'm not able to get JFS clean.
> There is jfs_fsck error which I get :
> 
> **Phase 1 - Check Blocks, Files/Directories, and  Directory Entries
> Duplicate reference to 4 block(s) beginning at offset 5975789204 found 
> in file system object IA16.
> Inode A16 has references to cross linked blocks.
> Multiple metadata references to 4 blocks beginning at offset 5975789204 
> have been detected.
> Duplicate block references have been detected in Metadata.  CANNOT 
> CONTINUE.
> processing terminated:  10/25/2013 9:14:15  with return code: 10060 exit 
> code: 4.
> 
> 
> I'm able to mount partition read only and backup almost all data. Some 
> data are unreadable, with jfs_lookup kernel error:
> 
> Oct  3 12:08:44 nash kernel: ERROR: (device md3): diRead: i_ino != 
> di_number
> Oct  3 12:08:44 nash kernel: jfs_lookup: iget failed on inum 54550587
> Oct  3 12:08:44 nash kernel: jfs_lookup: iget failed on inum 52483751
> Oct  3 12:08:44 nash kernel: jfs_lookup: iget failed on inum 52483751
> 
> 
> One solution is reformat partition and restore data from backup, but 
> with 23TB of data it is little bit time consuming. So I would like to 
> try to use jfs_debugfs in some way and to repair existing partition. But 
> I'm not sure how and if it's possible at all.
> 
> Can any JFS expert help me, please?

A long time ago I dealt with a similar problem by modifying fsck.jfs to
check for that specific extent and remove it from the containing
structure. You may lose a few inodes, possibly the same ones you
couldn't back up. Here's the patch modified for your specific failure.
No guarantees, but it may save you from having to reformat.

Good luck,
Shaggy
Index: fsck/fsckwsp.c
===================================================================
RCS file: /cvsroot/jfs/jfsutils/fsck/fsckwsp.c,v
retrieving revision 1.24
diff -u -p -r1.24 fsckwsp.c
--- fsck/fsckwsp.c	3 Jun 2010 22:42:12 -0000	1.24
+++ fsck/fsckwsp.c	25 Oct 2013 15:13:44 -0000
@@ -3142,6 +3142,17 @@ int process_extent(struct fsck_inode_rec
 	    ? agg_recptr->highest_valid_fset_datablk : extent_addr +
 	    extent_length - 1;
 
+	    /*
+	     * Special case to fix Daniel's file system
+	     */
+	if (extent_addr == 5975789204) {
+		*adjusted_length = 0;
+		*extent_is_valid = 0;
+		agg_recptr->corrections_needed = 1;
+
+		return FSCK_OK;
+	}
+
 	if (((first_valid > agg_recptr->highest_valid_fset_datablk)
 	     && (inorecptr->inode_type != metadata_inode)) ||
 	    /*
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Jfs-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jfs-discussion

Reply via email to