Skip to contentSkip to conversation

Stale NFS file handle after power loss

DISCUSSION Thomas Koch 3 participants 6 messages Jun 8, 2013 – Jun 15, 2013 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hi,

I had a power loss on my btrfs file system during package installation and now I found this:

<code>
% ls -l /var/lib/dpkg/tmp.ci
ls: cannot access /var/lib/dpkg/tmp.ci/conffiles: Stale NFS file handle
ls: cannot access /var/lib/dpkg/tmp.ci/md5sums: Stale NFS file handle total 0
-????????? ? ? ? ? ? conffiles
-????????? ? ? ? ? ? md5sums
% sudo rm -rf /var/lib/dpkg/tmp.ci/conffiles
rm: cannot remove ‘/var/lib/dpkg/tmp.ci/conffiles’: Stale NFS file handle </code>

I booted with a live system and ran btrfsck (without --repair!) but this did not change the situation. Unfortunately I wasn't clever enough to save the output of btrfsck somehow. Do you need it?

Could you help me to get rid of these bogus files, please?

Regards,

Thomas Koch, http://www.koch.ro

#1 lore raw
Quoted 16 lines · Thomas Koch

Hi,

I had a power loss on my btrfs file system during package installation and now I found this:

<code>
% ls -l /var/lib/dpkg/tmp.ci
ls: cannot access /var/lib/dpkg/tmp.ci/conffiles: Stale NFS file handle
ls: cannot access /var/lib/dpkg/tmp.ci/md5sums: Stale NFS file handle total 0
-????????? ? ? ? ? ? conffiles
-????????? ? ? ? ? ? md5sums
% sudo rm -rf /var/lib/dpkg/tmp.ci/conffiles
rm: cannot remove ‘/var/lib/dpkg/tmp.ci/conffiles’: Stale NFS file handle </code>

Quoted 5 lines

I booted with a live system and ran btrfsck (without --repair!) but this did not change the situation. Unfortunately I wasn't clever enough to save the output of btrfsck somehow. Do you need it?

Could you help me to get rid of these bogus files, please?

Don't run with --repair, but please capture the output so I can see what's going wrong. Thanks,

Josef

#2 lore raw
Quoted 21 lines · Josef Bacik
Quoted 20 lines · Thomas Koch

Hi,

I had a power loss on my btrfs file system during package installation and now I found this:

<code>
% ls -l /var/lib/dpkg/tmp.ci
ls: cannot access /var/lib/dpkg/tmp.ci/conffiles: Stale NFS file handle
ls: cannot access /var/lib/dpkg/tmp.ci/md5sums: Stale NFS file handle total 0
-????????? ? ? ? ? ? conffiles
-????????? ? ? ? ? ? md5sums
% sudo rm -rf /var/lib/dpkg/tmp.ci/conffiles
rm: cannot remove ‘/var/lib/dpkg/tmp.ci/conffiles’: Stale NFS file handle </code>

I booted with a live system and ran btrfsck (without --repair!) but this did not change the situation. Unfortunately I wasn't clever enough to save the output of btrfsck somehow. Do you need it?

Quoted 6 lines
Quoted 1 line

Could you help me to get rid of these bogus files, please?

Don't run with --repair, but please capture the output so I can see what's going wrong. Thanks,

Josef

sudo btrfsck /dev/x121e/root
checking extents
checking fs roots
root 5 inode 9319255 errors 1040
root 5 inode 9698560 errors 1000
root 5 inode 11591532 errors 2001
unresolved ref dir 11591531 index 2 namelen 9 name conffiles filetype 1
error 4
root 5 inode 11591534 errors 2001
unresolved ref dir 11591531 index 4 namelen 7 name md5sums filetype 1
error 4
found 270172975104 bytes used err is 1
total csum bytes: 261797296
total tree bytes: 2063106048
total fs tree bytes: 1575575552
btree space waste bytes: 561459705
file data blocks allocated: 386128334848
referenced 262981738496
Btrfs Btrfs v0.19

thx for looking into this!

Thomas Koch, http://www.koch.ro

#3 lore raw

Thomas Koch:

Quoted 40 lines · Josef Bacik
Quoted 21 lines · Thomas Koch
Quoted 20 lines

Hi,

I had a power loss on my btrfs file system during package installation and now I found this:

<code>
% ls -l /var/lib/dpkg/tmp.ci
ls: cannot access /var/lib/dpkg/tmp.ci/conffiles: Stale NFS file handle
ls: cannot access /var/lib/dpkg/tmp.ci/md5sums: Stale NFS file handle total 0
-????????? ? ? ? ? ? conffiles
-????????? ? ? ? ? ? md5sums
% sudo rm -rf /var/lib/dpkg/tmp.ci/conffiles
rm: cannot remove ‘/var/lib/dpkg/tmp.ci/conffiles’: Stale NFS file handle </code>

