Operating System - HP-UX
1832059 Members
3027 Online
110034 Solutions
New Discussion

Re: how to restore fstab file?

 

how to restore fstab file?

Hi,
I managed to destroy my fstab file. I'm using the logical volume manager. Is there an easy way to create it? Or do I have to edit the file?

Thanks,
Aleks
7 REPLIES 7
Clemens van Everdingen
Honored Contributor

Re: how to restore fstab file?

Hi,

Restore form backup !

The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
T G Manikandan
Honored Contributor

Re: how to restore fstab file?

#cp /etc/fstab /etc/fstab.bk
#mount -p >/etc/fstab

check the contents
Sanjay Kumar Suri
Honored Contributor

Re: how to restore fstab file?

Check if /etc/mnttab can be used?

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Robert-Jan Goossens
Honored Contributor

Re: how to restore fstab file?

Hi,

Just tried TGM solution on my testserver, works like a charm.

# mv /etc/fstab /etc/fstab.old
# mount -p > /etc/fstab
# mount -a

Regards,
Robert-Jan
KapilRaj
Honored Contributor

Re: how to restore fstab file?

mount -p > /etc/fstab ### GRE8 !!

But do remember to add entries of the swaplv's into fstab manualy

Kaps
Nothing is impossible

Re: how to restore fstab file?

Hi,

the system is running again! The trouble was I noticed my fstab was gone only while rebooting. So mount -p did not work. And I had no backup either. I had to mount the lvols and examine the contents and then create the fstab using echo like this (no vi):

echo "/dev/vg00/lvol5 /usr vxfs delaylog 0 2" >> /etc/fstab

Thanks for your replies!

Aleks


RAC_1
Honored Contributor

Re: how to restore fstab file?

Do you have a ignite backup of this server?
If yes, on some other server where you have tape drive you can do as follows.

mt -f /dev/rmt/0mn fsf 1
cd /tmp
tar -xvf etc/fstab /dev/rmt/0mn

Then check that file and boot into single user mode and create a fstab file.

Anil
There is no substitute to HARDWORK