Community Page
- www.tech-recipes.com/ Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- i wish south africans would start getting twiter after all we are hosting the 2010 world cup so the world must start acepting it
- ñ digam!! remover ie8 no adicionar e remover programas ??? eu nunca teria pensado nisso!! bando d otários!!
- it wont work help me
- it dosnt bring up the flash player wizard can u help please
- Google is the best search engine...what else I can say? But I dont use google chrome, I prefer other browser
Tech-Recipes
Cookbook of Tech TutorialsSolaris software RAID | Solaris system administration | Tech-Recipes
Started by qdideas · 9 months ago
5 years ago
metadb -af -c 2 /dev/dsk/c0t0d0s3 /dev/dsk/c0t0d0s4
metadb -af -c 2 /dev/dsk/c0t1d0s3 /dev/dsk/c0t0d0s4
Be this:
metadb -af -c 2 /dev/dsk/c0t0d0s3 /dev/dsk/c0t0d0s4
metadb -af -c 2 /dev/dsk/c0t1d0s3 /dev/dsk/c0t1d0s4
bubba AT bubba.org
5 years ago
Thank you for helping to make Tech-Recipes better!
5 years ago
Two comments
why do you not put the metadb across 2 physical disks? Would that not be part of the ideal of mirroring? Or do the -af -c 2 done twice actually give you a -af -c 4 ?
You say edit vfstab and turn on logging. For a linux person on solaris I aint too sure about that. Any clues?
I would appreciate 10 seconds on lockfs -fa - why not just sync?
Again nice article - it just works, thanks
4 years ago
bash-2.05# metainit -f d0 d10
metainit: srv-e4500: d0: "d10": syntax error
ideas?
4 years ago
bash-2.05# metainit -f d0 d10
metainit: srv-e4500: d0: "d10": syntax error
ideas?</ul>
from the metainit man page...
metainit d0 -r d10
3 years ago
bash-2.05# metainit -f d0 d10
metainit: srv-e4500: d0: "d10": syntax error
ideas?</ul>
metainit d0 -m d10
metainit d0 -m d10
the metattach further down should be left without the -f switch since it doesnt exsist in metaattach command
should just be
metattach d0 d20
metattach d1 d21
not metattach -f d0 d20
otherwise it works like a charm :wink:
3 years ago
bash-2.05# metainit -f d0 d10
metainit: srv-e4500: d0: "d10": syntax error
ideas?</ul>
metainit d0 -m d10
metainit d0 -m d10
the metattach further down should be left without the -f switch since it doesnt exsist in metaattach command
should just be
metattach d0 d20
metattach d1 d21
not metattach -f d0 d20
otherwise it works like a charm :wink:
sry
metainit d0 -m d10
metainit d1 -m d11
thats it
reg
3 years ago
3 years ago
partition each of your disks with a 10mb partition, (I use slice3) to hold your metadb's, assigning the rest of the space to slice 7
Create you metadb's
metadb -a -f -c 3 /dev/dsk/c1t1d0s3 /dev/dsk/c1t2d0s3 /dev/dsk/c1t3d0s3
At the following to /etc/lvm/md.tab
d0 3 1 dev/dsk/c1t1d0s7 1 /dev/dsk/c1t2d0s7 1 /dev/dsk/c1t3d0s7
Build the stripe:
metainit d0
create the file system:
newfs /dev/md/rdsk/d0
mount the file system to check it works:
mount /dev/md/dsk/d0 /mnt
write to it, df it, fsck it, etc.
then edit /etc/vfstab
/dev/md/dsk/d0 /dev/md/rdsk/d0 /mnt ufs 2 yes quota
This means the file system is mounted on /mnt at reboot, and will not be mounted in single user mode, change the 2 for 1 if you want it mounted when the kernel comes up.
Note: it's usefull to keep the output from newfs somewhere, because if your disk ever dies, you need to know where your next super block is, (for use with fsck) and the output from newfs is the only way you have of knowing this.
Note also, that if you ever screw your metadevice you can still mount the individual disks manually:
mount /dev/dsk /dev/dsk/c1t1d0s7 /mnt
It is frequently quicker to do this, back up the data, then rebuild your metadevice from scratch, then restrore the data, than it is to try to recover the metadevice.
To build a mirror, same rules for partitions
Edit /etc/lvm/md.tab
d0 -m /dev/md/dsk/d1 /dev/md/dsk/d2
d1 1 1 /dev/dsk/c1t1d0s7
d2 1 1 /dev/dsk/c1t2d0s7
The rest is the same.
If ever a mirror disk goes bad, you can do a soft replace with the following command:
metareplace -e d0 c1t2d0s7
It will then try to resync the disk.
If a mirrored disk dies and has to be replaced use the following:
metadb -d /dev/dsk/c1t1d0s3 (to delete the state databases)
replace physical disk (c1t1)
prtvtoc /dev/rdsk/c1t2d0s2 | fmthard –s - /dev/rdsk/c1t1d0s2 (to mirror the partition table, working drive -> new drive)
metadb -a -c 3 /dev/dsk/c1t1d0s3 (to rebuild the state databases)
metareplace -e d0 c1t1d0s7 (to replace the failed mirror)
Note:
You can replace the disk on the fly, repartition and metareplace. *THEN* metadb -d & metadb -a -c 3 with the system up...