It’s remarkably
simply to destroy a vFiler and then bring it back from the dead 100% complete.
Here’s a way to do it!
Before destroying it, get and keep the ‘vfiler status -a’, so you know which
interface(s) it’s IP address(es) are on:
vfiler
status -a
Then stop and destroy the vFiler (using a vFiler called VFILER2 for this post):
vfiler
stop VFILER2
vfiler
destroy VFILER2
Then, to resurrect the vFiler, just run ‘vfiler create VFILERNAME -r PATH_TO_ETC’
(which is obtained from the ‘vfiler
status -a’ output - in this example, the vFiler’s root is in a qtree in the
vFiler0's vol0):
vfiler create VFILER2
-r /vol/vol0/VFILER2
When you re-run setup on the resurrected vFiler (which
needs to be done to make it functional), the existing exports, hosts,
hosts.equiv, nsswitch.conf, and resolv.conf get rewritten (kept with .bak on
the end.) The below method uses ndmpcopy to simply copy the existing root and
then restore the config files from it later on after ‘setup’
is run.
qtree
create /vol/vol0/VFILER2-B
ndmpd on
ndmpcopy
/vol/vol0/VFILER2/etc /vol/vol0/VFILER2-B/etc
vfiler
run VFILER2 setup
priv set
advanced
rm /vol/vol0/VFILER2/etc/exports
mv /vol/vol0/VFILER2-B/etc/exports /vol/vol0/VFILER2/etc/exports
rm /vol/vol0/VFILER2/etc/hosts
mv /vol/vol0/VFILER2-B/etc/hosts /vol/vol0/VFILER2/etc/hosts
rm /vol/vol0/VFILER2/etc/hosts.equiv
mv /vol/vol0/VFILER2-B/etc/hosts.equiv /vol/vol0/VFILER2/etc/hosts
rm /vol/vol0/VFILER2/etc/nsswitch.conf
mv /vol/vol0/VFILER2-B/etc/nsswitch.conf
/vol/vol0/VFILER2/etc/nsswitch.conf
rm /vol/vol0/VFILER2/etc/resolv.conf
mv /vol/vol0/VFILER2-B/etc/resolv.conf
/vol/vol0/VFILER2/etc/resolv.conf
vfiler
status -a
THE END
SEO: Rebuilding a vFiler
... recreating a vFiler ... reloading a vFiler...
Comments
Post a Comment