Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Filesystem trouble (ext2 and encryption) [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
ranger719
Tux's lil' helper
Tux's lil' helper


Joined: 16 May 2006
Posts: 92
Location: Germany

PostPosted: Tue Nov 21, 2006 1:47 am    Post subject: Filesystem trouble (ext2 and encryption) [Solved] Reply with quote

Hi there.
Be warned, lots of error-msgs in here :)
I have some trouble with my external Lacie D2 300GB disk. It is encrypted with cryptsetup and the cipher is AES (with hardware crypto-support via Padlock (Via Epia)) and was formated with ext2.
The drive is mounted to /home/lacie300 and /home is a mounted encrypted device, too (local disk with AES). /home/lacie300 is symlinked to /home/data/lacie300 and /home/data is shared via samba. I was reorganizing some data on the drive via samba when suddenly the share stalled. After some waiting and restarting smbd (several times) I had to kill all smbd processes because one of them took a heavy load on the cpu. I checked the logs and it was full with this (about 10k lines!):
Code:

Nov 21 01:11:43 wopr usb 1-7: reset high speed USB device using ehci_hcd and address 5
Nov 21 01:11:44 wopr attempt to access beyond end of device
Nov 21 01:11:44 wopr dm-4: rw=0, want=1509994712, limit=586112648
Nov 21 01:11:44 wopr attempt to access beyond end of device
Nov 21 01:11:44 wopr dm-4: rw=0, want=4240266728, limit=586112648
Nov 21 01:11:44 wopr attempt to access beyond end of device
Nov 21 01:11:44 wopr dm-4: rw=0, want=819902384, limit=586112648
Nov 21 01:11:44 wopr attempt to access beyond end of device
Nov 21 01:11:44 wopr dm-4: rw=0, want=1893558056, limit=586112648
Nov 21 01:11:44 wopr attempt to access beyond end of device
Nov 21 01:11:44 wopr dm-4: rw=0, want=2481287232, limit=586112648
Nov 21 01:11:44 wopr attempt to access beyond end of device
Nov 21 01:11:44 wopr dm-4: rw=0, want=3653509584, limit=586112648
Nov 21 01:11:44 wopr attempt to access beyond end of device
Nov 21 01:11:44 wopr dm-4: rw=0, want=1509994712, limit=586112648
Nov 21 01:12:00 wopr EXT2-fs error (device dm-4): ext2_free_blocks: Freeing blocks not in datazone - block = 3513816967, count = 1
Nov 21 01:12:00 wopr EXT2-fs error (device dm-4): ext2_free_blocks: Freeing blocks not in datazone - block = 2592949402, count = 1
...
Nov 21 01:22:21 wopr EXT2-fs error (device dm-4): ext2_check_page: bad entry in directory #7536641: rec_len is smaller than minimal - offset=1437839360, inode=0, rec_len=0, name_len=0
Nov 21 01:22:21 wopr EXT2-fs error (device dm-4): ext2_check_page: bad entry in directory #7536641: rec_len is smaller than minimal - offset=1437843456, inode=0, rec_len=0, name_len=0
Nov 21 01:22:21 wopr EXT2-fs error (device dm-4): ext2_check_page: bad entry in directory #7536641: rec_len is smaller than minimal - offset=1437847552, inode=0, rec_len=0, name_len=0
Nov 21 01:22:21 wopr EXT2-fs error (device dm-4): ext2_check_page: bad entry in directory #7536641: rec_len is smaller than minimal - offset=1437851648, inode=0, rec_len=0, name_len=0
Nov 21 01:22:21 wopr EXT2-fs error (device dm-4): ext2_check_page: bad entry in directory #7536641: rec_len is smaller than minimal - offset=1437855744, inode=0, rec_len=0, name_len=0
Nov 21 01:22:21 wopr EXT2-fs error (device dm-4): ext2_check_page: bad entry in directory #7536641: rec_len is smaller than minimal - offset=1437859840, inode=0, rec_len=0, name_len=0
Nov 21 01:22:21 wopr EXT2-fs error (device dm-4): ext2_check_page: bad entry in directory #7536641: rec_len is smaller than minimal - offset=1437863936, inode=0, rec_len=0, name_len=0
Nov 21 01:22:21 wopr EXT2-fs error (device dm-4): ext2_check_page: bad entry in directory #7536641: rec_len is smaller than minimal - offset=1437868032, inode=0, rec_len=0, name_len=0
...


