1834149 Members
2333 Online
110064 Solutions
New Discussion

Re: fstab overwrite

 
SOLVED
Go to solution
Jeff Hagstrom
Regular Advisor

fstab overwrite

We have 2 boxes, both on hp 11.00. The database admin used tar to backup some of his database files to put onto the test box. He also copied /etc/fstab and overwrote the fstab on the test box. There is no backup. I repeat there is no backup. The box was just configured. Presently the fstab and command bdf do not match up. HELP? How can I get the fstab to resemble what is on the system?
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: fstab overwrite

Hi Jeff:

I'd use /etc/mnttab to rebuild the current /etc/fstab. The mnttab file will show you the mount options in use from the last mount.

# cat /etc/mnttab

Regards!

...JRF...
Darrell Allen
Honored Contributor

Re: fstab overwrite

Hi Jeff,

mount -p >/etc/fstab
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Santosh Nair_1
Honored Contributor

Re: fstab overwrite

First of all, why does the dba have root privs? The permissions on /etc/fstab should be 644, so (s)he should not have been able to overwrite the fstab file.

In any case, since the deed is already done, you can do a mount -p which will print out what's mounted on the system in fstab format, so

mount -p >> /etc/fstab

and then edit /etc/fstab to suite your needs.

-Santosh
Life is what's happening while you're busy making other plans
Deshpande Prashant
Honored Contributor

Re: fstab overwrite

Hi
#mount -v will give you details of file sysetms mounted with their options.

Thanks.
Prashant.
Take it as it comes.