import OVM Repository from another server

if you replicated a LUN containing a repository you need to import it

– fsck the volume
fsck.ocfs2 /dev/mapper/xxxxxxxxxxxxxxxxxxxxx <—-find the correct one if you have other iSCSI luns connected

– Update the cluster id:
tunefs.ocfs2 –update-cluster-stack /dev/mapper/xxxxxxxxxxxxxxxxxxxxxxxxx

– Mount the file system into a temporay mount point. (Perhaps mounting to the final uuid works, but I prefer umount later on and let OVM manager do the job)

mkdir /OVS/Repositories/temp
mount /dev/mapper/xxxxxxxxxxxxx /OVS/Repositories/temp

– Change OVS_REPO_MGR_UUID in .ovsrepo to the correct uuid (i picked up the one from the already presented repository. I don’t know yet where this uuid can be taken from if you have no other repository)
(check that OVS_REPO_UUID has no duplicate)

– umount /OVS/Repositories/temp

– Form the manager, refresh the shared file system, Present the Repository to servers ans refresh that Repository.

Quick Solaris expect script to change password

#!/bin/bash
cat dbausers | while read u;do
cat << EOF > /tmp/chpw_${u}.exp
#!/usr/bin/expect -f
set force_conservative 0
if {\$force_conservative} {
set send_slow {1 .1}
proc send {ignore arg} {
sleep .1
exp_send -s — $arg
}
}
set timeout -1
spawn passwd $u
match_max 100000
expect -exact “New Password: ”
send — “Sssspwd@1234\r”
expect -exact “\r
Re-enter new Password: ”
send — “Sssspwd@1234\r”
expect eof
EOF
chmod 755 /tmp/chpw_${u}.exp
/tmp/chpw_${u}.exp
done

Solaris 11 unshare ZFS NFS share

Remove the share by identifying the share-name name. For example:

# zfs set -c share=name=data rpool/data
share 'data' was removed.

Remove the share by identifying the share-path name. For example:

# zfs set -c share=path=/data rpool/data
share 'data' was removed.

Disable IPV6 in Solaris 11

it is not recommended to do so, but this is how i did it

# ipadm show-addr
#ipadm delete-addr vnic3/v6
#ipadm show-addr
#ipadm delete-addr lo0/v6
#ipadm show-addr
#svcadm disable svc:/network/routing/legacy-routing:ipv6
#svcadm disable svc:/network/dhcp/server:ipv6
#svcadm disable svc:/network/dhcp/relay:ipv6

Solaris 11 PF firewall

The configuration file is kept in /etc/firewall/pf.conf

search sylvamo.com
nameserver 10.177.0.13
nameserver 10.176.0.4

ipadm create-ip vnic28
ipadm create-addr -T static -a local=10.181.20.87/24 vnic28/v4
route -p add default 10.181.20.1

> /etc/firewall/pf.conf
vi /etc/firewall/pf.conf
svcadm enable firewall
svcs -x firewall

block out all
block in all
pass in from 10.177.0.0/24 #----vdi
pass in from  10.181.20.0/24  #----- local colo
pass out to 10.181.20.0/24 #----- local colo
#----- all below are AD DC
pass out to 10.177.0.13
pass out to 10.140.164.157
pass out to 10.177.0.13
pass out to 10.176.0.5
pass out to 10.179.0.12
pass out to 10.140.168.137
pass out to 10.179.0.11
pass out to 10.140.12.73
pass out to 10.178.0.5
pass out to 10.177.0.14
pass out to 10.178.0.4
pass out to 10.21.34.11
pass out to 10.21.155.11
pass out to 10.20.90.10
pass out to 10.21.155.10
pass out to 10.176.0.4
pass out to 10.140.64.39
pass out to 10.140.76.71
pass out to 10.21.34.10

Solaris 11 project definition

projects are defined per user, they are defined in /etc/user_attr and /etc/project

/etc/project
DAA_ADM:220:DAA System Administrator:daaadm::process.max-sem-nsems=(priv,2048,deny);project.max-sem-ids=(priv,1024,deny);project.max-shm-ids=(priv,1024,deny);project.max-shm-memory=(priv,18446744073709551615,deny);process.max-file-descriptor=(basic,65536,deny);

/etc/user_attr

:daaadm::::project=DAA_ADM