So I checked the drive with fsck.ext2 -n /dev/mapper/lacie300:
Code:

e2fsck 1.39 (29-May-2006)
/dev/mapper/lacie300 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Inode 6996330, i_size is 0, should be 4096.  Fix? no

Inode 6996335, i_size is 0, should be 4096.  Fix? no

Inode 6996353 is in use, but has dtime set.  Fix? no

Inodes that were part of a corrupted orphan linked list found.  Fix? no

Inode 6996354 was part of the orphaned inode list.  IGNORED.
Inode 6996354 is in use, but has dtime set.  Fix? no

Inode 6996355 was part of the orphaned inode list.  IGNORED.
Inode 6996355 is in use, but has dtime set.  Fix? no

Inode 6996356 was part of the orphaned inode list.  IGNORED.
Inode 6996356 is in use, but has dtime set.  Fix? no

Inode 6996356 has imagic flag set.  Clear? no

Inode 6996357 is in use, but has dtime set.  Fix? no

Inode 6996357 has imagic flag set.  Clear? no

Inode 6996357 has compression flag set on filesystem without compression support.  Clear? no

Inode 6996357, i_blocks is 2669381778, should be 0.  Fix? no

Inode 6996358 was part of the orphaned inode list.  IGNORED.
Inode 6996358 is in use, but has dtime set.  Fix? no

Inode 6996358 has imagic flag set.  Clear? no

Inode 6996359 was part of the orphaned inode list.  IGNORED.
Inode 6996359 is in use, but has dtime set.  Fix? no

Inode 6996359 has imagic flag set.  Clear? no

Inode 6996360 was part of the orphaned inode list.  IGNORED.
Inode 6996360 is in use, but has dtime set.  Fix? no

Inode 6996361 is in use, but has dtime set.  Fix? no

Inode 6996362 was part of the orphaned inode list.  IGNORED.
Inode 6996362 is in use, but has dtime set.  Fix? no

Inode 6996363 was part of the orphaned inode list.  IGNORED.
Inode 6996363 is in use, but has dtime set.  Fix? no

Inode 6996363 has INDEX_FL flag set but is not a directory.
Clear HTree index? no

Inode 6996363 has INDEX_FL flag set on filesystem without htree support.
Clear HTree index? no

HTREE directory inode 6996363 has an invalid root node.
Clear HTree index? no

Inode 6996363, i_blocks is 1157903431, should be 0.  Fix? no

Inode 6996364 was part of the orphaned inode list.  IGNORED.
Inode 6996364 is in use, but has dtime set.  Fix? no

Inode 6996364 has INDEX_FL flag set but is not a directory.
Clear HTree index? no

Inode 6996364 has INDEX_FL flag set on filesystem without htree support.
Clear HTree index? no

HTREE directory inode 6996364 has an invalid root node.
Clear HTree index? no

Inode 6996364, i_blocks is 1157903431, should be 0.  Fix? no

Inode 6996365 is in use, but has dtime set.  Fix? no

Inode 6996366 was part of the orphaned inode list.  IGNORED.
Inode 6996366 is in use, but has dtime set.  Fix? no

Inode 6996366 has INDEX_FL flag set but is not a directory.
Clear HTree index? no

Inode 6996366 has INDEX_FL flag set on filesystem without htree support.
Clear HTree index? no

HTREE directory inode 6996366 has an invalid root node.
Clear HTree index? no

Inode 6996366, i_blocks is 1157903431, should be 0.  Fix? no

Inode 6996367 was part of the orphaned inode list.  IGNORED.
Inode 6996367 is in use, but has dtime set.  Fix? no

