Creating Volumes
Finding/setting nvalias (nvram) OBP settings from a running Solaris O/S
SVM Setup at Solaris 9
------------------------
Situation:
- No any SVM state db exist
- Total new SVM
- Solaris 9
- State db created at c1t0d0s7, size ~94MB
Tasks:
- create state db
- Mirror / and /var
----------------------------------------------------
Primary Disk: c1t0d0 /pci@1f,700000/scsi@2/sd@0,0
Secondary Disk: c1t1d0 /pci@1f,700000/scsi@2/sd@1,0
----------------------------------------------------
c1t0d0 Partition Table;
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 12074 58.59GB (12075/0/0) 122875200
1 swap wu 12075 - 13261 5.76GB (1187/0/0) 12078912
2 backup wm 0 - 14086 68.35GB (14087/0/0) 143349312
3 var wm 13262 - 14067 3.91GB (806/0/0) 8201856
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 14068 - 14086 94.41MB (19/0/0) 193344
# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c1t0d0s0 58G 6.4G 51G 12% /
/proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
fd 0K 0K 0K 0% /dev/fd
/dev/dsk/c1t0d0s3 3.9G 1.2G 2.7G 31% /var
swap 17G 168K 17G 1% /var/run
swap 17G 120K 17G 1% /tmp
esqcqanfs1:/nfs 100G 33G 62G 35% /u01/nsncif/data
2nd Disk to mirror;
1. c1t1d0
/pci@1f,700000/scsi@2/sd@1,0
root@esqcqaa02# fmthard -s /dev/null /dev/rdsk/c1t1d0s2
fmthard: New volume table of contents now in place.
c1t1d0 Partiton Table;
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 12074 58.59GB (12075/0/0) 122875200
1 swap wu 12881 - 14068 5.76GB (1188/0/0) 12089088
2 backup wu 0 - 14086 68.35GB (14087/0/0) 143349312
3 var wm 12075 - 12880 3.91GB (806/0/0) 8201856
4 unassigned wu 0 0 (0/0/0) 0
5 unassigned wu 0 0 (0/0/0) 0
6 unassigned wu 0 0 (0/0/0) 0
7 unassigned wm 14069 - 14086 89.44MB (18/0/0) 183168
##########################
Create state replica
##########################
root@esqcqaa02# metadb -a -f -c 3 c1t0d0s7 c1t1d0s7
you have mail
root@esqcqaa02# metadb -i
flags first blk block count
a u 16 8192 /dev/dsk/c1t0d0s7
a u 8208 8192 /dev/dsk/c1t0d0s7
a u 16400 8192 /dev/dsk/c1t0d0s7
a u 16 8192 /dev/dsk/c1t1d0s7
a u 8208 8192 /dev/dsk/c1t1d0s7
a u 16400 8192 /dev/dsk/c1t1d0s7
r - replica does not have device relocation information
o - replica active prior to last mddb configuration change
u - replica is up to date
l - locator for this replica was read successfully
c - replica's location was in /etc/lvm/mddb.cf
p - replica's location was patched in kernel
m - replica is master, this is replica selected as input
W - replica has device write errors
a - replica is active, commits are occurring to this replica
M - replica had problem with master blocks
D - replica had problem with data blocks
F - replica had format problems
S - replica is too small to hold current data base
R - replica had device read errors
#
--------
Metadevices: ** Plan **
/: d0
-> d10
-> d11
swap: d1
-> d20
-> d21
/var: d3
-> d30
-> d31
##############################
Mirror /var
##############################
Metadevice for /var;
# metainit -f d31 1 1 c1t0d0s3
d31: Concat/Stripe is setup
# metainit d30 1 1 c1t1d0s3
d30: Concat/Stripe is setup
# metainit d3 -m d31
d3: Mirror is setup
> ## Edit /etc/vfstab, Remove the line with /var and add the line below;
/dev/md/dsk/d3 /dev/md/rdsk/d3 /var ufs 1 no -
# Reboot
# metaattach d3 d30
##############################
Mirror Swap
##############################
# metainit -f d20 1 1 c1t0d0s1
d20: Concat/Stripe is setup
# metainit d21 1 1 c1t1d0s1
d21: Concat/Stripe is setup
# metainit d1 -m d20
d1: Mirror is setup
### Edit /etc/vfstab as below;
# grep swap /etc/vfstab
/dev/md/dsk/d1 - - swap - no -
swap - /tmp tmpfs - yes -
#
# Reboot
# metaattach d1 d21
>> To check, run metastat
##############################
Mirror Root FS
##############################
# metainit -f d10 1 1 c1t0d0s0
d10: Concat/Stripe is setup
# metainit d11 1 1 c1t1d0s0
d11: Concat/Stripe is setup
# metainit d0 -m d10
d0: Mirror is setup
# metaroot d0
# lockfs -fa
# cat /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/md/dsk/d1 - - swap - no -
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no -
/dev/md/dsk/d3 /dev/md/rdsk/d3 /var ufs 1 no -
esqcqanfs1:/nfs - /u01/nsncif/data nfs - yes -
swap - /tmp tmpfs - yes -
#
# REBOOT
metaattach d0 d11
Done!
# eeprom boot-device
boot-device=disk disk1
Use "prtconf -vp" to check default disk alias.
If boot-device is not set to backup mirror disk, proceed with follwing steps.
# eeprom use-nvramrc?=true
> We need to do is to set the “use-nvramrc = true” OBP variable so our modifications will be used when system is reboot.
> you can set dev alias if it is not set as below;
# eeprom nvramrc=”devalias rootdisk /pci@780/pci@0/pci@9/scsi@0/disk@0,0 devalias rootmirror /pci@780/pci@0/pci@9/scsi@0/disk@1,0″
> Then set boot-device as below;
# eeprom boot-device=”rootdisk rootmirror”
# reboot
No comments:
Post a Comment