Comentarios (6)

1 cggibbo ha hecho un comentario el Enlace permanente

Didn't work for me.

 
/ # oslevel -s
7100-02-01-1245
 
/cg # lptest > cgfile
/cg # ls -ltr
total 32
drwxr-xr-x 2 root system 256 Feb 12 16:22 lost+found
-rw-r----- 1 root system 16000 Feb 12 16:28 cgfile
 
 
/cg # rm cgfile
/cg # cd
# umount /cg
#
 
# /tmp/cg/j2restore -r /dev/cglv
inum 10, mode 100640, nlink 0, fileset 16, size 16000, di_uid 0, di_gid 0
otime Tue Feb 12 16:28:08 2013
atime Tue Feb 12 16:28:08 2013
ctime Tue Feb 12 16:28:08 2013
mtime Tue Feb 12 16:28:08 2013
 
# /tmp/cg/j2restore /dev/cglv
# fsck -y /cg
 
 
 
The current volume is: /dev/cglv
Primary superblock is valid.
J2_LOGREDO:log redo processing for /dev/cglv
Primary superblock is valid.
*** Phase 1 - Initial inode scan
Inode 11 has bad size (FIXED)
Inode 11 has incorrect block count (FIXED)
Superblock marked dirty because repairs are about to be written.
*** Phase 2 - Process remaining directories
*** Phase 3 - Process remaining files
*** Phase 4 - Check and repair inode allocation map
File system inode map is corrupt (FIXED)
*** Phase 5 - Check and repair block allocation map
Inodes not connected to the root directory
tree have been detected. Will reconnect.
File system is clean.
Superblock is marked dirty (FIXED)
All observed inconsistencies have been repaired.
 
# mount /cg
 
# cd /cg
/cg # ls -ltr
total 0
drwxr-xr-x 2 root system 256 Feb 12 16:22 lost+found
 
File has not been restored.

2 Wu Jian Jun 吴建军 ha hecho un comentario el Enlace permanente

Hi cggibbo,
Thanks for your comment.
Could you check lost+found?
The restored file should be /cg/lost+found/10.

3 cggibbo ha hecho un comentario el Enlace permanente

Sorry my mistake.

 
uataix04nim : /cg/lost+found # ls -ltr
total 64
-rw-r----- 1 root system 0 Feb 12 16:22 4
-rw-r----- 1 root system 0 Feb 12 16:22 5
-rw-r----- 1 root system 0 Feb 12 16:22 6
-rw-r----- 1 root system 0 Feb 12 16:22 7
-rw-r----- 1 root system 0 Feb 12 16:22 8
-rw-r----- 1 root system 16000 Feb 12 16:25 9
-rw-r----- 1 root system 16000 Feb 12 16:28 10
-rw-r----- 1 root system 12288 Feb 12 16:32 11
 
Thanks. This could come in handy!

4 cggibbo ha hecho un comentario el Enlace permanente

Hmm, just tried again. File is restored to lost+found but it is empty....

 
/cg/lost+found # ls -ltr
total 0
-rw-r--r-- 1 root system 0 Feb 13 10:37 4

5 Wu Jian Jun 吴建军 ha hecho un comentario el Enlace permanente

Hi cggibbo,

 
1. Pls run "fsck -y " before and after restoration.
2. Before rm a file, pls run "sync" if that file is just created.
Otherwise the file has not been written to disk when it is deleted.
Thus we might restore an empty file.
3. You may try the j2restore v1.1 which is better than j2restore v1.0.
 
Thanks.

6 Wu Jian Jun 吴建军 ha hecho un comentario el Enlace permanente

Another situation that j2restore will restore an empty file is:
the disk block was reused by other file after deletion.

 
When I found such file I tried to manually get back the disk block,
but finally resulted to cross linked blocks.
 
Anyway, it's up to your luck what j2restore can get back once the file is deleted.
j2restore just try its best and could not ensure the restored file is intact.