Inode 6996368 was part of the orphaned inode list.  IGNORED.
Inode 6996368 is in use, but has dtime set.  Fix? no

Inode 6996369 is in use, but has dtime set.  Fix? no

Inode 6996370 was part of the orphaned inode list.  IGNORED.
Inode 6996370 is in use, but has dtime set.  Fix? no

Inode 6996371 was part of the orphaned inode list.  IGNORED.
Inode 6996371 is in use, but has dtime set.  Fix? no

Inode 6996372 was part of the orphaned inode list.  IGNORED.
Inode 6996372 is in use, but has dtime set.  Fix? no

Inode 6996373 is in use, but has dtime set.  Fix? no

Inode 6996374 has imagic flag set.  Clear? no

Inode 6996374 has compression flag set on filesystem without compression support.  Clear? no

Inode 6996374, i_blocks is 1157903431, should be 0.  Fix? no

Inode 6996375 was part of the orphaned inode list.  IGNORED.
Inode 6996375 is in use, but has dtime set.  Fix? no

Inode 6996375 has imagic flag set.  Clear? no

Inode 6996376 was part of the orphaned inode list.  IGNORED.
Inode 6996376 is in use, but has dtime set.  Fix? no

Inode 6996377 is in use, but has dtime set.  Fix? no

Inode 6996377 has imagic flag set.  Clear? no

Inode 6996378 was part of the orphaned inode list.  IGNORED.
Inode 6996378 is in use, but has dtime set.  Fix? no

Inode 6996379 was part of the orphaned inode list.  IGNORED.
Inode 6996379 is in use, but has dtime set.  Fix? no

Inode 6996379, i_blocks is 1157903431, should be 0.  Fix? no

Inode 6996380 was part of the orphaned inode list.  IGNORED.
Inode 6996380 is in use, but has dtime set.  Fix? no

Inode 6996381 is in use, but has dtime set.  Fix? no

Inode 6996382 was part of the orphaned inode list.  IGNORED.
Inode 6996382 is in use, but has dtime set.  Fix? no

Inode 6996383 was part of the orphaned inode list.  IGNORED.
Inode 6996383 is in use, but has dtime set.  Fix? no

Inode 6996384 was part of the orphaned inode list.  IGNORED.
Inode 6996384 is in use, but has dtime set.  Fix? no

Inode 6996384 has imagic flag set.  Clear? no

Inode 6996353 has compression flag set on filesystem without compression support.  Clear? no

Inode 6996353 has INDEX_FL flag set but is not a directory.
Clear HTree index? no

Inode 6996353 has INDEX_FL flag set on filesystem without htree support.
Clear HTree index? no

HTREE directory inode 6996353 has an invalid root node.
Clear HTree index? no

Inode 6996353, i_blocks is 3269927634, should be 0.  Fix? no

Inode 6996354 has compression flag set on filesystem without compression support.  Clear? no

Inode 6996354 has INDEX_FL flag set but is not a directory.
Clear HTree index? no

Inode 6996354 has INDEX_FL flag set on filesystem without htree support.
Clear HTree index? no

HTREE directory inode 6996354 has an invalid root node.
Clear HTree index? no

Inode 6996354, i_blocks is 1157903431, should be 0.  Fix? no

Inode 6996355 has compression flag set on filesystem without compression support.  Clear? no

Inode 6996355 has INDEX_FL flag set but is not a directory.
Clear HTree index? no

Inode 6996355 has INDEX_FL flag set on filesystem without htree support.
Clear HTree index? no

HTREE directory inode 6996355 has an invalid root node.
Clear HTree index? no

Inode 6996355, i_blocks is 1157903431, should be 0.  Fix? no

Inode 6996356 has compression flag set on filesystem without compression support.  Clear? no

Inode 6996356, i_blocks is 1157903431, should be 0.  Fix? no

Inode 6996358 has compression flag set on filesystem without compression support.  Clear? no

Inode 6996358, i_blocks is 1157903431, should be 0.  Fix? no

Inode 6996359 has INDEX_FL flag set but is not a directory.
Clear HTree index? no

Inode 6996359 has INDEX_FL flag set on filesystem without htree support.
Clear HTree index? no

HTREE directory inode 6996359 has an invalid root node.
Clear HTree index? no

Inode 6996359, i_blocks is 1157903431, should be 0.  Fix? no

Inode 6996360 has INDEX_FL flag set but is not a directory.
Clear HTree index? no

Inode 6996360 has INDEX_FL flag set on filesystem without htree support.
Clear HTree index? no

HTREE directory inode 6996360 has an invalid root node.
Clear HTree index? no

Inode 6996360, i_blocks is 1157903431, should be 0.  Fix? no

Inode 6996361 is too big.  Truncate? no

Block #1 (72) causes symlink to be too big.  IGNORED.
Block #4 (14056753) causes symlink to be too big.  IGNORED.
Block #5 (14056754) causes symlink to be too big.  IGNORED.
Block #6 (14056755) causes symlink to be too big.  IGNORED.
Block #7 (14056756) causes symlink to be too big.  IGNORED.
Block #8 (14056757) causes symlink to be too big.  IGNORED.
Block #9 (14056758) causes symlink to be too big.  IGNORED.
Block #10 (14056759) causes symlink to be too big.  IGNORED.
Block #11 (14056760) causes symlink to be too big.  IGNORED.
Inode 6996361 has illegal block(s).  Clear? no

Illegal block #12 (4079829298) in inode 6996361.  IGNORED.
Illegal block #13 (3313585962) in inode 6996361.  IGNORED.
Too many illegal blocks in inode 6996361.
Clear inode? no

Suppress messages? no

Illegal block #14 (1075007525) in inode 6996361.  IGNORED.
Illegal block #15 (707284039) in inode 6996361.  IGNORED.
Illegal block #16 (3809401802) in inode 6996361.  IGNORED.
Illegal block #17 (3082568200) in inode 6996361.  IGNORED.
Illegal block #18 (1211331191) in inode 6996361.  IGNORED.
Illegal block #19 (2804113767) in inode 6996361.  IGNORED.
Illegal block #20 (2115683492) in inode 6996361.  IGNORED.
Illegal block #21 (3681618668) in inode 6996361.  IGNORED.
Illegal block #22 (2651849654) in inode 6996361.  IGNORED.
Illegal block #23 (1162581026) in inode 6996361.  IGNORED.
Block #24 (51685524) causes symlink to be too big.  IGNORED.
Illegal block #25 (1145613932) in inode 6996361.  IGNORED.
Too many illegal blocks in inode 6996361.
Clear inode? no

Suppress messages? no

Illegal block #26 (4002553944) in inode 6996361.  IGNORED.
Illegal block #27 (2594382341) in inode 6996361.  IGNORED.
Illegal block #28 (448791446) in inode 6996361.  IGNORED.
Illegal block #29 (3863511452) in inode 6996361.  IGNORED.
Illegal block #30 (1545945079) in inode 6996361.  IGNORED.
Illegal block #31 (2486867946) in inode 6996361.  IGNORED.
Illegal block #32 (4049004979) in inode 6996361.  IGNORED.
Illegal block #33 (1455812548) in inode 6996361.  IGNORED.
Illegal block #34 (2829762785) in inode 6996361.  IGNORED.
Block #35 (19154667) causes symlink to be too big.  IGNORED.
Illegal block #36 (3472986776) in inode 6996361.  IGNORED.
Illegal block #37 (3033562895) in inode 6996361.  IGNORED.
Too many illegal blocks in inode 6996361.
Clear inode? no

Suppress messages? no

