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