Online Expert Day - HPE Data Storage - Live Now
April 24/25 - Online Expert Day - HPE Data Storage - Live Now
Read more
cancel
Showing results for 
Search instead for 
Did you mean: 

mount -a

Deeos
Regular Advisor

mount -a

Hi ,


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

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


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

Re: mount -a

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

Re: mount -a

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

Re: mount -a

okay.....


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?

Deepak
Tingli
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

OK

>>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?
Deeos
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!
Deepak
James R. Ferguson
Acclaimed Contributor

Re: mount -a

Hi:

> 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."

Regards!

...JRF...
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

Hi,

>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:
http://forums11.itrc.hp.com/service/forums/pageList.do?userId=WW320597&listType=unassigned&forumId=1

V.
*** Say 'Thanks' with Kudos ***