Mirroring /var - SUN

This is a discussion on Mirroring /var - SUN ; Admission time! I've set up zillions of mirrors but I've never done one perfectly without getting fsck probs despite the logging option almost always on /var. I can slightly understand it with /var being so volatile but metastat shows all ...

+ Reply to Thread
Results 1 to 14 of 14

Thread: Mirroring /var

  1. Mirroring /var

    Admission time!

    I've set up zillions of mirrors but I've never done one perfectly
    without getting fsck probs despite the logging option almost
    always on /var.

    I can slightly understand it with /var being so volatile but metastat
    shows all as in sync so first reboot should be error free. Yet I always
    get an issue with /var.

    I can always fix it by booting single (well being forced to!) and fsck'ing
    both the metadevice and the underlying slices.

    Am I missing something with /var?

    Steve




  2. Re: Mirroring /var

    Steve wrote:
    > Am I missing something with /var?


    Care to post more details?

    Never had problems with mirroring /var myself.

    --
    Daniel

  3. Re: Mirroring /var

    Steve wrote:
    > Admission time!
    >
    > I've set up zillions of mirrors but I've never done one perfectly
    > without getting fsck probs despite the logging option almost
    > always on /var.
    >
    > I can slightly understand it with /var being so volatile but metastat
    > shows all as in sync so first reboot should be error free. Yet I always
    > get an issue with /var.
    >
    > I can always fix it by booting single (well being forced to!) and fsck'ing
    > both the metadevice and the underlying slices.
    >
    > Am I missing something with /var?
    >
    > Steve
    >
    >
    >


    I don't know. Maybe you should tell us how you setup your mirror...

    But generally speaking, it is not a good idea to use the subdevice of a
    metadisk directly (i.e. fsck only /dev/md/rdsk/dx).

    A source of problems might be, if you setup your mirror directly instead
    of attaching a submirror and letting svm sync it.

    Tom

  4. Re: Mirroring /var

    > I don't know. Maybe you should tell us how you setup your mirror...

    metainit /var slice on disk one as one to one 'metainit d51 -f 1 1
    varslice1' then the other side 'metainit d52 1 1 varslice2

    Create mirror 'metainit d5 -m d51' and attach other side 'metattach d5
    d52' and then watch it with metastat till it's synced.

    Don't tell me i've been doing it wrong please!!


    > A source of problems might be, if you setup your mirror directly instead
    > of attaching a submirror and letting svm sync it.



    Not sure what u mean but I think I did attach my submirror?

    Steve


  5. Re: Mirroring /var

    Steve wrote:
    >> I don't know. Maybe you should tell us how you setup your mirror...

    >
    > metainit /var slice on disk one as one to one 'metainit d51 -f 1 1
    > varslice1' then the other side 'metainit d52 1 1 varslice2
    >
    > Create mirror 'metainit d5 -m d51' and attach other side 'metattach d5
    > d52' and then watch it with metastat till it's synced.


    After "metainit d5 -m d51" you have edited /etc/vfstab to
    /dev/md/dsk/d5 /dev/md/rdsk/d5 /var ufs 1 no -
    and rebooted (since you normally cannot dismount /var)?
    *after* the reboot you can then do "metattach d5 d52"

    --
    Daniel

  6. Re: Mirroring /var

    On Fri, 24 Feb 2006 17:31:22 +0000, Daniel Rock wrote:

    > Steve wrote:
    >>> I don't know. Maybe you should tell us how you setup your mirror...

    >>
    >> metainit /var slice on disk one as one to one 'metainit d51 -f 1 1
    >> varslice1' then the other side 'metainit d52 1 1 varslice2
    >>
    >> Create mirror 'metainit d5 -m d51' and attach other side 'metattach d5
    >> d52' and then watch it with metastat till it's synced.

    >
    > After "metainit d5 -m d51" you have edited /etc/vfstab to
    > /dev/md/dsk/d5 /dev/md/rdsk/d5 /var ufs 1 no -
    > and rebooted (since you normally cannot dismount /var)?
    > *after* the reboot you can then do "metattach d5 d52"


    Yes I did the vfstab as normal but I never reboot after attaching so thats
    where I must be going wrong!

    I've always tended to only reboot after mirroring root, then do the rest,
    and reboot at the end. I'm thinking now I'd be better off your way, and/or
    do the whole process booted single?

    I'll try this method later on this machine!

    Cheers

    Steve



  7. Re: Mirroring /var

    On Fri, 24 Feb 2006 18:24:26 +0000, Steve wrote:

    > On Fri, 24 Feb 2006 17:31:22 +0000, Daniel Rock wrote:
    >
    >> Steve wrote:
    >>>> I don't know. Maybe you should tell us how you setup your mirror...
    >>>
    >>> metainit /var slice on disk one as one to one 'metainit d51 -f 1 1
    >>> varslice1' then the other side 'metainit d52 1 1 varslice2
    >>>
    >>> Create mirror 'metainit d5 -m d51' and attach other side 'metattach d5
    >>> d52' and then watch it with metastat till it's synced.

    >>
    >> After "metainit d5 -m d51" you have edited /etc/vfstab to
    >> /dev/md/dsk/d5 /dev/md/rdsk/d5 /var ufs 1 no -
    >> and rebooted (since you normally cannot dismount /var)?
    >> *after* the reboot you can then do "metattach d5 d52"

    >
    > Yes I did the vfstab as normal but I never reboot after attaching so thats
    > where I must be going wrong!
    >
    > I've always tended to only reboot after mirroring root, then do the rest,
    > and reboot at the end. I'm thinking now I'd be better off your way, and/or
    > do the whole process booted single?
    >
    > I'll try this method later on this machine!
    >
    > Cheers
    >
    > Steve


    All seems fine now, seems my error was mainly to add 'logging' to my
    slices in vfstab, I removed them, all works fine and slices are reported
    on boot as 'logging' so maybe this is a given now with Sol 10/SVM?

    Thanks to all!

    Steve

  8. Re: Mirroring /var

    On Fri, 24 Feb 2006, Steve wrote:

    > I'll try this method later on this machine!


    While you're at it, you might as well get rid of the separate /var
    partition at the same time, merging it with /.

    --
    Rich Teer, SCNA, SCSA, OpenSolaris CAB member

    President,
    Rite Online Inc.

    Voice: +1 (250) 979-1638
    URL: http://www.rite-group.com/rich

  9. Re: Mirroring /var

    On Sun, 26 Feb 2006 00:55:01 +0000, Rich Teer wrote:

    > On Fri, 24 Feb 2006, Steve wrote:
    >
    >> I'll try this method later on this machine!

    >
    > While you're at it, you might as well get rid of the separate /var
    > partition at the same time, merging it with /.


    Yeah I would have but the last lot of Sun supplied V440's all had a flash
    install that sliced up with a separate /var.....

    B@stards!!!!

    I'm doing the same at home cos I might get more in the field.

    And these V440's installed with the most enormous motd I've ever seen
    about how wonderful JES is and how kind Sun are giving it way and
    containing a few spelling mistakes.....

    Takes ages to scroll on a term!

    Steve





  10. Re: Mirroring /var

    On Sun, 26 Feb 2006, Steve wrote:

    > Yeah I would have but the last lot of Sun supplied V440's all had a flash
    > install that sliced up with a separate /var.....


    The first thing I (and most other) sysadmins do on receipt of a
    new machine is reinstall the OS.

    > Takes ages to scroll on a term!


    I bet!

    --
    Rich Teer, SCNA, SCSA, OpenSolaris CAB member

    President,
    Rite Online Inc.

    Voice: +1 (250) 979-1638
    URL: http://www.rite-group.com/rich

  11. Re: Mirroring /var

    On Sun, 26 Feb 2006 04:16:33 +0000, Rich Teer wrote:

    > On Sun, 26 Feb 2006, Steve wrote:
    >
    >> Yeah I would have but the last lot of Sun supplied V440's all had a flash
    >> install that sliced up with a separate /var.....

    >
    > The first thing I (and most other) sysadmins do on receipt of a
    > new machine is reinstall the OS.
    >


    Me too Rich but this was a good un! The V440's came with Sol 10 which the
    customer wanted but with Solaris 9 media! And Sunray Server 3.0 when they
    ordered 3.1. No biggie withe the SRSS, got it off t'internet.

    Of course, I left my media at home......

    So I took a management decision to get on with it rather than sit and wait
    and think! As it happened things got worse when I racked them - no power
    or network despite being assured they were there! Good just I did my
    usual on a desk in the meeting room server build!

    These are now the only Unix boxes in this huge Windows-based County
    Council, I see problems ahead:

    1, What graphics cards do they have?

    2. Where's the keyboards?

    3. Will they run Windows 2003?

    Already been asked those...


    >> Takes ages to scroll on a term!

    >
    > I bet!


    And you can't mv off motd and create a new one! It knows and copies back -
    haven't have time to work that one out yet. In the meantime just deleted
    the text in vi and replaced it with one line!

    Steve




  12. Re: Mirroring /var

    From Solaris 9 to 10 the logging on the filesystem are turned ON for
    default. Only with Solaris 9 + VxVM 4.0 there is a little bug where you
    must inser nologging in root filesystem.

    Bye

    Steve wrote:

    >
    > All seems fine now, seems my error was mainly to add 'logging' to my
    > slices in vfstab, I removed them, all works fine and slices are reported
    > on boot as 'logging' so maybe this is a given now with Sol 10/SVM?
    >
    > Thanks to all!
    >
    > Steve


  13. Re: Mirroring /var

    > I don't know. Maybe you should tell us how you setup your mirror...

    metainit /var slice on disk one as one to one 'metainit d51 -f 1 1
    varslice1' then the other side 'metainit d52 1 1 varslice2

    Create mirror 'metainit d5 -m d51' and attach other side 'metattach d5 d52' and then
    watch it with metastat till it's synced.

    Don't tell me i've been doing it wrong please!!


    > A source of problems might be, if you setup your mirror directly instead
    > of attaching a submirror and letting svm sync it.



    Not sure what u mean but I think I did attach my submirror?

    Steve



  14. Re: Mirroring /var

    Steve wrote:
    > metainit /var slice on disk one as one to one 'metainit d51 -f 1 1
    > varslice1' then the other side 'metainit d52 1 1 varslice2
    >
    > Create mirror 'metainit d5 -m d51' and attach other side 'metattach d5 d52' and then
    > watch it with metastat till it's synced.
    >
    > Don't tell me i've been doing it wrong please!!


    You've been doing it wrong! (sorry!)

    You need to do the metattach _after_ you reboot.

    Scott

+ Reply to Thread