0

I have a Debian Wheezy computer running a Postgresql Server and NO NFS filesystems.

After rebooting the computer, the following error has appeared:

ls: cannot access 0000: Stale NFS file handle
516439 drwx------ 2 postgres postgres    8 Nov 12 20:25 .
516480 drwx------ 3 postgres postgres 4096 Nov 17 17:08 ..
? ?????????? ? ?        ?           ?            ? 0000

The "/var/lib/postgresql/9.1/main/pg_notify/0000" file is STALE and I cannot remove it or do anything at all with it. In order to get rid of that file, I tried the following options:

  1. Rebooting the computer in order to unmount the filesystem (as suggested in several forums) did not work.
  2. Removing postgresql (apt-get -purge) did not do anything at all either.
  3. Trying to manually remove that file does not work either (Stale NFS file handle).

This directory is part of a JFS partition over a ciphered volume managed by LVM.

The output for the fsck:

fsck.jfs version 1.1.15, 04-Mar-2011
processing started: 11/17/2014 20:22:30
Using default parameter: -p
The current device is:  /
ujfs_rw_diskblocks: read 0 of 4096 bytes at offset 32768
ujfs_rw_diskblocks: read 0 of 4096 bytes at offset 61440
Superblock is corrupt and cannot be repaired 
since both primary and secondary copies are corrupt.

Output for ls -l:

ls -l /var/lib/postgresql/9.1/main/pg_notify/0000

I would like to know...

  1. Why do I have a problem with a NFS handle in a non-NFS partition?
  2. Is there anyway in which I can get rid of that file (workarounds are more than welcome as well)?
nsx
  • 697
  • 1
  • 13
  • 41
  • 1
    Before you do anything else, read and act on https://wiki.postgresql.org/wiki/Corruption – Craig Ringer Nov 18 '14 at 03:50
  • 1
    Seems exceedingly likely to be filesystem corruption. Why would you use JFS? Please show output of `mount` (without arguments), `ls -l /var/lib/postgresql/9.1/main/pg_notify/0000`, recent output of `dmesg`. – Craig Ringer Nov 18 '14 at 03:51
  • ls: cannot access /var/lib/postgresql/9.1/main/pg_notify/0000: Stale NFS file handle – nsx Nov 18 '14 at 04:02
  • dmesg does not show any error about the filesystem. – nsx Nov 18 '14 at 04:03
  • So, do you have a copy of the data directory taken while the PostgreSQL server was stopped stashed somewhere safe yet? If you don't, *go do that now*. – Craig Ringer Nov 18 '14 at 04:10
  • @CraigRinger, thanks for the advice, but this is a server that I use for developing my web applications. I do not really need to keep the data. The only problem that I have right now is that I cannot reinstall postgresql since the package has to be configured over the same directory that right now cannot be used. – nsx Nov 18 '14 at 04:20
  • 1
    Better to edit the question then comment when the edit's done, it's hard to read things like that in comments where there's no formatting. If the data isn't important I suggest simply tearing the system down and recreating it - preferably with a more typical file system like ext4. – Craig Ringer Nov 18 '14 at 04:21
  • Please, as @CraigRinger asked, show the output of `mount`. Show the contents of `/etc/fstab` file too. – Jdamian Nov 22 '14 at 13:24
  • 1
    If your server is intended for "developing your web applications" (not for production purposes), why did you need to use a ciphered logical volume? – Jdamian Nov 22 '14 at 13:27
  • Because it is the laptop they gave me where I work and I also use it for storing my personal stuff. @Jdamian, I do not think that your question helps in solving this problem. – nsx Nov 22 '14 at 19:55

0 Answers0