Wednesday, May 7, 2008

Solaris SVM - SAN DISKs

Create new disk from SAN.

Edit the entry in /etc/lvm/md.tab
e.g.
myhostDS/d100 1 1 /dev/rdsk/c4t600508B40010887F0000B00000640000d0s0

Edit the metaset script in /etc/init.d. Name might be different.

If you can see fibre channels connected with cfgadm -al but there is no
disk in format output you may need to run following commands:

# devlinks
# disks

Just plain command, no switches or options. These build /dev links
again and disks-command makes new disks available for system.

run > cfgadm -al
then, use format to check SAN disk id.

root@myhost1 # metaset -s myDS -a -h myhost1
root@myhost1 # metaset -s myDS -a /dev/rdsk/c4t600508B40010887F0000B00005FB0000d0
root@myhost1 # ls /dev/md/myDS*
/dev/md/myDS
root@myhost1 # EDIT /etc/lvm/md.tab
# Add the line below;
myDS/d100 1 1 /dev/rdsk/c4t600508B40010887F0000B00002D20000d0s0

root@myhost1 # ADD the myDS in /etc/init.d/cp.metasets
root@myhost1 # metaset

Set name = myhost01DS, Set number = 1

Host Owner
myhost1 Yes

Drive Dbase

/dev/dsk/c4t600508B40010887F0000B00000640000d0 Yes

Set name = myhost02DS, Set number = 2

Host Owner
myhost1

Drive Dbase

/dev/dsk/c4t600508B40010887F0000B00002D20000d0 Yes

Set name = myDS, Set number = 3

Host Owner
myhost1 Yes

Drive Dbase

/dev/dsk/c4t600508B40010887F0000B00005FB0000d0 Yes
root@myhost1 # metainit -s myDS -a
myDS/d100: Concat/Stripe is setup
root@myhost1 # newfs /dev/md/myDS/rdsk/d100
newfs: construct a new file system /dev/md/myDS/rdsk/d100: (y/n)? y
Warning: 4096 sector(s) in last cylinder unallocated
/dev/md/myDS/rdsk/d100: 20922368 sectors in 3406 cylinders of 48 tracks, 128 sectors
10216.0MB in 213 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
19957152, 20055584, 20154016, 20252448, 20350880, 20449312, 20547744,
20646176, 20744608, 20843040
root@myhost1 # fsck /dev/md/myDS/rdsk/d100
** /dev/md/myDS/rdsk/d100
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3a - Check Connectivity
** Phase 3b - Verify Shadows/ACLs
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cylinder Groups
2 files, 9 used, 10302683 free (11 frags, 1287834 blocks, 0.0% fragmentation)
root@myhost1 # mount /dev/md/myDS/dsk/d100 /opt/global
root@myhost1 # df -h
Filesystem size used avail capacity Mounted on
..
/dev/md/dsk/d4 3.9G 4.0M 3.9G 1% /opt/zoneshare
/dev/md/dsk/d5 29G 898M 28G 4% /export/home
/dev/md/cwppv01DS/dsk/d100
9.8G 658M 9.1G 7% /opt/cwppv01
/dev/md/myDS/dsk/d100
9.8G 10.0M 9.7G 1% /opt/cwppv03

No comments: