Validate mountpoints on solaris server after server reboot


 
Thread Tools Search this Thread
Operating Systems Solaris Validate mountpoints on solaris server after server reboot
# 1  
Old 09-04-2014
Validate mountpoints on solaris server after server reboot

Hi,
anyone please let us know how to write shell script to find the missing mountpoints after server reboot.
i want to take the mountpount information before server reboot, and validate the mountpoints after server reboot if any missing.please let us know the shell script from begining to end as i don't have knowledge on scripting.
Thanks,
Venkat


Moderator's Comments:
Mod Comment Please make sure you post in the right forum

Last edited by Scrutinizer; 09-04-2014 at 11:50 AM..
# 2  
Old 09-04-2014
Hi VenkatReddy786,

Welcome to forum, please use code tags for any commands or codes. you can go through once with all forum rules. Also let me give you some basic ideas here for same and please try it by yourself and let us know if you face any issues with what you would have tried so far.

i- you can make a script for checking mount points by using df command check them before and after activity and compare them after activity they should be same as before activity.

ii- To ake a permanent solution, you can check fstab file in /etc/fstab in case of bash, make sure here mount points are not soft. Meaning if they are mentoned as soft mount points they will not come up after reboot. This should be permanent fix for the issue.

EDIT: In case of solaris it should be /etc/vfstab.

kindly try out the steps and let us know if you face any issues.


Thanks,
R. Singh

Last edited by RavinderSingh13; 09-04-2014 at 11:59 AM.. Reason: added a solution line
# 3  
Old 09-04-2014
Hi Venkst & Ravinder,

Please note that on Solaris there is not an
Code:
/etc/fstab

It is in fact;
Code:
/etc/vfstab
root@ekbvsollic01:~# cat /etc/vfstab
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
/devices        -               /devices        devfs   -       no      -
/proc           -               /proc           proc    -       no      -
ctfs            -               /system/contract ctfs   -       no      -
objfs           -               /system/object  objfs   -       no      -
sharefs         -               /etc/dfs/sharetab       sharefs -       no      -
fd              -               /dev/fd         fd      -       no      -
swap            -               /tmp            tmpfs   -       yes     -

/dev/zvol/dsk/rpool/swap        -               -               swap    -       no      -

You can glean a great deal of additional information from the mount tab.
Code:
root@ekbvsollic01:~# cat /etc/mnttab
rpool/ROOT/solaris      /       zfs     dev=4490002     0
/devices        /devices        devfs   dev=8540000     1405604525
/dev    /dev    dev     dev=8580000     1405604525
ctfs    /system/contract        ctfs    dev=8640001     1405604525
proc    /proc   proc    dev=85c0000     1405604525
mnttab  /etc/mnttab     mntfs   dev=8680001     1405604525
swap    /system/volatile        tmpfs   xattr,dev=86c0001       1405604525
objfs   /system/object  objfs   dev=8700001     1405604525
sharefs /etc/dfs/sharetab       sharefs dev=8740001     1405604525
/usr/lib/libc/libc_hwcap1.so.1  /lib/libc.so.1  lofs    dev=4490002     1405604533
fd      /dev/fd fd      rw,dev=8840001  1405604535
rpool/ROOT/solaris/var  /var    zfs     rw,devices,setuid,nonbmand,exec,rstchown,xattr,atime,dev=4490003        1405604535
swap    /tmp    tmpfs   xattr,dev=86c0002       1405604535
rpool/VARSHARE  /var/share      zfs     rw,devices,setuid,nonbmand,exec,rstchown,xattr,atime,dev=4490004        1405604536
rpool/data      /data/dataarch  zfs     rw,devices,setuid,nonbmand,exec,rstchown,xattr,atime,dev=4490005        1405604541
rpool/export    /export zfs     rw,devices,setuid,nonbmand,exec,rstchown,xattr,atime,dev=4490006        1405604541
rpool/export/home       /export/home    zfs     rw,devices,setuid,nonbmand,exec,rstchown,xattr,atime,dev=4490007        1405604541
rpool   /rpool  zfs     rw,devices,setuid,nonbmand,exec,rstchown,xattr,atime,dev=4490008        1405604541
rpool/space     /space  zfs     rw,devices,setuid,nonbmand,exec,rstchown,xattr,atime,dev=4490009        1405604541
-hosts  /net    autofs  nosuid,indirect,ignore,nobrowse,dev=8900001     1405604546
auto_home       /home   autofs  indirect,ignore,nobrowse,dev=8900002    1405604546
-fedfs  /nfs4   autofs  ro,nosuid,indirect,ignore,nobrowse,dev=8900003  1405604546
/dev/dsk/c7t0d0s2       /media/SOL_10_113_X86   hsfs    ro,nosuid,noglobal,maplcase,rr,traildot,dev=3380042     1405604546

Regards

Dave

Last edited by gull04; 09-04-2014 at 12:09 PM.. Reason: Additional Information
# 4  
Old 09-04-2014
Hi Ravinder Singh
Thanks for prompt responce. I know how to check manually with df command, but i want to validate with shell scripting. I am at basic level. Coould you please help on how to write shell script for this.
# 5  
Old 09-04-2014
Quote:
Hi Venkst & Ravinder,

Please note that on Solaris there is not an

Code:
/etc/fstab

It is in fact;

Code:
/etc/vfstab

Regards

Dave
Hello Dave,

I had immediately edited the same in my post.

Thanks,
R. Singh
# 6  
Old 09-04-2014
Hi Guys,

Check the post again as I have subsequently updated with more information.

Dave
# 7  
Old 09-04-2014
Hi Dave,Ravinder Singh,

I want to place the shell script on server to validate the mountpoints.i want shell script for this.It would be more helpfull if you guys provide the script.

Thanks,
Venkat
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

Server reboot

Hi, The server got rebooted and below messages can be seen in /var/log/messages Sep 7 10:49:12 minersville kernel: Call Trace: <IRQ> <ffffffff80167420>{__alloc_pages+796} Sep 7 10:49:12 minersville kernel: <ffffffff80182814>{kmem_getpages+106} <ffffffff80183c16>{fallback_alloc+304}... (3 Replies)
Discussion started by: admin_db
3 Replies

2. Linux

Linux server reboot

We reboot our linux servers daily. Is it needed ? (10 Replies)
Discussion started by: linuxadmin
10 Replies

3. Solaris

Reboot the server through console

Hi All, I want to know the procedure like if server is down, i want to reboot the server through console ($rsc or $sc prompt).Could you please help me out. I would really appreciate your cooperation. thanks for understanding regards krishna (5 Replies)
Discussion started by: murthy76
5 Replies

4. UNIX for Dummies Questions & Answers

copying directories from NT server to Unix server (solaris 5.8)

I need to copy around 30 directories (each directory include one or more text file(s)) from NT server to Unix server at one go. For doing this what are the privillages i should have in both NT and Unix server. Please let me know which command i can use in shell prompt. TIA. (4 Replies)
Discussion started by: jhmr7
4 Replies

5. Solaris

Do I need to reboot Solaris 10 server for changes in /etc/systems ?

Hi, I have upgraded my Solaris 10 2005 to Solaris 10 2007. I am facing one bug, id: 6550904. To override this issue I have done following changes in /etc/systems: set max_uheap_lpsize = 0x2000 set max_ustack_lpsize = 0x2000 set max_privmap_lpsize = 0x2000 set max_shm_lpsize =... (6 Replies)
Discussion started by: neel.gurjar
6 Replies

6. AIX

IP setting changes after server reboot

I've recently changed my gateway setting using SMIT. Everything went fine except that the gateway setting kept reverting back to the old one everytime I reboot the server. I'm on AIX 5.2 running p-Series. Thanks for any info. (3 Replies)
Discussion started by: dereklow
3 Replies

7. Shell Programming and Scripting

how to remotely administer/validate UNIX server via Windows machine?

Hi there--I think this is more of a Windows question, but I think many of you might be able to help me out: I have a UNIX web server and a Windows machine. I'm trying to script the following tasks so that they can be run from the Windows machine (via a batch file): 1. Shutdown web services... (5 Replies)
Discussion started by: sohungry73
5 Replies

8. UNIX for Advanced & Expert Users

server reboot

hi all, :) for a reboot of sun box for patch installation i would like to know where do the reboot logs apart from /var/adm/messages and patch run messages would be available, i would like to know the sequence of messages logged in the file like requesting the users to log out sending a... (1 Reply)
Discussion started by: matrixmadhan
1 Replies

9. Shell Programming and Scripting

Server Reboot Alert

I want to get an email alert from a cronjob when a server got rebooted unexpectedly. Please help. Thanks! :confused: (2 Replies)
Discussion started by: angloi
2 Replies
Login or Register to Ask a Question