mount, df, etc/mtab... Question

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In /etc is a file named mtab. It appears that each time a 'mount -t ...' command is issued the number of lines in this file grows by the number of devices mounted. After many reboots, the file is quite large. Whenever I use the 'df' or 'mount' (list only) command it lists every line in the mtab file. This means the same mount points are repeated in the list over and over. This list grows over time; they even scroll off the page after a while.

Is this expected behavior? For each unique device shouldn't there be only a single line in the 'df' or 'mount' output?

Demonstrated in attached log file

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Err on my setup /etc/mtab is just a symlink to /proc/mounts.

Other setups I've seen have /etc/mtab a symlink to /tmp/mtab which of course gets deleted at each power cycle.

I'd suggest you upgrade your root filesystem to a recent buildroot release, your problem will be solved.

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

squidgit wrote:
Err on my setup /etc/mtab is just a symlink to /proc/mounts.

Other setups I've seen have /etc/mtab a symlink to /tmp/mtab which of course gets deleted at each power cycle.

I'd suggest you upgrade your root filesystem to a recent buildroot release, your problem will be solved.

-S.

Thanks squidgit, good idea.

After the fiasco I went through with the last buildroot trying to modify the kernel for extra serial ports ( RS 232 + 485 ), I think I'll just do the symlink of /etc/mtab to /tmp/mtab. That should be just fine until some other compelling reason to re-build rootfs comes up.