Mandalika's scratchpad | [ Work blog @Oracle | My Music Compositions ] |
Old Posts: 09.04 10.04 11.04 12.04 01.05 02.05 03.05 04.05 05.05 06.05 07.05 08.05 09.05 10.05 11.05 12.05 01.06 02.06 03.06 04.06 05.06 06.06 07.06 08.06 09.06 10.06 11.06 12.06 01.07 02.07 03.07 04.07 05.07 06.07 08.07 09.07 10.07 11.07 12.07 01.08 02.08 03.08 04.08 05.08 06.08 07.08 08.08 09.08 10.08 11.08 12.08 01.09 02.09 03.09 04.09 05.09 06.09 07.09 08.09 09.09 10.09 11.09 12.09 01.10 02.10 03.10 04.10 05.10 06.10 07.10 08.10 09.10 10.10 11.10 12.10 01.11 02.11 03.11 04.11 05.11 07.11 08.11 09.11 10.11 11.11 12.11 01.12 02.12 03.12 04.12 05.12 06.12 07.12 08.12 09.12 10.12 11.12 12.12 01.13 02.13 03.13 04.13 05.13 06.13 07.13 08.13 09.13 10.13 11.13 12.13 01.14 02.14 03.14 04.14 05.14 06.14 07.14 09.14 10.14 11.14 12.14 01.15 02.15 03.15 04.15 06.15 09.15 12.15 01.16 03.16 04.16 05.16 06.16 07.16 08.16 09.16 12.16 01.17 02.17 03.17 04.17 06.17 07.17 08.17 09.17 10.17 12.17 01.18 02.18 03.18 04.18 05.18 06.18 07.18 08.18 09.18 11.18 12.18 01.19 02.19 05.19 06.19 08.19 10.19 11.19 05.20 10.20 11.20 12.20 09.21 11.21 12.22
.. with plenty of examples and little comments aside.
[1] Check existing DNS client configuration
Solaris 11 and later:
% svccfg -s network/dns/client listprop config config application config/value_authorization astring solaris.smf.value.name-service.dns.client config/options astring "ndots:2 timeout:3 retrans:3 retry:1" config/search astring "sfbay.sun.com" "us.oracle.com" "oraclecorp.com" "oracle.com" "sun.com" config/nameserver net_address xxx.xx.xxx.xx xxx.xx.xxx.xx xxx.xx.xxx.xx
Solaris 10 and prior:
Check the contents of /etc/resolv.conf
% cat /etc/resolv.conf search sfbay.sun.com us.oracle.com oraclecorp.com oracle.com sun.com options ndots:2 timeout:3 retrans:3 retry:1 nameserver xxx.xx.xxx.xx nameserver xxx.xx.xxx.xx nameserver xxx.xx.xxx.xx
Note that /etc/resolv.conf
file exists on Solaris 11.x releases too as of today.
[2] Logical domains: finding out the hostname of control domain
Use virtinfo(1M)
command.
root@ppst58-cn1-app:~# virtinfo -a Domain role: LDoms guest I/O service root Domain name: n1d2 Domain UUID: 02ea1fbe-80f9-e0cf-ecd1-934cf9bbeffa Control domain: ppst58-01 Chassis serial#: AK00083297
The above output shows that n1d2 domain is a guest domain, which is also an I/O domain, the service domain and a root I/O domain. Control domain is running on host ppst58-01.
Output from control domain:
root@ppst58-01:~# ldm list NAME STATE FLAGS CONS VCPU MEMORY UTIL NORM UPTIME primary active -n-cv- UART 64 130304M 0.1% 0.1% 243d 2h n1d1 active -n---- 5001 448 916992M 0.2% 0.2% 3d 15h 26m n1d2 active -n--v- 5002 512 1T 0.0% 0.0% 3d 15h 29m root@ppst58-01:~# virtinfo -a Domain role: LDoms control I/O service root Domain name: primary Domain UUID: 19337210-285a-6ea4-df8f-9dc65714e3ea Control domain: ppst58-01 Chassis serial#: AK00083297
[3] Administering NFS configuration
Solaris 11 and later:
Use sharectl(1M)
command. Solaris 11.x releases include the sharectl
administrative tool to configure and manage file-sharing protocols such as NFS, SMB, autofs.
eg.,
Display all property values of NFS:
# sharectl get nfs servers=1024 lockd_listen_backlog=32 lockd_servers=1024 grace_period=90 server_versmin=2 server_versmax=4 client_versmin=2 client_versmax=4 server_delegation=on nfsmapid_domain= max_connections=-1 listen_backlog=32 .. .. # sharectl status autofs online client nfs disabled
eg.,
Modifying the nfs v4 grace period from the default 90s to 30s:
# sharectl get -p grace_period nfs grace_period=90 # sharectl set -p grace_period=30 nfs # sharectl get -p grace_period nfs grace_period=30
Solaris 10 and prior:
Edit /etc/default/nfs
file, and restart NFS related service(s).
[4] Examining ZFS Storage Pool command history
Solaris 10 8/07 and later releases log successful zfs
and zpool
commands that modify the underlying pool state. All those executed commands can be examined by running zpool history
command. Because this command shows the actual zfs commands executed as they are, the 'history' feature is really useful in troubleshooting an error scenario that was resulted from executing some zfs command.
# zpool list NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT rpool 416G 152G 264G 36% 1.00x ONLINE - zs3actact 848G 17.4G 831G 2% 1.00x ONLINE - # zpool history -l zs3actact History for 'zs3actact': 2014-03-19.22:02:32 zpool create -f zs3actact c0t600144F0AC6B9D2900005328B7570001d0 [user root on etc25-appadm05:global] 2014-03-19.22:03:12 zfs create zs3actact/iscsivol1 [user root on etc25-appadm05:global] 2014-03-19.22:03:33 zfs set recordsize=128k zs3actact/iscsivol1 [user root on etc25-appadm05:global]
Note that this log is enabled by default, and cannot be disabled.
[5] Modifying TCP/IP configuration parameters
Using ndd(1M)
is the old way of tuning TCP/IP parameters, and still supported as of today (in Solaris 11.x releases). However using padm(1M)
command is the recommended way to modify or retrieve TCP/IP Internet protocols on Solaris 11.x and later releases.
# ipadm show-prop -p max_buf tcp PROTO PROPERTY PERM CURRENT PERSISTENT DEFAULT POSSIBLE tcp max_buf rw 1048576 -- 1048576 128000-1073741824 # ipadm set-prop -p max_buf=2097152 tcp # ipadm show-prop -p max_buf tcp PROTO PROPERTY PERM CURRENT PERSISTENT DEFAULT POSSIBLE tcp max_buf rw 2097152 2097152 1048576 128000-1073741824
ndd style (still valid):
# ndd -get /dev/tcp tcp_max_buf 1048576 # ndd -set /dev/tcp tcp_max_buf 2097152 # ndd -get /dev/tcp tcp_max_buf 2097152
One of the advantages of using ipadm
over ndd
is that the configured/tuned non-default values are persistent across reboots. In case of ndd
, we have to re-apply those values either manually or by creating a Run Control script (/etc/rc*.d/S*
) to make sure that the intended values are set automatically during a reboot of the system.
[6] Writing to system log from a shell script
Use logger(1)
command as shown in the following example.
eg.,
# logger -p local0.warning Big Brother is watching you # dmesg | tail -1 Mar 30 18:42:14 etc27zadm01 root: [ID 702911 local0.warning] Big Brother is watching you
Check syslog.conf(4)
man page for the list of available system facilities and the severity of the condition being logged (levels).
BONUS:
[*] Forceful NFS unmount on Linux
Try the lazy unmount option (-l
) on systems running Linux kernel 2.4.11 or later to forcefully unmount a filesystem that keeps throwing Device or resource busy
and/or device is busy
error(s).
eg.,
# umount -f /bkp umount2: Device or resource busy umount: /bkp: device is busy umount2: Device or resource busy umount: /bkp: device is busy # umount -l /bkp #
Labels: dns ipadm linux nfs oracle sharectl solaris tcp/ip tips unmount zfs zpool
2004-2019 |