Thursday, May 7, 2009
Common Desktop Environment Help
# /usr/dt/bin/dtconfig -d
done
desktop auto-start disabled.
to kill login server,X server and entire soalris CDE Desktop
# /usr/dt/bin/dtconfig -kill
done
dtlogin kill complete.
Check if login manager is running
# ps -ef grep dtlogin
root 17621 16732 0 23:47:03 pts/8 0:00 grep dtlogin
To start the login server from command line
#/usr/dt/bin/dtlogin -daemon;exit
To enable the login server from starting automatically
# /usr/dt/bin/dtconfig -e
(This will add a S99dtlogin file to /etc/rc2.d directory
Thursday, January 1, 2009
Un-Mirrored root Volume
#metastat d0
this command will update /etc/vfstab and /etc/system file for root disk
#metaroot /dev/dsk/c0t0d0s0
#reboot
....
#metaclear -r d0
#metaclear d20
Creating Mirror for mounted usr volume
#metainit d22 1 1 c0t1d0s3
#metainit d2 -m d12
#reboot
after reboot you have to run following command
#metattach d2 d22
After created mirror disk for usr volume you need to edit the /etc/vfstab file entry
#vi /etc/vfstab
/dev/md/dsk/d2 /dev/md/rdsk/d2 /usr ufs 1 yes -
:wq!
Creating Mirror for mounted root volume
#metainit d2 1 1 c0t1d0s0
#metainit d0 -m d1
#metaroot d0 (this will update /etc/vfstab & /etc/system file)
#metaroot d0
#lockfs -fa
#reboot
after reboot you have to run following command
#metattach d0 d2
After created mirror disk for root volume you need to configure alternate boot path for this server.in case the first disk crashed the system will boot from second disk automatically.to find the physical path
#ls -l /dev/rdsk/c0t1d0s0
devices/sbus@1,f8000000/esp@1,200000/sd@3,0:a
goto OK prompt
create alias for second disk
ok: nvalias backup-root /sbus@1,f8000000/esp@1,200000/sd@3,0:a
ok:printenv boot-root
ok:setenv boot-device disk backup-root net
ok>nvstore
for manual boot
ok:boot backup_root
Wednesday, December 17, 2008
Managing Tape Devices in Solaris
mt command used to control the tape drive.
1. Dispaly the status of tape device
#mt -f /dev/rmt/1 status
Quantum Super DLT 320 tape drive:
sense key(0x6)= Unit Attention residual= 0 retries= 0 file no= 0 block no= 0
2. Rewinding the Tape
#mt -f /dev/rmt/1 rewind
3. Erase tape content
#mt -f /dev/rmt/1 erase
4. Forward tape to next appended backup
#mt -f /dev/rmt/1 fsf1
5. Backward tape to previous appended job
#mt -f /dev/rmt/1 bsf0
6. Eject the tape from tape drive
#mt -f /dev/rmt/1 offline
Tuesday, December 16, 2008
Configuring MIRROR volume using SVM
last month I configured mirror volume using Solaris volume manger.Find the steps how I did this mirror volume.
1. Copying VTOC of Disk1(c1t9d0s0) to Disk2(c1t10d0s0).Because the disk layout should be same between two hard disk while we mirrored.So I used fmthard command to copy VTOC to other Hard disk.
# prtvtoc /dev/dsk/c1t9d0s0 fmthard -s - /dev/rdsk/c1t10d0s0
fmthard: New volume table of contents now in place.
2. Creating Meta database on both Hard disk at slice 7
# metadb -a -f c1t9d0s7 c1t10d0s7
3. creating first sub mirror d1
# metainit -f d1 1 1 c1t9d0s0
d1: Concat/Stripe is setup
4. Creating Second sub mirror d11
# metainit -f d11 1 1 c1t10d0s0
d11: Concat/Stripe is setup
5. Creating Mirror volume d0 with first sub mirror d1
# metainit d0 -m d11
6. Attaching second sub mirror d11 with do
#metattach d0 d11
7. to Display Mirror volume d0 status
# metastat d0
d0: Mirror
Submirror 0: d1
State: Okay
Submirror 1: d11
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4194720 blocks (2.0 GB)
d1: Submirror of d0
State: Okay
Size: 4194720 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t9d0s0 0 No Okay Yes
d11: Submirror of d0
State: Okay
Size: 4194720 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t10d0s0 0 No Okay Yes
Device Relocation Information:
Device Reloc Device ID
c1t9d0 Yes id1,sd@SSEAGATE_ST15230W_SUN4.2G00701447
c1t10d0 Yes id1,sd@SSEAGATE_ST15230W_SUN4.2G00631837
8. After I created the mirror volume I created file system using newfs commandd
# newfs /dev/md/rdsk/d0
newfs: construct a new file system /dev/md/rdsk/d0: (y/n)? y
/dev/md/rdsk/d0: 4194720 sectors in 1942 cylinders of 16 tracks, 135 sect
ors
2048.2MB in 44 cyl groups (45 c/g, 47.46MB/g, 7936 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 97376, 194720, 292064, 389408, 486752, 584096, 681440, 778784, 876128,
3305120, 3402464, 3499808, 3597152, 3694496, 3791840, 3889184, 3986528,
4083872, 4181216
9. Mount the mirror volume to mount point /mirror
# mkdir /mirror
# mount /dev/md/dsk/d0 /mirror
# cd /mirror
# df -k .
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d0 2052991 2065 1989337 1% /mirror
# metastat -c d0
d0 m 2.0GB d1 d11
d1 s 2.0GB c1t9d0s0
d11 s 2.0GB c1t10d0s0
Configuring Hot Spare disk for Mirror volume.
HOT SPARE setup
# metainit hsp001 c1t11d0s0
hsp001: Hotspare pool is setup
# metaparam -h hsp001 d1
# metaparam -h hsp001 d11
# metastat d0
d0: Mirror
Submirror 0: d1
State: Okay
Submirror 1: d11
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4194720 blocks (2.0 GB)
d1: Submirror of d0
State: Okay
Hot spare pool: hsp001
Size: 4194720 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t9d0s0 0 No Okay Yes
d11: Submirror of d0
State: Okay
Hot spare pool: hsp001
Size: 4194720 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t10d0s0 0 No Okay Yes
Device Relocation Information:
Device Reloc Device ID
c1t9d0 Yes id1,sd@SSEAGATE_ST15230W_SUN4.2G00701447
c1t10d0 Yes id1,sd@SSEAGATE_ST15230W_SUN4.2G00631837
Open Solaris Root Login
Recently I`ve installed open solaris in my desktop PC.But I could not login as root user through Login screen.
I`ve removed type=role entry in /etc/user_attr file
After removed the the entry the line will be like this
root::::auths=solaris.*,solaris.grant;profiles=All;lock_after_retries=no;min_label=admin_low;clearance=admin_high
and then reboot the system. You can login as root again.