LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   fsck inode / block errors + stale NFS file handle - advice please (https://www.linuxquestions.org/questions/linux-hardware-18/fsck-inode-block-errors-stale-nfs-file-handle-advice-please-930886/)

stevewalsh123 02-23-2012 10:02 AM

fsck inode / block errors + stale NFS file handle - advice please
 
1 Attachment(s)
I have a (corrupt) 500GB SATA harddisk connected via USB - no NSF involved !

When I try to mount the disk I get the following message :
mount: Stale NFS file handle

When I run fsck -c I get no bad blocks.
When I run fsck -n I get lots of inode and block errors, eg

Resize inode not valid. Recreate? no

Root inode is not a directory. Clear? no

Inode 984065 has a bad extended attribute block 3967233. Clear? no

Extended attribute block 3967233 has h_blocks > 1. Clear? no

Extended attribute block 3967233 is corrupt (invalid value). Clear? no

Extended attribute block 3967233 is corrupt (invalid value). Clear? no

Extended attribute block 3967233 is corrupt (allocation collision). Clear? no

Inode 984065 has illegal block(s). Clear? no

Illegal block #8 (1310485127) in inode 984065. IGNORED.
Illegal block #9 (1317294459) in inode 984065. IGNORED.
.
.
.
Illegal block #3082 (4294967295) in inode 984065. IGNORED.
Illegal block #3083 (4294967295) in inode 984065. IGNORED.
Too many illegal blocks in inode 984065.
Clear inode? no

Suppress messages? no

Illegal indirect block (536903422) in inode 984065. IGNORED.
Error while iterating over blocks in inode 984065: Illegal indirect block found

/dev/sdd1: ********** WARNING: Filesystem still has errors **********


/dev/sdd1: ********** WARNING: Filesystem still has errors **********

e2fsck: aborted


I've attached the full error output...

Should I run fsck and answer yes to everything ?
Are there any bits I should answer yes to and no to others ?

Any and all advice would be much appreciated...

Thanks,
Steve

T3RM1NVT0R 02-23-2012 01:57 PM

Hi Steve,

Did you umount the device before running e2fsck? Which distribution you are using? Any particular reason to run e2fsck with -n switch? Because here is what I can see in e2fsck manpage when it runs with -n switch:
Code:


      -n    Open the filesystem read-only, and assume an answer of  `no'  to
              all  questions.  Allows  e2fsck  to  be used non-interactively.
              (Note: if the -c, -l, or -L options are specified in addition to
              the -n option, then the filesystem will be opened read-write, to
              permit the bad-blocks list to be  updated.  However,  no  other
              changes will be made to the filesystem.)  This option may not be
              specified at the same time as the -p or -y options.

Did you try running
Code:

e2fsck -v /dev/sdd
If yes, what was the result?

stevewalsh123 02-24-2012 05:18 AM

Thanks for the reply.

I am using crunchbang linux.
Linux crunchbang 2.6.39-bpo.2-686-pae #1 SMP Thu Aug 4 11:02:22 UTC 2011 i686 GNU/Linux

I didn't need to umount to run e2fsck because the disk won't mount anymore. I just get the stale nfs file handle error... (I have rebooted but this made no difference to the stale nfs file handle error message appearing)
It does not appear in the list of mounted volumes when I running the "mount" command.

It does appear in the list of disks from fdisk -l
user@crunchbang:~$ fdisk -l

Disk /dev/sdd: 500.1 GB, 500106780160 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000425b6

Device Boot Start End Blocks Id System
/dev/sdd1 * 1 60801 488384001 83 Linux



I ran e2fsck with the -n switch just to get a quick look at the errors without changing anything...

The attachment from the previous post is the output of : e2fsck -nv /dev/sdd
So the result of running without the -n and just with the -v, is being prompted for the first error :

user@crunchbang:~$ e2fsck -v /dev/sdd1
e2fsck 1.42 (29-Nov-2011)
/dev/sdd1 was not cleanly unmounted, check forced.
Resize inode not valid. Recreate<y>?


I don't feel confident in my knowledge of disks and storage to be sure that my answers to the e2fsck prompts would be the right ones...
Nor do I trust the -y switch to answer yes to everything !

I'm grateful for any and all advice offered...

Cheers,
Steve

T3RM1NVT0R 02-25-2012 07:20 PM

@ Reply
 
Alright. Can you let me know how you are trying to mount the disk. Let me know the exact command. From the fdisk output it looks like you have got single partition on this disk. Do you have entry to mount this partition in /etc/fstab? Which filesystem this partition is formatted with? Any changes that you made which lead to this situation. Was it working before?

stevewalsh123 02-27-2012 06:07 AM

The drive used to mount automatically when I plugged it in.... there is no entry is /etc/fstab
The command I would use to mount it, if I was doing it manually would be nothing special, and I get the same result :

user@crunchbang:~$ sudo mount /dev/sdd1 /home/user/backup
[sudo] password for user:
mount: Stale NFS file handle


The disk has only 1 partition.... It was formatted to EXT2 or 3 - I can't remember which....

And the thing which lead to this situation was a powerloss during an rsync process... (this disk was being written to)

It was working fine before this and I'd had no problems at all... it was not a "dodgy" disk with bad sectors etc...

T3RM1NVT0R 02-27-2012 01:58 PM

@ Reply
 
Alright. I need the output of the following:

1.
Code:

parted -l
2.
Code:

cat /etc/fstab
I know that you have not configured NFS but I would like to see the output of below as well:

3.
Code:

cat /etc/exports
Run these commands when your external hdd is connected to the system.

stevewalsh123 03-02-2012 08:13 AM

Sorry for the delay in replying....

Here's the information you have requested.

user@crunchbang:~$ parted -l
Model: SAMSUNG HD501LJ (scsi)
Disk /dev/sdd: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 500GB 500GB primary ext2 boot



user@crunchbang:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=728ae5bc-0457-4fa4-ae4d-e68731b2a43e / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
#UUID=6dfd3603-58f5-4c19-8c23-8375f42868c9 none swap sw 0 0
UUID=e79808fb-0e67-4973-90f6-2affc8ebf68e none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
#/dev/sdc5 /home/user/oldlinux ext3 defaults 0 0
UUID="decbf26e-89d0-439d-ab9e-6d54108ed5e9" /home/user/DATA ext4 defaults 0 0
#/dev/sdc2 /home/user/XP vfat defaults 0 0
#/dev/sdc3 /home/user/OTHER ext3 defaults 0 0
UUID="1911cb3b-b0df-4c69-b7ee-fb71ff9e8f62" /home/user/DATA_ ext4 defaults 0 0


user@crunchbang:~$ cat /etc/exports
cat: /etc/exports: No such file or directory


Thanks in advance
Steve

T3RM1NVT0R 03-02-2012 02:59 PM

@ Reply
 
From the output I can see that it is ext2 filesystem. Did you try connecting this hdd to any other linux system. Were you able to access the drive there? If it is accessible on another machine then it could be an issue with this machine (a reboot should fix then). If you get the same error on the other machines as well then try this:

Try to stop the nfs client. It might be possible that nfs.client is trying to access the file system as soon as it tries to mount. You can do that using the following command:

Code:

sudo /etc/init.d/nfs.client stop
If this doesn't work then I would suggest you to make an image of your hdd and then run:

Code:

fsck.ext2 /dev/sdd


All times are GMT -5. The time now is 01:30 AM.