2

I have a .bat script that runs from a Windows 7 machine. Part of the script is to use plink to ssh into a Red Hat machine and run a couple commands. I have about 4 or 5 plink commands within the script. For example:

plink -pw password -ssh username@host "tar -czplf /archive/mounted_folder/test.tar /archive/folder_to_tar"

where mounted_folder is a mounted NFS share, which is located on a server running Windows Server 2008 R2.

I noticed that if the system hasn't been touched in over a day and then the script is run, the mounted folders on the Red Hat machine dropout and become unusable. If you reset the Red Hat machine, the folders are properly mounted again, and if you run the script again, it works as expected -- nothing is dropped.

What exactly could be causing this problem?

Edit:

If I try to remount the folder directly after it drops out using

mount -a

the mounts still are unusable, even though no error is produced. I've found that a reboot is the only way to get them remounted

Franklin
  • 131

1 Answers1

0

I don't know if this is part of the problem or not, but mounted file systems don't need fsck or dump.

The fifth field, (fs_freq), is used for these filesystems by the dump(8) command to determine which filesystems need to be dumped. If the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be dumped.

The sixth field, (fs_passno), is used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time. The root filesystem should be specified with a fs_passno of 1, and other filesystems should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.

For a mounted filesystem, you should use the mount option _netdev. This tells the system that it needs to be mounted after the network is brought online. Otherwise, it might not mount at boot.

server:/win_archive/folder_to_mount /archive/mounted_folder nfs _netdev 0 0
Aaron Copley
  • 12,954