I booted with a live system and ran btrfsck (without --repair!) but this did not change the situation. Unfortunately I wasn't clever enough to save the output of btrfsck somehow. Do you need it?

Quoted 6 lines
Quoted 1 line

Could you help me to get rid of these bogus files, please?

Don't run with --repair, but please capture the output so I can see what's going wrong. Thanks,

Josef

sudo btrfsck /dev/x121e/root
checking extents
checking fs roots
root 5 inode 9319255 errors 1040
root 5 inode 9698560 errors 1000
root 5 inode 11591532 errors 2001
unresolved ref dir 11591531 index 2 namelen 9 name conffiles
filetype 1 error 4
root 5 inode 11591534 errors 2001
unresolved ref dir 11591531 index 4 namelen 7 name md5sums filetype
1 error 4

Quoted 8 lines

found 270172975104 bytes used err is 1 total csum bytes: 261797296
total tree bytes: 2063106048
total fs tree bytes: 1575575552 btree space waste bytes: 561459705 file data blocks allocated: 386128334848
referenced 262981738496
Btrfs Btrfs v0.19

Hi Josef,

do you think that you might find some solution to this problem or should I plan to re-setup my machine?

Regards,

Thomas Koch, http://www.koch.ro

#4 lore raw
Quoted 50 lines · Thomas Koch

Thomas Koch:

Quoted 40 lines · Josef Bacik
Quoted 21 lines · Thomas Koch
Quoted 20 lines

Hi,

I had a power loss on my btrfs file system during package installation and now I found this:

<code>
% ls -l /var/lib/dpkg/tmp.ci
ls: cannot access /var/lib/dpkg/tmp.ci/conffiles: Stale NFS file handle
ls: cannot access /var/lib/dpkg/tmp.ci/md5sums: Stale NFS file handle total 0
-????????? ? ? ? ? ? conffiles
-????????? ? ? ? ? ? md5sums
% sudo rm -rf /var/lib/dpkg/tmp.ci/conffiles
rm: cannot remove ‘/var/lib/dpkg/tmp.ci/conffiles’: Stale NFS file handle </code>

I booted with a live system and ran btrfsck (without --repair!) but this did not change the situation. Unfortunately I wasn't clever enough to save the output of btrfsck somehow. Do you need it?

Quoted 6 lines
Quoted 1 line

Could you help me to get rid of these bogus files, please?

Don't run with --repair, but please capture the output so I can see what's going wrong. Thanks,

Josef

sudo btrfsck /dev/x121e/root
checking extents
checking fs roots
root 5 inode 9319255 errors 1040
root 5 inode 9698560 errors 1000
root 5 inode 11591532 errors 2001
unresolved ref dir 11591531 index 2 namelen 9 name conffiles
filetype 1 error 4
root 5 inode 11591534 errors 2001
unresolved ref dir 11591531 index 4 namelen 7 name md5sums filetype
1 error 4

Quoted 8 lines

found 270172975104 bytes used err is 1 total csum bytes: 261797296
total tree bytes: 2063106048
total fs tree bytes: 1575575552 btree space waste bytes: 561459705 file data blocks allocated: 386128334848
referenced 262981738496
Btrfs Btrfs v0.19

Quoted 5 lines

Hi Josef,

do you think that you might find some solution to this problem or should I plan to re-setup my machine?

Yup sorry I just got sidetracked, I'll see what can be done tomorrow, but your best bet it so pull down the latest btrfs-progs and build it and run

./btrfs-image /dev/whatever blah.img

and put the image up somewhere I can pull it down so I can fix btrfsck to fix your file system and test it locally before I send you the patch. Thanks,

Josef

#5 lore raw
Quoted 3 lines · Josef Bacik

and put the image up somewhere I can pull it down so I can fix btrfsck to fix your file system and test it locally before I send you the patch. Thanks,

Would it be possible to get this sort of thing fixed in the kernel by a scrub?

I've had a similar problem to Thomas (coincidentally also under /var/lib/dpkg) and I created a new filesystem and copied all the files across. That wasn't particularly difficult as the system was a virtual machine, but it was still rather annoying.

Also if a file is corrupted then I think that rm -f should work to remove it. In the example cited the system would be in a good functional state after "rm -f /var/lib/dpkg/tmp.ci/*" and it seems to me that file corruption shouldn't be a good reason to prevent that operation from completing.

Signature · 2 lines
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/