PLEASE HELP:->For ROOT Mirroring in Solaris,See Full Information.
Hi Guys,
I need to do disk mirroring on Solaris 8 Server1 just like Server2 without damaging this Server. I have never done this before. So need your guidance/help. In Simple words I NEED TO CONVERT THIS Code:
/proc - /proc proc - no - Code:
/proc - /proc proc - no - IN OTHER WORDS, I NEED TO CONVERT THIS:- Code:
TO THIS:- Code:
bash-2.03$ metastat -p Code:
bash-2.03$ sudo format Server 2 FORMAT OUTPUT Code:
bash-2.03$ sudo format Code:
partition> p I think we are yet to put new identical disk on Server1 as FORMAT command showing only one disk on Server1. Would you please tell me the steps and their sequence to follow, AND WHAT I SHOULD NOT BE DOING TO DESTROY CURRENT DISKS ON Server1. I need to do disks mirrorng of "/" , "/var" and "/u01" How many reboots do I need to do this mirroring ? I have been reading lots of google steps but not sure where to start in my case. Please please guide , this is the most importance help from you talented guys. Thanks in advance. |
Hi Guys,
Below are the steps, can you please edit those as per my / /var and /u01 mirroring, IT WILL MOST USEFUL HELP FOR ME EVER. Steps:- SOLUTION For this procedures, we will be mirroring all the slices of the local boot disk (c0t0d0) to another local disk (c1t0d0). You will have to make the appropriate changes for your system. Reminders before you start: - a slice is required for state database (also called replica or metadb) - the local disks need to be identical and need to have the same partition layout - for each partition on your boot disk (/, /usr, /var, /opt, /export/home, or any other partition you may have), you must create minimum of 3 new meta devices: one for the existing slice, one for the slice on the mirrored disk, and one for the SVM mirror A) How to mirror the boot disk A1) Prepare the partitions of the boot disk (c0t0d0) and the rootmirror disk (c1t0d0) A1a) Be sure you have a slice 7 for state database on the boot disk. To use slice 7 for replicas is a recommendation any other slice can be used. Furthermore slice 7 should have 32MB, but a size of 20MB should be the minimum. A1b) Copy the partition table from boot disk (c0t0d0) to rootmirror disk (c1t0d0) # prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c1t0d0s2 Be carefully with this command, write the vtoc to the right direction/disk! A2) Initialize Solaris Volume Manager # metadb -afc 3 c0t0d0s7 c1t0d0s7 Option -a for attach new replica device Option -f is necessary if create the first replica on this system Option -c 3 means to have 3 metadb copies on each disk's slice 7. Verify success: # metadb For conceptual information about state database please refer to Chapter 6 - State Database (Overview) in Solaris Volume Manager Administration Guide http://docs.oracle.com/cd/E18752_01/...eplicas-1.html A2a) Optional: Only if you have an even number of disks or controllers for local replicas consider adding the following to file /etc/system set md:mirrored_root_flag=1 Why this flag? See Document 1420334.1 Solaris Volume Manager (SVM): Understanding the Kernel Tunable Parameter "md:mirrored_root_flag" A3) Initialize SVM root mirror (d0) for the root submirror partition (d1) # metainit -f d1 1 1 c0t0d0s0 The option -f is required for active root A3a) For rootmirror partition (d2) # metainit d2 1 1 c1t0d0s0 A3b) Setup one-way mirror for the active root partition # metainit d0 -m d1 Caution - Be sure to create a one-way mirror with the metainit command then attach the additional submirrors with the metattach command. When the metattach command is not used, no resynchronization operations occur. As a result, data could become corrupted when Solaris Volume Manager assumes that both sides of the mirror are identical and can be used interchangeably. A4) Initialize SVM for all additional partitions of the boot disk (/var, /opt, …) for swap mirror (d10): # metainit -f d11 1 1 c0t0d0s1 (-f is required for active swap) # metainit d12 1 1 c1t0d0s1 # metainit d10 -m d11 for /var mirror (d4): # metainit -f d5 1 1 c0t0d0s4 (-f is required for active /var) # metainit d6 1 1 c1t0d0s4 # metainit d4 -m d5 You can use this approach/example from /var for any other partition on the boot disk A5) Modify /etc/vfstab for the boot disk first make a copy for safety reasons # cp /etc/vfstab /etc/vfstab.pre_svm Change configuration for root in /etc/vfstab and /etc/system # metaroot d0 This will change the entry for root in /etc/vfstab and put the entry 'rootdev:/pseudo/md@0:0,0,blk' to /etc/system For additional partitions edit /etc/vfstab as follows: for swap change from: /dev/dsk/c0t0d0s1 - - swap - no - to: /dev/md/dsk/d10 - - swap - no - for /var or any other partition on the boot disk change from: /dev/dsk/c0t0d0s4 /dev/rdsk/c0t0d0s4 /var ufs 2 yes - to: /dev/md/dsk/d4 /dev/md/rdsk/d4 /var ufs 2 yes - Be carefully by editing /etc/vfstab, because boot can fail due to errors in /etc/vtstab! A6) Activate one-way SVM boot mirror disk # lockfs -fa # reboot After the system has rebooted, you can verify that root and other slices are under SVM's control by running: # df -k # swap -l A7) Attach second submirror to used SVM mirrors # metattach d0 d2 ( root partition ) # metattach d10 d12 ( swap partition ) # metattach d4 d6 ( /var partition ) Verify the sync status of the SVM mirrors with # metastat | grep sync Once you have attached all the submirrors to the metamirrors, and all the syncing has completed, your boot disk is mirrored. A8) Set the dump device to the correct device, using the command: # dumpadm -d swap Verify that the dump device is set correctly to swap with # dumpadm A9) Set up Open Boot Prom (OBP) environment by following Document 1504573.1 How to setup OBP/NVRAM parameter for SPARC if system is mirrored with Solaris Volume Manager? and try to boot from aliases ok boot rootmirror ok boot rootdisk |
Quote:
|
@TBOne This is not homework but verbatim copy of Solaris documentation ( http://docs.oracle.com/cd/E19253-01/...jxl/index.html ).
@manalisharmabe Please cite your sources when you paste documents. I'd love to be wrong but I'm afraid what you are asking for is beyond the usual help people provide on Forums. In any case, if you have no reply and cannot hire someone with enough experience to complete what you look for without breaking your system, I would suggest to build a server with the same characteristics as the one you are describing, and experiment/train yourself with SVM. You might then be able to came back with simpler and reasonably answerable questions. |
Quote:
|
Ok fine!
I understand. so Please tell me how many hard disk should I create if I need to practice mirroring of / , /var and /u01 on vmware? 2 are enough? Please guide me while practicing it. Thanks a lot. |
One single disk (c1t0d0) is containing all of your file systems (/, /var and /u01). A second disk will be sufficient for mirroring them.
A similar server would be better than running Solaris on VMWare. As the latter is providing an x86 environment, there is no openboot prom so step 7 should be done a different way. There are undoubtedly other steps that differ and/or are more complex, due to the fact on x86, a disk as an extra partitioning leyer (fdisk). See http://docs.oracle.com/cd/E19253-01/...kde/index.html |
Why this step starts with
A1b) Copy the partition table from boot disk (c0t0d0) to rootmirror disk (c1t0d0) # prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c1t0d0s2 Be carefully with this command, write the vtoc to the right direction/disk! I mean why not # prtvtoc /dev/rdsk/c0t0d0s1 | fmthard -s - /dev/rdsk/c1t0d0s1 This is what I have on my practise VM, i am going to mirror / , /var, /opt . Code:
bash-3.00# format A1a) Be sure you have a slice 7 for state database on the boot disk. To use slice 7 for replicas is a recommendation any other slice can be used. Furthermore slice 7 should have 32MB, but a size of 20MB should be the minimum. Is this really important ? Thanks. |
Second query:
Code:
partition> p Code:
bash-3.00# metadb -a -f -c 2 c1t0d0s6 c1t1d0s6 Please guide now, I have started my practice. |
Quote:
Quote:
Quote:
Quote:
|
Quote:
Beware that these commands use a source disk (c0t0d0) and a destination disk (c1t0d0) that are different than the one you have in your test platform (c1t0d0 as source and c1t1d0 as destination). Make sure you adapt the commands to your configuration !! Quote:
I would try to slightly reduce the swap area and use the recovered space in slice 5 which is currently unused, i.e something like: Code:
... |
Quote:
Thanks TBOne! No I am not telling to hurry up any one. You misjudge that one. Any way I remember what you say regarding my questions now. i have no one in my whole known circle area to discuss about Solaris, its only this Forum helping me. |
Quote:
Quote:
FOLLOW the instructions...RESEARCH the things first before asking questions. Putting "why is slice 2 on a solaris disk special" into Google would have gotten you that answer easily. We are happy to help you with problems, but you're not HAVING a problem...you're learning. Again, study the guides, follow the instructions, and research on your own. If you're absolutely stuck, post back with what you're not clear about. |
Quote:
|
I have some queries:-
Code:
/proc - /proc proc - no - Why swap is shown here 2 times , I mean c1t0d0s3 and c1t1d0s3 ? Is it mirrored ? Well, I have only one disk so I don't think , It's mirrored. Code:
ash-2.03$ sudo format In above information what exactly indicates that there are two disks in system? is it 1. c1t1d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107> ROOTMIRR /pci@1c,600000/scsi@2/sd@1,0 t1 here or something else, please excuse me for asking this, but I am really confused about the same. Thanks. |
All times are GMT -5. The time now is 06:58 PM. |