rami.info



Cloning A Drive Under Solaris

Posted in Solaris, Sysadmin by Rami on the May 15th, 2006

1. Find the device names of the source and destination drives:
format < /dev/null

2. run the following sh script:
SRC=c0t0d0
DEST=c0t1d0
MOUNTDIR=/clone
SLICES="s0 s1 s2 s3 s4"
mkdir ${MOUNTDIR}
prtvtoc /dev/rdsk/${SRC}s2 > /tmp/vtoc
fmthard -s /tmp/vtoc /dev/rdsk/${DEST}s2
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/${DEST}s2
# OR installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/${DEST}s0
for i in $SLICES; do
newfs /dev/dsk/${DEST}${i} < /dev/null
mount /dev/dsk/${DEST}${i} ${MOUNTDIR}
cd ${MOUNTDIR}
ufsdump 0f - /dev/dsk/${SRC}${i}| ufsrestore rf -
cd /
umount ${MOUNTDIR}
done
rmdir ${MOUNTDIR}
rm /tmp/vtoc

Updating Solaris 10

Posted in Solaris, Sysadmin by Rami on the May 15th, 2006

In order to update Solaris 10 with the latest OS updates the following is needed to be done:

1. Create a file /tmp/registration.properties with the following:
userName=sunusername
password=sunpassword
hostName=
subscriptionKey=
portalEnabled=false
proxyHostName=
proxyPort=
proxyUserName=
proxyPassword=

2. Run the following command:
sconadm register -a -r /tmp/registration.properties

3. To perform the update do the following:
smpatch update