Skillnad mellan versioner av "Oracle-Solaris"
Js146669 (Diskussion | bidrag) (→Solaris IPS Publisher Package tool) |
Js146669 (Diskussion | bidrag) (→Solaris Kernel Params for Oracle Dbase) |
||
Rad 117: | Rad 117: | ||
-K "process.max-sem-nsems=(priv,2000,deny)" \ | -K "process.max-sem-nsems=(priv,2000,deny)" \ | ||
-K "process.max-file-descriptor=(basic,4096,deny)" oracledb | -K "process.max-file-descriptor=(basic,4096,deny)" oracledb | ||
+ | |||
+ | For example to set the stack size to 32768 kb use: | ||
+ | $ projmod -s -K "process.max-stack-size=(privileged,32MB,deny)” user.oracle | ||
+ | |||
+ | To set the file descriptors to 1024 use: | ||
+ | $ projmod -s -K "process.max-file-descriptor=(privileged,1024,deny)" user.oracle | ||
+ | |||
+ | Increase max shm memory to 8GB | ||
+ | $ projmod -K project.max-shm-memory="(priv,8192M,deny)” user.oracle | ||
Check a list of running processes and their assigned projects | Check a list of running processes and their assigned projects |
Nuvarande version från 29 september 2021 kl. 09.03
Innehåll
Disk Devices
Commands to display all disks on a system:
# cfgadm -s "select=type(disk)" # echo | format # format -e
Configure a disk to be used via iSCSI
# svcadm enable svc:/network/iscsi/initiator # iscsiadm modify initiator-node -A myclient # iscsiadm add discovery-address 10.211.55.200 # iscsiadm discovery -t enable # devfsadm -c iscsi
Replace a faulty disk c1t1d0 from ZFS pool testpool:
# zpool offline testpool c1t1d0 # cfgadm -c unconfigure c1::dsk/c1t1d0 # cfgadm -c configure c1::dsk/c1t1d0 # zpool replace testpool c1t1d0 # zpool online testpool c1t1d0
Mirror existing boot disk c3t0d0s0 with disk c3t2d0s0
# fdisk -B c3t2d0s0
Write the existing submirror disk vtoc to the replacement disk
# prvtoc /dev/rdsk/c3t0d0s0 | fmthard -s - /dev/rdsk/c3t2d0s0
Alternatively you can use the replaced disks vtoc from an
existing explorer data collector output, if installed. For an exact copy, don't forget to check that the replacement
disk has the same HW specs as the disk it replaces
On x86 systems:
# installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c3t2d0s0
On SPARC systems:
# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk/dev/rdsk/c3t2d0s0
Networking Manual Administration
Switch to manual network configuration:
# netadm enable –p ncp defaultfixed
Show physical network interfaces:
# dladm show-phys
Create interface with static IPv4 configuration:
# ipadm create-ip net0 # ipadm create-addr –T static –a local=10.9.8.7/24 net0/addr # ipadm show-addr
Create interface with DHCP configuration:
# ipadm create-ip net0 # ipadm create-addr –T dhcp net0/addr
Create interface with auto-generated IPv6 configuration:
# ipadm create-ip net0 # ipadm create-addr –T addrconf net0/addr
Configure default route:
# route –p add default 192.168.1.1
Activate DNS configuration:
# svccfg –s dns/client setprop config/nameserver = net_address: 192.168.1.1 # svccfg –s dns/client setprop config/domain = astring: “myhost.org” # svccfg –s name-service/switch setprop config/host = astring: \“files dns\” # svcadm refresh name-service/switch # svcadm refresh dns/client
Activate DNS configuration (alternate approach by editing /etc/resolv.conf and /etc/nsswitch.conf and then importing these modifications into SMF)
# nscfg import –f svc:/system/name-service/switch:default # nscfg import –f svc:/network/dns/client:default # svcadm refresh dns/client
Solaris Kernel Params for Oracle Dbase
Starting with Solaris 10, these kernel adjustments are now done through Project Resource Management.
- Adjustments done through the projects does not require a reboot anymore.
- All that is needed from the user associated to the project is to re-login for changes to take effect.
- This is an improvement, especially when multiple applications are running on the same server and CM/reboot restrictions apply.
Below is a table of kernel parameter definition and their equivalent in projects.
shmmax - indicates maximum allowable size of shared memory segment (default=1048576 (1mb) max=4294967295 (4gb)) shmmin - smallest size (bytes) of a shared memory segment (default=1 max=4294967295) shmmni - maximum shared memory segments in the system (default=100 max=2147483647) shmseg - maximum number of shared memory segments a user process can attach. Usually set equal to shmmni (default=6 max=32767 (32k)) semmns - the number of semaphores in the system (SID_A+SID_B)+(SID_C * 2)+(no. of instances * 10) where: SID_A,SID_B,SID_C = processes value per instance SID_C = has the largest value semmni - the number of semaphore set identifiers that can be created at any one time semmsl - maximum number of semaphores that can be in one semaphore set. Should be equal to or greater than the value of oracle processes.
Check the Resource Control value of a project
Example for Project user.root: $ prctl -n project.max-shm-memory -i project user.root
Temporarily set 2 GB max shared memory
$ prctl -n project.max-shm-memory -v 2gb -r -i project user.root $ prctl -n project.max-shm-memory -i project user.root
List existing value of process param of current session
$ prctl -n process.max-sem-nsems $$
Temporary set a new value of process param & verify the new settings
$ prctl -n process.max-sem-nsems -v 8192 -r -i process 9334 $ prctl -n process.max-sem-nsems 9334
Add a new project
$ projadd -p 200 -c "Oracle Database Project" \ -K "project.max-shm-memory=(priv,4294967296,deny)" \ -K "process.max-sem-nsems=(priv,1024,deny)" \ -K "process.max-file-descriptor=(basic,4096,deny)" oracledb where: -p | assigned project id (is optional) -U | list of member users -G | list of member group -c | comment -K | key values
Verify changes added in /etc/project
To modify existing project use projmod.
$ projmod -s -K "project.max-shm-memory=(priv,4gb,deny)" \ -K "process.max-sem-nsems=(priv,2000,deny)" \ -K "process.max-file-descriptor=(basic,4096,deny)" oracledb
For example to set the stack size to 32768 kb use:
$ projmod -s -K "process.max-stack-size=(privileged,32MB,deny)” user.oracle
To set the file descriptors to 1024 use:
$ projmod -s -K "process.max-file-descriptor=(privileged,1024,deny)" user.oracle
Increase max shm memory to 8GB
$ projmod -K project.max-shm-memory="(priv,8192M,deny)” user.oracle
Check a list of running processes and their assigned projects
$ prstat -J
Solaris IPS Publisher Package tool
Display available versions
$ pkg list -af entire
Use the following command to check for a specific Solaris 11 package:
$ pkg info <package name>
Dry-run update
$ pkg update -nv entire@11.4-11.4.8.0.1.5.0 '*'
Be sure to use the -nv options and check the output before performing the actual update.
When you perform the actual update, use the --be-name option to give the new BE a meaningful name.
Update the pkg
$ pkg update --be-name 20200528 entire@11.4-11.4.8.0.1.5.0 ‘*'