Friday, May 02, 2014

Recreating accidentally deleted vfstab in Solaris

So you have accidentally deleted vfstab in Solaris? You should look into /etc/mnttab:
/dev/dsk/c1t0d0s0 / ufs rw,intr,largefiles,logging,xattr,onerror=panic,dev=7c0000 1398979846
/devices /devices devfs dev=4780000 1398979837
ctfs /system/contract ctfs dev=47c0001 1398979837
proc /proc proc dev=4800000 1398979837
mnttab /etc/mnttab mntfs dev=4840001 1398979837
swap /etc/svc/volatile tmpfs xattr,dev=4880001 1398979837
objfs /system/object objfs dev=48c0001 1398979837
sharefs /etc/dfs/sharetab sharefs dev=4900001 1398979837
/dev/dsk/c1t0d0s5 /usr ufs rw,intr,largefiles,logging,xattr,onerror=panic,dev=7c0005 1398979846
/usr/lib/libc/libc_hwcap2.so.1 /lib/libc.so.1 lofs dev=7c0005 1398979846
fd /dev/fd fd rw,dev=4a80001 1398979846
/dev/dsk/c1t0d0s1 /var ufs rw,intr,largefiles,logging,xattr,onerror=panic,dev=7c0001 1398979848
swap /tmp tmpfs xattr,dev=4880002 1398979848
swap /var/run tmpfs xattr,dev=4880003 1398979848
/dev/dsk/c1t0d0s4 /opt ufs rw,intr,largefiles,logging,xattr,onerror=panic,dev=7c0004 1398979849
/dev/dsk/c1t0d0s7 /swap ufs rw,intr,largefiles,logging,xattr,onerror=panic,dev=7c0007 1398979849
/dev/dsk/c1t0d0s3 /overlap ufs rw,intr,largefiles,logging,xattr,onerror=panic,dev=7c0003 1398979849
/dev/dsk/c1t0d0s6 /export/home ufs rw,intr,largefiles,logging,xattr,onerror=panic,dev=7c0006 1398979849
-hosts /net autofs nosuid,indirect,ignore,nobrowse,dev=4b40001 1398979852
auto_home /home autofs indirect,ignore,nobrowse,dev=4b40002 1398979852
genevastg:vold(pid550) /vol nfs ignore,noquota,dev=4b00001 1398979853
view raw gistfile1.txt hosted with ❤ by GitHub
You can recreate /etc/vfstab out of it but you will need some understanding of the different fields. Or you can always look at a similar machine for guidance. For the above in /etc/vfstab we will end up with:
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no -
/dev/dsk/c1t0d0s5 /dev/rdsk/c1t0d0s5 /usr ufs 1 no -
/dev/dsk/c1t0d0s1 /dev/rdsk/c1t0d0s1 /var ufs 1 no -
/dev/dsk/c1t0d0s6 /dev/rdsk/c1t0d0s6 /export/home ufs 2 yes -
/dev/dsk/c1t0d0s4 /dev/rdsk/c1t0d0s4 /opt ufs 2 yes -
/dev/dsk/c1t0d0s3 /dev/rdsk/c1t0d0s3 /overlap ufs 2 yes -
/dev/dsk/c1t0d0s7 /dev/rdsk/c1t0d0s7 /swap ufs 2 yes -
/devices - /devices devfs - no -
sharefs - /etc/dfs/sharetab sharefs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -
view raw gistfile1.txt hosted with ❤ by GitHub
Just run 'mount -a' to verify everything will mount correctly. Good luck!

No comments:

Followers