1827286 Members
1581 Online
109717 Solutions
New Discussion

editing /etc/fstab

 
Joseph Hoh
Frequent Advisor

editing /etc/fstab

Does anyone have a good way/script to modify the /etc/fstab file other than sam or manualy editing the file.
7 REPLIES 7
Alan Riggs
Honored Contributor

Re: editing /etc/fstab

I always manually edit. I never use SAM for lvm operations.
Rick Garland
Honored Contributor

Re: editing /etc/fstab

SAM and manual edit are the tools typically used.

Unless you have a really BIG fstab file, the editing should not be an issue. Do copy the file as a backup before doing the editing.
Cheryl Griffin
Honored Contributor

Re: editing /etc/fstab

I never use SAM, just vi it from command line. Using SAM involves too much overhead (time to load SAM, navigate menus). I can vi it in less time and get on with other things.
"Downtime is a Crime."
John Palmer
Honored Contributor

Re: editing /etc/fstab

Hi Jeff,

I too never use SAM for LVM, I always manually edit the file.

Regards,
John
James R. Ferguson
Acclaimed Contributor

Re: editing /etc/fstab

Jeff:

There's nothing wrong with editing /etc/fstab as long as you are careful. SAM is the "long-way-around" as other posts indicate. There are times when you want to comment (#) out one entry and add another, for instance when moving data between logical volumes and/or changing the names of mount points. SAM can't do this. Every entry SAM adds, changes or deletes in /etc/fstab is a valid one; not a "commented-out" one for reference and later reinstatelment.

...JRF...
Rita C Workman
Honored Contributor

Re: editing /etc/fstab

I agree with everyone. The quickest and easiest way is simply to vi and edit the file (carefully)... and save it.

It would take more time to try and write a script for what is usually nothing more than modifying or adding a couple lines.

Just my $.02
CHRIS_ANORUO
Honored Contributor

Re: editing /etc/fstab

Please make another copy before editing the file and have that copy saved on another system where you can ftp it from in case you run into a problem.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.