I have a NFS server with a ZFS backend (NAS4Free) and a client machine (9.3-RELEASE). The client machine has an application that is always reading and writing data to the mounted NFS export.
The NFS server is rebooted (power/hardware failure, kernel panic, or human error) without properly stopping the application on the client machine. As expected processes trying to access the mount would 'hang' until the server comes back.
In my specific example the application is a Bitcoin wallet. It keeps a log and databases on the NFS mount. When the NFS server reboots it hangs then resumes when the server is back. Good.
Problem/question is the log stops updating after the server is back online. The databases appear to continue reading and writing normally. Why? and more importantly, are the databases being corrupted?
According to
The NFS server is rebooted (power/hardware failure, kernel panic, or human error) without properly stopping the application on the client machine. As expected processes trying to access the mount would 'hang' until the server comes back.
In my specific example the application is a Bitcoin wallet. It keeps a log and databases on the NFS mount. When the NFS server reboots it hangs then resumes when the server is back. Good.
Problem/question is the log stops updating after the server is back online. The databases appear to continue reading and writing normally. Why? and more importantly, are the databases being corrupted?
According to
fstat and procstat:
Code:
fstat /mnt/blockchains/Bitcoin/debug.log
USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME
root bitcoind 23416 4 /mnt/blockchains 2126 -rw------- 53316008 w /mnt/blockchains/Bitcoin/debug.log
Code:
procstat -f 23416
PID COMM FD T V FLAGS REF OFFSET PRO NAME
23416 Bitcoind text v r r-------- - - - /usr/local/bin/bitcoind
23416 Bitcoind cwd v d r-------- - - - /mnt/blockchains/Bitcoin
23416 Bitcoind root v d r-------- - - - /
23416 Bitcoind 0 v x rw------- 33 31 - -
23416 Bitcoind 1 v x rw------- 33 31 - -
23416 Bitcoind 2 v x rw------- 33 31 - -
23416 Bitcoind 3 v r rw------- 1 0 - -
23416 Bitcoind 4 v r -wa------ 1 53316062 - /mnt/blockchains/Bitcoin/debug.log
23416 Bitcoind 5 v r -wa------ 1 0 - -
23416 Bitcoind 6 s - rw---n--- 1 0 TCP ::.22346 ::.0
23416 Bitcoind 7 s - rw---n--- 1 0 TCP 0.0.0.0:22346 0.0.0.0:0
23416 Bitcoind 8 v r -w------- 1 6569 - -
23416 Bitcoind 9 v r rw------- 1 0 - -
23416 Bitcoind 10 s - rw---n--- 1 0 TCP 10.3.3.10:37200 x.x.x.x:22346
23416 Bitcoind 11 v r rw------- 1 0 - -
23416 Bitcoind 12 s - rw---n--- 1 0 TCP 10.3.3.10:41444 x.x.x.x:22346
23416 Bitcoind 13 v r rw------- 1 10485760 - /mnt/blockchains/Bitcoin/database/log.0000000009
23416 Bitcoind 14 k - rw------- 2 0 - -
23416 Bitcoind 15 p - rw---n--- 1 0 - -
23416 Bitcoind 16 p - rw---n--- 1 0 - -
23416 Bitcoind 17 s - rw---n--- 2 0 TCP ::.22345 ::.0
23416 Bitcoind 18 s - rw---n--- 1 0 TCP 10.3.3.10:50601 x.x.x.x:22346
23416 Bitcoind 20 v r rw------- 1 0 - /mnt/blockchains/Bitcoin/wallet.dat
23416 Bitcoind 22 v r rw------- 1 0 - -