Popular Posts

Showing posts with label nfs. Show all posts
Showing posts with label nfs. Show all posts

Dec 6, 2018

NFS Entries Not Mounting On Boot In Solaris 10 or Solaris 11

NFS Entries Not Mounting On Boot In Solaris 10 or Solaris 11

APPLIES TO :   Solaris 10 Version 10 3/05 and later or Solaris 11


SYMPTOMS  :   NFS file system that will mount at boot (that /etc/vfstab field is "yes") results in failure to even attempt to mount the configured NFS filesystem upon boot.


CAUSE  :   Solaris 10 11/06 release introduced the "Secure by Default" profile.  One of the services that was disabled by default was svc:/network/nfs/client:default.
Without nfs/client:default enabled, along with all its required dependencies, /etc/vfstab entries for NFS will not be mounted at boot time.


SOLUTION  :

1.           Use the recursive "-r" option to svcadm(1M) to ensure all required dependencies to nfs/client are also started:
                          # svcadm enable -r svc:/network/nfs/client:default

2.           Ensure nfs/client is running normally and all "required" dependencies are met prior to reboot:
                          # svcs -l nfs/client

3.           Reboot the system and check /etc/mnttab or "df -h" output to confirm.


NOTE: this is specific to a particular zone - nfs/client must be enabled in non-global zone NFS clients as well as the global zone.  Each zone is effectively an independent NFS client. 



~Judi~

NFS not mounting in Solaris 10
NFS not mounting in Solaris 11
NFS not mounting at boot 
NFS mount point not mounting at boot 
nfs mounts not mounting on reboot
mount NFS at reboot
mount nfs after boot
vfstab not mounting at boot
nfs mount fails on boot
nfs mount missing after reboot
nfs entries in /etc/fstab not mounting on boot

Jan 31, 2018

File system utilization report in mail


File system utilization report in mail

Issue :
Very often file systems are filled with application logs and other data,This space filling makes the server to panic for the servers which do not have proper monitoring in place.

Goal :
Deploy a  script to monitor the file systems usage with a defined threshold and to notify the support team and application team to clear the space.

Solution :
A script has been created to monitor the File System usage with a threshold of 85%, This script will run in cron every 30 minutes and send a mail to mentioned mail ID's if any of the File System is more than 85%

#!/bin/ksh
#disk_usage.sh - Monitor the disk usage and alert the support/applicaiton team
################################
#       Begin               
#       Author : Roselin John
#       Version 0.1
# -
# -
# -
# -
# -
################################

HOST=`uname -n`
> /root/scripts/disk_log
> /root/scripts/disk_log.txt
df -k | sed '1d' | awk '{ if ($5> 85) {print "Filesystem", $6, "on Server '$HOST' is", $5, "used, Please clear space"}}' > /root/scripts/disk_log
if [ -s /root/root_scripts/disk_log ] ; then
unix2dos /root/root_scripts/disk_log /root/scripts/disk_log.txt
mailx -s "Disk Monitor Alert" judi@gmail.com < /root/scripts/disk_log.txt
fi


Update the below entry in cron
30 * * * * /root/scripts/disk_usage.sh 2>&1

File System Monitoring
File System Monitoring script
Monitor File system changes
filesystem usage

Dec 13, 2016

NFS share in solaris

NFS share in Solaris 10


Share NFS directory in solaris

1.   Edit /etc/dfs/dfstab and update the entry
          share -F nfs -o ro -d "NetBackUP Logs" /nbulogs

2.   Issue this command to share the nfs
          shareall

3.   View the shares
          showmount -e 0
          showmount -e localhost
          showmount -e judi-dev-01

4.   Currently exported NFS filesystems are listed in the /etc/dfs/sharetab
          cat /etc/dfs/sharetab


NFS share zfs in solaris 11



1.   NFS share in Solaris 10 ZFS
          zfs set sharenfs='rw=judi-dev-01:judi-dev-02' testpool/datadir

2.   NFS share in Solaris 11 ZFS
          zfs set sharenfs=on testpool/datadir

          zfs set share=name=datashare,path=/datadir,prot=nfs,root=@judi-dev-01:@judi-dev-02,rw=@judi-dev-01:@judi-dev-02 testpool/datadir    OR
          zfs set share=name=oracledata,path=/datadir,prot=nfs,r,sec=sys,rw=*,root=*,anon=root pool/tempfs

3.   To un-share the file system we shared :
          zfs unshare testpool/datadir

4.   To get details about the nfs share and its properties
          zfs get share testpool/datadir
          zfs get sharenfs testpool/datadir
          cat /etc/dfs/sharetab

5.   Mount with options
          mount -F nfs -o proto=tcp,vers=3,rw,bg,soft,rsize=32768,wsize=32768,timeo=600 judi-dev-01:/temp_DB_migration /temp_DB_space

          For error :ORA-27054: NFS file system where the file is created or resides is not mounted with correct options - Mount with below option
          mount -o rw,timeo=600,hard,wsize=32768,vers=3,rsize=32768,proto=tcp judi-dev-01:/vol/vol_db_migration_002/migration /temp_DB_space

RMAN Mount point option for Solaris :

          mount -o rw,bg,hard,nointr,rsize=1048576,wsize=1048576,vers=3,proto=tcp,forcedirectio judi-dev-01:/vol/vol_db_migration_002/migration /temp_DB_space





Oct 6, 2016

nfs share using zfs and mounts options

nfs share using zfs and mounts options




1. Create a zfs volume and mount as /data_stuff
zfs create -o mountpoint=/data_stuff rpool/data_stuff

2. set quota for 20GB - This volume has restricted to 20GB not more than that
zfs set quota=20G rpool/data_stuff

3. Reserved dedicated 20GB space in rpool for the zfs data_stuff, other volumes cannot use this space
zfs set refquota=20G rpool/data_stuff

3. Share the zfs as nfs
zfs set sharenfs=on rpool/data_stuff

4. Set nfs permisssion for the zfs
zfs set share=name=some_description,path=/data_stuff,prot=nfs,anon=0,sec=sys, \
rw=@192.168.0.1:@192.168.0.2,root=@192.168.0.2:@192.168.0.2 rpool/data_stuff

5. View the config updated automatically in /etc/dfs/sharetab
/data_stuff  some_description   nfs     anon=0,sec=sys,rw=@192.168.0.1:@192.168.0.2,root=@192.168.0.2:@192.168.0.2

6. Entry in vfstab to mount a nfs share
judi-test-01:/vol/Oracle_migration/Oracle      -             /Oracle_migration          nfs       -        yes       -


~Judi~

~
nfs in zfs
nfs share in zfs
nfs - Sharing and Unsharing ZFS File Systems
How to share ZFS as NFS in solaris 11
Creating a ZFS network share over NFS
zfs performance
zpool
zfs share
zfs set sharenfs
zfs share nfs
~

Popular Posts