SVM Creation

Hello,

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:

Any suggesstions ?

It is a bit confusing... To which disk (slice) all the changes during those 40 days were written?

Sorry ! But, I realised that it could confuse..

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 !

So you want to move /usr1 from c0t0d0s4 to c0t1d0s4 (keeping all the data that is currently on c0t0d0s4)?

That is correct ! Keeping all tha data intact including the changes that have been made for the past 40 days..

Then you can do this (make a backup first of course;)):

metainit -f d25 1 1 /dev/dsk/c0t1d0s5
metattach d5 d25
(wait for resync)
metadetach d5 d25
metaclear d25
(unmount /usr1 and mount it directly from c0t1d0s5 slice)

Thanks !!

I thought of that initially but was expecting a second thought so posted here :wink: !

Appreciate your time and help...

---------- Post updated at 03:10 PM ---------- Previous update was at 03:01 PM ----------

Here's onemore thing which is confusing me:confused:

even if I sync the slices back again and detach I guess I am going to run into problem..

My /usr1 has all the apps configurations that was broke with patching...so If I do

metainit -f d25 1 1 /dev/dsk/c0t1d0s5 
metattach d5 d25 (wait for resync) 
metadetach d5 d25 
metaclear d25

I will be ultimately copying the broke configs onto my unbroke contents.

What about this then ?:wall:

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?

Trying to simplify more :

/dev/md/dsk/d5          5G   3G    2G    70%    /usr1

before patching :

d5 -m d15 d25 1
d15 1 1 c0t0d0s4
d25 1 1 c0t1d0s4

After patching since I have detached the mirroring :

d5               m   20GB d15
    d15          s   20GB c0t0d0s4

:-here, check df -h ...so,all the data for /usr1 is in c0t0d0s4 despite the server is booted with c0t1d0 disk

Reemeber server is booted with c0t1d0..

Moreover the slice c0t0d0s4 will be having the broke apps configs too...

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 :

df -h has following entry :

/dev/md/dsk/d5          5G   3G    2G    70%    /usr1

and
metastat -p has

d5               m   20GB d15
    d15          s   20GB c0t0d0s4

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.

Will that affect my data on /usr1 ?

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\).

Thanks for your help and most of all patience with me :smiley: