LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   finding filesystem availability (https://www.linuxquestions.org/questions/linux-software-2/finding-filesystem-availability-77224/)

akmore 07-30-2003 04:08 AM

finding filesystem availability
 
Is there a simple way - without making statfs call - to find out if a currently mounted filesystem is unavailable?

The filesystem could be unavailable because the hosting disk is no longer available.

jvds 07-30-2003 04:26 AM

Not 100% sure but you could poll /etc/mtab though TBH I don't think that will take care of stale NFS mounts

Rus

akmore 07-30-2003 04:52 AM

Rus, thanks for your reply.

The problem that I face is that I have an external hard disk on which I have a filesystem that is auto mounted. My software application uses this filesystem. I want to know from the application when the disk containing the filesystem becomes unavailable.

/etc/mtab and /proc/mounts don't get updated if the media containing the filesystem is suddenly not available.

-Anil


All times are GMT -5. The time now is 07:41 AM.