<?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 Re: Need help on df -k issue in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/need-help-on-df-k-issue/m-p/5323747#M53192</link>
    <description>&lt;P&gt;This is regarding Matti's reply: /proc/mounts and /etc/mtab are two different in content, and in format. I wonder how /proc/mounts can recreate /etc/mtab by simply "copy over".&lt;/P&gt;</description>
    <pubDate>Tue, 06 Sep 2011 20:09:03 GMT</pubDate>
    <dc:creator>HP-UX-OS</dc:creator>
    <dc:date>2011-09-06T20:09:03Z</dc:date>
    <item>
      <title>Need help on df -k issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-on-df-k-issue/m-p/5315479#M53154</link>
      <description>&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In My Linux box facing an issue df -k .&amp;nbsp; not showing any result!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;root @server1:~# uname -a&lt;BR /&gt;Linux server1 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux&lt;BR /&gt;root @server1:~#&lt;BR /&gt;root @server1:~# cat /etc/*release&lt;BR /&gt;Red Hat Enterprise Linux Client release 5.4 (Tikanga)&lt;BR /&gt;root @server1:~#&lt;BR /&gt;root @server1:~# df -k&lt;BR /&gt;df: cannot read table of mounted file systems&lt;BR /&gt;root @server1:~# ls -l /etc/mtab&lt;BR /&gt;-rw-r--r-- 1 root root 0 Aug 29 13:56 /etc/mtab&lt;BR /&gt;root @server1:~#&lt;BR /&gt;root @server1:~#&lt;BR /&gt;root @server1:~# mount -a&lt;BR /&gt;mount: /dev/DataVol/LogVol04 already mounted or /local/opt busy&lt;BR /&gt;mount: /dev/DataVol/LogVol05 already mounted or /local/home busy&lt;BR /&gt;mount: /dev/RootVol/LogVol02 already mounted or /var busy&lt;BR /&gt;mount: /dev/RootVol/LogVol03 already mounted or /tmp busy&lt;BR /&gt;mount: /dev/cciss/c0d0p1 already mounted or /boot busy&lt;BR /&gt;mount: devpts already mounted or /dev/pts busy&lt;BR /&gt;mount: sysfs already mounted or /sys busy&lt;BR /&gt;root @server1:~#&lt;BR /&gt;root @server1:~#&lt;BR /&gt;root @server1:~# tail -f /var/log/messages&lt;BR /&gt;Aug 29 06:10:37 server1 xinetd[4307]: EXIT: vnetd status=0 pid=7122 duration=1(sec)&lt;BR /&gt;Aug 29 07:26:51 server1 xinetd[4307]: START: vnetd pid=9681 from=44.55.104.89&lt;BR /&gt;Aug 29 07:26:51 server1 xinetd[4307]: START: vnetd pid=9682 from=44.55.104.89&lt;BR /&gt;Aug 29 07:26:51 server1 xinetd[4307]: EXIT: vnetd status=0 pid=9682 duration=0(sec)&lt;BR /&gt;Aug 29 07:26:52 server1 xinetd[4307]: EXIT: vnetd status=0 pid=9681 duration=1(sec)&lt;BR /&gt;Aug 29 08:44:50 server1 xinetd[4307]: START: vnetd pid=12244 from=44.55.104.89&lt;BR /&gt;Aug 29 08:44:50 server1 xinetd[4307]: START: vnetd pid=12245 from=44.55.104.89&lt;BR /&gt;Aug 29 08:44:50 server1 xinetd[4307]: EXIT: vnetd status=0 pid=12245 duration=0(sec)&lt;BR /&gt;Aug 29 08:44:51 server1 xinetd[4307]: EXIT: vnetd status=0 pid=12244 duration=1(sec)&lt;BR /&gt;Aug 29 09:41:16 server1 xinetd[4307]: START: login pid=14658 from=152.9.101.178&lt;/P&gt;&lt;P&gt;root @server1:~#&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to delete /etc/mtab&amp;nbsp; then tried mount -a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;no progress... Please help me to solve ifpossible w/o reboot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Sree&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2011 12:07:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-on-df-k-issue/m-p/5315479#M53154</guid>
      <dc:creator>Sreer</dc:creator>
      <dc:date>2011-08-29T12:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on df -k issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-on-df-k-issue/m-p/5316803#M53156</link>
      <description>&lt;P&gt;Your /etc/mtab has been truncated, but the filesystems are probably actually still mounted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because commands like "df" and "mount" will use the information in /etc/mtab, they will now show no mounted disks even if it isn't actually true. (At least the root filesystem must obviously be mounted, otherwise you could not run those commands at all.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Linux kernel maintains a list of mounted filesystems in /proc/mounts: this list is in the same format as /etc/mtab. Because /proc/mounts is dynamically generated by the kernel, it is guaranteed to reflect the true situation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To repopulate your /etc/mtab, run this command:&lt;/P&gt;&lt;PRE&gt;cat /proc/mounts &amp;gt; /etc/mtab&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;If all the filesystems listed in /etc/fstab were mounted when /etc/mtab was truncated, an alternate way to achieve the same result would be to run "fake" mount operations on each filesystem, like this:&lt;/P&gt;&lt;PRE&gt;mount -f -a&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I would recommend the first command. Use one or the other.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The log messages look like xinetd's regular statistics messages for connections related to Veritas (now Symantec) Netbackup backup software and one rlogin connection. They don't seem to be directly related to the /etc/mtab truncation issue.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2011 12:10:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-on-df-k-issue/m-p/5316803#M53156</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2011-08-30T12:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on df -k issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-on-df-k-issue/m-p/5323747#M53192</link>
      <description>&lt;P&gt;This is regarding Matti's reply: /proc/mounts and /etc/mtab are two different in content, and in format. I wonder how /proc/mounts can recreate /etc/mtab by simply "copy over".&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2011 20:09:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-on-df-k-issue/m-p/5323747#M53192</guid>
      <dc:creator>HP-UX-OS</dc:creator>
      <dc:date>2011-09-06T20:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on df -k issue</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-help-on-df-k-issue/m-p/5324439#M53196</link>
      <description>&lt;P&gt;In a sense, yes, they are somewhat different. But /proc/mounts format is essentially a &lt;U&gt;subset&lt;/U&gt; of /etc/mtab format. Any valid /proc/mounts line should be valid for /etc/mtab too, it just might not have all the information (mainly, the mount options) in all cases.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both /etc/mtab and /proc/mounts do have the same basic format:&lt;/P&gt;&lt;P&gt;&amp;lt;device/remotefs/placeholder&amp;gt; &amp;lt;mountpoint&amp;gt; &amp;lt;FStype&amp;gt; &amp;lt;comma-separated list of mount options&amp;gt; 0 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have lost your /etc/mtab, /proc/mounts can be used as a temporary substitute that should in most cases be good enough to get the system shutdown in a controlled fashion and then rebooted, at which point /etc/mtab will be regenerated anyway. See /etc/rc.d/rc.sysinit on RHEL5. You'll find a comment "# Clear mtab": unless the root filesystem is intended to stay read-only, the /etc/mtab will be truncated to zero size.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you haven't used the "user" mount option, it is likely the system will work well enough for most purposes, so an immediate reboot will not be required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RHEL5 /proc/mounts has an extra entry for the root filesystem, but that does not matter since you don't ever unmount the root filesystem: you just mount it read-only at the last phases of system shutdown. Likewise, RHEL5 /etc/mtab seems to be missing the entry for the /dev filesystem... but it's a RAM-based filesystem, so there is no point in unmounting it either, and having it not mentioned in regular /etc/mtab offers a small extra measure of protection against accidentally unmounting it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The man page of the "mount" command on a RHEL5 system (which is what the original poster has) has this to say about /etc/mtab and /proc/mounts:&lt;/P&gt;&lt;PRE&gt;When  the  proc  filesystem is mounted (say at /proc), the files
/etc/mtab and /proc/mounts have very similar contents. The  for‐
mer  has  somewhat  more  information, such as the mount options
used, but is not  necessarily  up-to-date  (cf.  the  -n  option
below).  It  is possible to replace /etc/mtab by a symbolic link
to /proc/mounts, and especially when you have very large numbers
of mounts things will be much faster with that symlink, but some
information is lost that way, and in particular using the "user"
option will fail.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Replacing /etc/mtab with a symlink to /proc/mounts is a valid technique if you want to keep the root filesystem read-only in normal use. This is often used in building embedded systems designed to run off a single CompactFlash module, when you wish to minimize the number of CompactFlash write operations.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2011 12:24:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-help-on-df-k-issue/m-p/5324439#M53196</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2011-09-07T12:24:17Z</dc:date>
    </item>
  </channel>
</rss>

