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.