Illegal block #38 (2262886747) in inode 6996361.  IGNORED.
Illegal block #39 (3930238315) in inode 6996361.  IGNORED.
Illegal block #40 (4157043702) in inode 6996361.  IGNORED.
Illegal block #41 (416269392) in inode 6996361.  IGNORED.
Illegal block #42 (2579982706) in inode 6996361.  IGNORED.
Illegal block #43 (2111817748) in inode 6996361.  IGNORED.
Illegal block #44 (1039747125) in inode 6996361.  IGNORED.
Illegal block #45 (884657027) in inode 6996361.  IGNORED.
Illegal block #46 (910416880) in inode 6996361.  IGNORED.
Illegal block #47 (1904831653) in inode 6996361.  IGNORED.
Illegal block #48 (705311070) in inode 6996361.  IGNORED.
Illegal block #49 (777579593) in inode 6996361.  IGNORED.
Too many illegal blocks in inode 6996361.
Clear inode? no

###########################
MANY MORE OF THIS! About 3k
###########################

Illegal block #1022 (2834382331) in inode 6996365.  IGNORED.
Illegal block #1023 (1934133923) in inode 6996365.  IGNORED.
Illegal block #1024 (4175436597) in inode 6996365.  IGNORED.
Illegal block #1025 (2932539000) in inode 6996365.  IGNORED.
Illegal block #1026 (1379697991) in inode 6996365.  IGNORED.
Illegal block #1027 (3603286848) in inode 6996365.  IGNORED.
Illegal block #1028 (780647564) in inode 6996365.  IGNORED.
Illegal block #1029 (3257162588) in inode 6996365.  IGNORED.
Illegal block #1030 (2269150025) in inode 6996365.  IGNORED.
Illegal block #1031 (1574730387) in inode 6996365.  IGNORED.
Illegal block #1032 (3865043287) in inode 6996365.  IGNORED.
Illegal block #1033 (3081011804) in inode 6996365.  IGNORED.
Too many illegal blocks in inode 6996365.
Clear inode? no

Suppress messages? no

Illegal block #1034 (2743261750) in inode 6996365.  IGNORED.
Illegal block #1035 (1721890856) in inode 6996365.  IGNORED.
Illegal block #-1 (1129968126) in inode 6996365.  IGNORED.
Illegal block #-2 (4072033726) in inode 6996365.  IGNORED.
Error while iterating over blocks in inode 6996365: Illegal doubly indirect block found
e2fsck: aborted


The mkfs.ext2 command for the drive was:
Code:

mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
36634624 inodes, 73264081 blocks
3663204 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=75497472
2236 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
   32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
   4096000, 7962624, 11239424, 20480000, 23887872, 71663616


I had this before and trusted fsck.. But after repairing and repairing again the whole FS was damaged. After a few repair-attempts it was unmountable and was not even recognized as ext2/3 (this was was ext3, first error that occured was a broken journal).
I can still mount it (-o ro of course) and see all data. What can I do? I do not have another 300GB do back it all up.
And one other thing.. Since this happens again.. Can Samba damage the drive? Because Samba is very buggy when you share something and inside this share are other mounted devices (and/or even other shares) and move/copy data between these "places". The smb-process was still running with heavy cpu load even as the drive was unmounted. Last time this occured when I accesed the drive via samba, too. Maybe it has written some data to the unmounted device? I was unable to do a "cryptsetup luksClose lacie300", the error was "Device or resource busy" (something like that). Or can it be the encryption-module in the kernel? But I guess this might have happen to my /home partition or to my other encrypted USB-disk as well. Another suggestion is the the hardware of the Lacie300 is broken (drive or controller, maybe cable?). This is my idea, because of the device reset (see first entry in log, I think this was the drive, I am not sure).
How can I fix the filesystem? Is there a more "robust" filesystem that can be repaired more sucessfuly? I am planning to get a USV for power-outtages since some filesystems do not like it being unmounted so unexpected..

So, any ideas? Everything is appreciated. :)
Thank you in advance.

EDIT:
I got some extra space and was able to back all of the data up. Then I was curious if fsck.ext2 will do any good. And it did. It repaired the whole filesystem and connected some files I deleted before the crash to Lost+Found. About the course of this I am still unsure, but I guess it was the controller of the disk.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum