Monday, September 19, 2005

Set default automount time to 30 mins

automount -t 1800
* in sec

Default automount time is

600 seconds (10 mins)

-nobrowse option in /etc/auto_master

disallows viewing potential mount points

auto_direct and NIS

Unlike local files, NIS allows only one entry
/- auto_direct
If transferring from local files to NIS, need to amalgamate all auto_direct files in one

+auto_master tells automountd

To read maps from NIS, NIS+, LDAP before reading local files

automountd to take maps from LDAP?

/etc/nsswitch.conf :
automount: ldap

List autofs info

automount -v

Share all NFS shares

shareall
* as listed in /etc/dfs/dfstab

Unshare all NFS shares

unshareall
* as listed in /etc/dfs/sharetab

Sunday, September 18, 2005

"stale NFS file handle" error

file on server was moved

"program not registered" error

NFS server not running mountd

"service not responding" error

NFS server's daemons not running

NFS client hangs at reboot error

foreground NFS mount (vfstab) from a non-responding server

"server not responding" error (2 reasons)

1) network prob.
2) NFS server is down

"rpcbind failure" error (2 reasons)

1) /etc/inet/hosts mistake
2) NFS server overloaded

Enable nfslog in /etc/dfs/dfstab

-o log=tag
* tag is either global if left empty or custom from /etc/nfs/nfslog.conf

Diff log files for diff NFS shares?

/etc/nfs/nfslog.conf for "public" share:
public /var/nfs/public
* share with -o log=public

When mounting NFS at boot in vfstab

bg,soft
* default is fg,hard but with intr (allows keyboard interrupt)

mountall command

mounts everything in /etc/vfstab with "mount at boot" set to "yes"

The only two NFS client daemons

statd
lockd

helium NFS shares used by clients?

dfmounts helium

Allow NFS ro to "home" network

-o ro=@home
* /etc/inet/networks must have home entry

The best way to allow NFS root

-o root=blade
* anon=0 unknown users get EUID of 0 (security prob.)
* anon=-1 access denied to unknown

share command may be used when

nfsd and mountd are started

Start NFS server with init.d

/etc/init.d/nfs.server start

List clients accessing your NFS shares

cat /etc/rmtab

Saturday, September 17, 2005

Two nfslogd config files

/etc/default/nfslogd
/etc/nfs/nfslog.conf

Instead of core files in dirs, store centralized (2)

coreadm -e global -g /var/core/core.%f.%p
coreadm -d process

Turn on logging for global cores

coreadm -e log

kill and generate core

kill -8 PID

Create crash dump (3 steps)

dumpadm -d /dev/dsk/c0t0d0s3
sync
savecore -L

PID of the current shell

echo $$

List core files' settings

coreadm

Core files' config file

/etc/coreadm.conf

Are setuid core files generated by default?

no - security risk because readable by owner of the process (regular user) and may contain sensitive information

dumpadm config file

/etc/dumpadm.conf

To specify minimum file system size for crash dump

dumpadm -m
* minfree

Display hostname

uname -n

Default crashdump dir

/var/crash/`uname -n`

Create a 20 Mbytes file

mkfile 20m file1

View swap usage

swap -s

Display the size of a memory page

pagesize
* bytes

Solaris needs physical swap less

because part of RAM is reserved for virtual swap (swapfs)

If no additional slice is available for swap

use swap file

Default slice for swap

1