1834903 Members
2822 Online
110071 Solutions
New Discussion

Creating fstab

 
Darrell Tschakert
Regular Advisor

Creating fstab

Hi,
SUMMARY: What is the command to run to rebuild the /etc/fstab file?

DETAILS: I am putting together some documentation and a few scripts for Disaster Recovery (DR) of one of our HP-UX 11.23 systems. The HP-UX system is conneced to an array which is on vg01. The fstab on the original system has entries for the file systems on the array - vg01. When the HP is first restored, the vg01 volume group is not yet created, so I don't want these file systems listed in the fstab. I could just edit /etc/fstab to remove these file system entries. However, I am told that there is an HP-UX command that I can run to rebuild the /etc/fstab. Can anyone tell me the name of this command?

Thanks,

Darrell Tschakert
I'll add a quote when I think of one.
4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: Creating fstab

I am not aware of any such command.

I have always modified /etc/fstab by hand.
Jeff_Traigle
Honored Contributor

Re: Creating fstab

Well, as long as the undesired file systems aren't mounted and all your other file systems are mounted that you do want to keep listed in /etc/fstab, you could use "mount -p > /etc/fstab" to only include what's mounted at the time.
--
Jeff Traigle
A. Clay Stephenson
Acclaimed Contributor

Re: Creating fstab

A few flavors of UNIX/Linux have a script called "rebuildfstab" (or something close to that) but HP-UX ain't one of them. It wouldn't be too difficult to write something that parsed /etc/mnttab and that would get you very close but it's so simple to keep an edited version of fstab as part of your Ignite image that that would seem to be the approach to take. I always have scripts that record and store all that kind of data before Ignite is run so that I can fix anything that Ignite might have missed.
If it ain't broke, I can fix that.
Darrell Tschakert
Regular Advisor

Re: Creating fstab

Thanks for the replies.
It appears that it would be best to simply keep an edited version in /etc. We recently had a company perform a disaster recovery for us using my documentation and scirpts. The fstab was something that they wrote me up on. Someone at the company said that they ran ???$$$### command to build a new fstab, but I forgot what they said. They must have said "mount -p > /etc/fstab" as in one of your suggestions.
Thanks,

Darrell T.
I'll add a quote when I think of one.