HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
Showing results for 
Search instead for 
Did you mean: 

mount -a

Regular Advisor

mount -a

Hi ,

Can anyone tell me .........

when I am using
#mv /etc/mnttab /etc/mnttab.old
#mount -a

it has re-created /etc/mnttab file.
I just want to confirm where mount command goes through to re-creates /etc/mnttab file?
Patrick Wallek
Honored Contributor

Re: mount -a

The mount command uses /etc/fstab to mount file systems.
Regular Advisor

Re: mount -a

Yes, a mount -a re reads the /etc/fstab file and mount whatever it is not already mounted.
Regular Advisor

Re: mount -a


if I changed /etc/fstab to /etc/fstab.old

and /etc/mnttab to /etc/mnttab.old

and then mount -a excutes.....

whether it will re-creates the file or not
is bdf gives the output?

Esteemed Contributor

Re: mount -a

If /etc/fstab is not there any more, how can mount -a work?
Patrick Wallek
Honored Contributor

Re: mount -a

>>if I changed /etc/fstab to /etc/fstab.old

/etc/fstab is a file that you can edit so that additional filesystems are mounted at bootup or via 'mount -a' or just 'mount' in general. Moving this file to a different name would be unwise. If you rebooted your system while it was named fstab.old, you would not have any file systems mounted and your boot would fail.

>>and /etc/mnttab to /etc/mnttab.old


>>and then mount -a excutes.....

It would fail because /etc/fstab does not exist.

>>whether it will re-creates the file or not
>>is bdf gives the output?

No, it would not.

What is the real problem you are trying to solve?
Regular Advisor

Re: mount -a

hi Patrick Wallek,

Atually, I have changed both /etc/fstab and /etc/mnttab files even I am putting bdf command giving output!
I have enclosed herewith script output!
James R. Ferguson
Acclaimed Contributor

Re: mount -a


> Atually, I have changed both /etc/fstab and /etc/mnttab files even I am putting bdf command giving output!

I agree with Patrick: what problem are you attempting to solve?

The kernel keeps its own internal table of mounted filesystems. In fact, from the 'mnttab(4)' manpages:

"The mnttab file is a pseudo-file whose contents are dynamically created based on the the kernelâ s private incore mount table. The file will always reflect the latest file system mount and umount operations. syncer rewrites the mnttab file if it is found to be deleted or corrupted."


Patrick Wallek
Honored Contributor

Re: mount -a

Please move your /etc/fstab.ren back to /etc/fstab.

'bdf' does NOT use /etc/fstab. You NEED /etc/fstab. /etc/fstab does NOT get recreated automatically via any command.

As I asked before, what problem are you trying to solve? If we know the problem, we can try to guide you toward a solution.

V. Nyga
Honored Contributor

Re: mount -a


>I have changed /etc/fstab
No, you haven't changed it you've renamed it!

Just check the content of /etc/fstab - it says at boot up how to mount your logical volumes to '/' and others.
Without this information your system can't boot up correctly!

BTW.: You have assigned points to 2 of 33 responses to your questions

If you don't want to use this answer feedback system, do you expect responses at all?
Please check your threads:

*** Say 'Thanks' with Kudos ***