<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Automate Mount point check in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/automate-mount-point-check/m-p/3974509#M95435</link>
    <description>Hi Experts ,&lt;BR /&gt;&lt;BR /&gt;I need your help to get a script which will check eack time the system is rebooted or crashed and recoverd , that scripts has to check is all the mount points are mounted ? If not its has to intimate by sending mail.[Including the NFS mount points]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in Advance&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 03 Apr 2007 11:17:14 GMT</pubDate>
    <dc:creator>johnreid</dc:creator>
    <dc:date>2007-04-03T11:17:14Z</dc:date>
    <item>
      <title>Automate Mount point check</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-mount-point-check/m-p/3974509#M95435</link>
      <description>Hi Experts ,&lt;BR /&gt;&lt;BR /&gt;I need your help to get a script which will check eack time the system is rebooted or crashed and recoverd , that scripts has to check is all the mount points are mounted ? If not its has to intimate by sending mail.[Including the NFS mount points]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in Advance&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Apr 2007 11:17:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-mount-point-check/m-p/3974509#M95435</guid>
      <dc:creator>johnreid</dc:creator>
      <dc:date>2007-04-03T11:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Automate Mount point check</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-mount-point-check/m-p/3974510#M95436</link>
      <description>This is a case of the tail wagging the dog. While what you are asking is certainly "doable" (e.g. scripts in rc to tell you when the machine boots) and scanning /etc/fstab and comparing it to df output for each filesystem, the approach is fundamentally flawed. The real answer is to fix your crashes. I cannot imagine a situation where a machime crashes and reboots itself without my knowledge -- or that others can reboot a box without my knowledge.&lt;BR /&gt;&lt;BR /&gt;It's also not enough to know that all the filesystems mounted correctly at boot, you should be doing those checks on either a continuous or periodic automatic basis so that the special case of a reboot is handled implicitly by your already existing monitoring daemons.&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Apr 2007 11:32:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-mount-point-check/m-p/3974510#M95436</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-04-03T11:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Automate Mount point check</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-mount-point-check/m-p/3974511#M95437</link>
      <description>One way.. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;awk '/nfs/ {print $2}' /etc/fstab|\&lt;BR /&gt;while read list &lt;BR /&gt;do&lt;BR /&gt;        OK=&lt;BR /&gt;        OK=`mount|awk -v x=$list '$1 == x {print "OK"}'`&lt;BR /&gt;        if [[ $OK != "OK" ]]&lt;BR /&gt;        then&lt;BR /&gt;                if [[ $1 = "MANUAL" ]]&lt;BR /&gt;                then&lt;BR /&gt;                echo "$list is NOT mounted.. Now executing mount command !! - `date`"&lt;BR /&gt;                fi&lt;BR /&gt;                #echo "$list is NOT mounted.. Now executing mount command !! - `date`"|mailx -m -s "INFO - `hostname` NFS info" ux-admin&lt;BR /&gt;                mount $list &amp;gt; $LOG 2&amp;gt;&amp;amp;1&lt;BR /&gt;                :&lt;BR /&gt;        else&lt;BR /&gt;                if [[ $1 = "MANUAL" ]]&lt;BR /&gt;                then&lt;BR /&gt;                echo "$list  - $OK"&lt;BR /&gt;                fi&lt;BR /&gt;                :&lt;BR /&gt;        fi&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Apr 2007 11:37:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-mount-point-check/m-p/3974511#M95437</guid>
      <dc:creator>Tim Nelson</dc:creator>
      <dc:date>2007-04-03T11:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Automate Mount point check</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-mount-point-check/m-p/3974512#M95438</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Hmmmm.  A sound running system should not encounter these conditions.  If you can't mount filesystems, you have issues that need to be resolved.  However, you could construct something like this and if it gives you "warm-fuzzies" you could add it as a run-level-3 'rc' script in '/sbin/init.d':&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;while read DEV MNTPT X&lt;BR /&gt;do&lt;BR /&gt;    grep -q "${MNTPT}" /etc/mnttab || \&lt;BR /&gt;        mailx -s "${MNTPT} isn't mounted!" root &amp;lt; /dev/null&lt;BR /&gt;done &amp;lt; /etc/fstab&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Apr 2007 11:38:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-mount-point-check/m-p/3974512#M95438</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-04-03T11:38:04Z</dc:date>
    </item>
  </channel>
</rss>

