Scripting /etc/fstab changes
Danda, Richard SFC
richard.danda at us.army.mil
Tue Dec 5 21:42:24 UTC 2006
Greetings all,
I have a NetApp FAS270 filer that I have migrated NFS data directories too.
I need to make changes to all my RHEL machines to point to the new device
for mounts. Is there an easy way to script the change?
Example:
Current /etc/fstab
hostA:/user/bin /user/bin nfs defaults 0 0
hostA:/user/lib /user/lib nfs defaults 0 0
hostA:/home/common/storage /home/common/storage nfs defaults 0 0
Need to change it to this:
hostB:/user/bin /user/bin nfs defaults 0 0
hostB:/user/lib /user/lib nfs defaults 0 0
hostB:/home/common/storage /home/common/storage nfs defaults 0 0
I believe you can use sed or awk, to do that????
Thanks for any assistance.
V/R
Richard J. Danda II
SFC, USA
BLCSE Network Manager/IASO
Maneuver Support Battle Lab
Fort Leonard Wood, MO
We trained very hard -- but it seemed that every time we were beginning to
form up into teams, we would be reorganized. I was to learn later in life we
tend to meet new situations by reorganizing, and a wonderful method it can
be for creating the illusion of progress while producing confusion,
inefficiency, and demoralization. Petronius Arbiter, 66 A.D.
More information about the redhat-list
mailing list