I recently patched my Solaris 10 box and found out that few of the apps are not working. Fortunately, I had detached the mirroring prior to patching, so I just booted into my secondary disk [which was detached prior to patching] and found that my apps are working....
The problem is this was way back in last month....see below :
uptime
40 days
df -h /
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t1d0s0 18G 7.6G 9.9G 44% /
d5 m 5GB d15
d15 s 5GB c0t0d0s4 : - Patched disk
df -h has /dev/md/dsk/d5 mounted on /usr1
My concern is whatever the work that I had done for the past 40 days on /usr1 will vanish if I do :
metaclear d5
metaclear d15
metainit -f d15 1 1 /dev/dsk/c0t1d0s5 : - changed to secondary disk which is actually primary now as it is not patched and my apps are working fine on c0t1d0s0.
metainit d5 -m d15
I have created the mirroring succcessfully with root as well as swap with unpatched disk as primary disk and patched disk as secondary and attached the mirrirs...
The only problem that I am facing is with the md d5 ?:wall:
c0t0d0 is the patched disk.
c0t1d0 is unpatched disk and I have booted through this last month.
Currently metastat -p output is
d13 m 7.0GB d23
d23 s 7.0GB c0t0d0s3 : - /var
d11 m 4.0GB d21
d21 s 4.0GB c0t0d0s1 : - swap
d10 m 18GB d20
d20 s 18GB c0t0d0s0 : - /
d5 m 5GB d15
d15 s 5GB c0t0d0s4 : - /usr1
$ df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t1d0s0 18G 7.6G 9.9G 44% /
/dev/dsk/c0t1d0s3 6.9G 4.8G 2.0G 71% /var
/dev/md/dsk/d5 5G 3G 2G 70% /usr1
/dev/md/dsk/d601 12G 3.9G 7.8G 34% /u01
I forgot to make changes in vfstab for md device d5 when I backout the patches, so df -h has /dev/md entry with metastat -p output showing that the mirror has been cleared for d5. Hope that it does makes sense now !
I think you are confusing yourself... and me in the process. You have two slices: c0t0d0s4 and c0t1d0s4. Which of them contains data that you want to keep?
It doesn't matter which slice the server is booted with. Just explain which one currently holds the data that you want to keep: c0t0d0s4(d5) or c0t1d0s4?
I am sorry if I am being too annoying, but can you please tell here which disk will have all the data [of course I am taking into consideration /usr1 i.e.slice 4 of boththe disk only]from the day that I have patched if :
So let me get this straight. You detached mirrors and patched the server 40 days ago. For 40 days the server was running with patched version of the operation system, correct? Then today you found out that the applications are not really working properly with the patched system (after using it for 40 days) correct? So you booted second disk today, which contains the system as it was 40 days ago, right?
You understood the scenario but not the time line....
The server was patched 40 days back and at the same timeI found out that my apps are not working and I booted with secondary disk the same day [40 days back]..
my d5 md device is currently a one-way mirror which has slice of the patched disk [c0t0d0]....
d5 is mounted on /usr1 [which should have been /dev/dsk/c0t1d0s4 mounted on /usr1, but I missed to update the vfstab file before booting into c0t1d0]..so for the past 40 days whatever changes that I have done will be ultimately written to c0t0d0s4 and not on c0t1d0s4 [as it is not a part of my mirror]...correct ?
Now I want to revert back my mirroring by making c0t1d0 [unpatched] as my primary disk and c0t0d0 [patched] as my mirrored disk.
Yes. That is correct. If you have been using d5 (c0t0d0s4) as /usr1 during those 40 days, then all the changes are on that slice. To move that data to c0t1d0s4 you can safely use steps that I provided earlier (http://www.unix.com/302575411-post6.html\).