Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Help with /var partition in Solaris 10

  • 05-08-2008 3:52pm
    #1
    Registered Users, Registered Users 2 Posts: 1,227 ✭✭✭


    Hey guys,

    I hope some of you can help me out. I am currently looking after a couple of systems that are all running Solaris 10. I did not install them but I can see that the guy who did made a mistake.

    All the slices on the machine are mirrored and the /var partition is on slice seven. I can see from metastat that both internal disks have slice 7 mirrored. Everything is fine so far....

    I can see from df -h and also the vfstab that the guy mounts the c0t1d0s7 drive instead of specifying the ........../d7 etc. So the whole time this machine has been writing to one drive in the mirror. I want to fix this. The machine in question is running in a cluster so I can eject it from the cluster for a morning to work on it.

    My questions is basically how do I fix the situation. I imagine I can tar up the /var partition , then edit the /etc/vfstab. Then untar the contents of the tar file in the new /var mount point.

    The problem is that will Solaris start with no /var partition? Because as soon as I change the vfstab and reboot it, will I get a chance to untar the contents of the vfstab to the new /var partition?

    Any help is appreciated guys. Also I don't have any temporary space to put a temporary /var mount point.

    /Steve


Comments

  • Registered Users, Registered Users 2 Posts: 2,127 ✭✭✭Explosive_Cornflake


    That's going to be tough with a temp /var.
    I know shag all works without /var in solaris 10. I made the mistake once of updating the vfstab and typed the /var wrong and I had to fix it with sed as vi wouldn't launch without var, so I feeling tar won't work without it.
    I think you are going to need some external storage. A guess here would be to tar.gz /var on a removable drive, edit the vfstab for the new path, drop down to ok> boot -s cdrom, , mount the ... wait, boot cdrom probably can't see the metadb's. Hmmm, though one alright.
    Would doing a sync on the metadb update the second disk, therefore allowing you to edit the vfstab and reboot normally?


  • Registered Users, Registered Users 2 Posts: 158 ✭✭TeaServer


    This is an interesting one alright. First off, I'm not an expert, but here is my 2 cents:

    I'm not on a Solaris box at the moment so I can't confirm the details of the commands just now. From my understanding of your situation, you have something similiar to:

    Mirror d7:
    Sub-mirror 1: d71
    Device: c0t1d0s7
    Sub-mirror 2: d72
    Device: cxtxdxsx

    The guy has mounted c0t1d0s7 directly in vfstab (or the sub-mirror /dev/.../md/d71). I'm not too familiar about potential issues of changing /var mount point though. However, assuming the metadevices d7, d71 & d72 are setup correctly, you could try something like this:

    • Detach sub-mirror d72 from the mirror d7
    • Change the mount point in vfstab from /dev/.../md/d71 or (/dev/.../c0t1d0s7) to be /dev/.../md/d7
    • Attach the sub-mirror d72 to d7 again
    • Relax and have a cuppa while the sub-mirror re-syncs...

    DISCLAIMER:
    As with all issues that involve potential data loss, backup, backup, backup before doing anything!
    Follow these suggestions at your own risk!

    The output from metastat would help confirm that the actual mirrors are setup correctly and the above could be tried. Can you post this?


  • Registered Users, Registered Users 2 Posts: 102 ✭✭cormy


    If you have the luxury of dropping the node out of the cluster to work on it, then....:

    1) Follow TeaServer's steps to recreate mirror (i.e. run a metadetach then a metattach to kick off the resync, then update vfstab). Wait for mirroring to finish then run an 'init 0' to get to the OK prompt (presuming this is a Sparc box)...

    2) From the OK prompt, boot as:
    boot -xs
    (i.e. in non-cluster, single user mode)

    3) Verify that the metadevice (i.e. d7) is mounted under /var (or is at least mountable if you run 'mount /var'). If yes, reboot as normal.


  • Registered Users, Registered Users 2 Posts: 1,227 ✭✭✭stereo_steve


    Hey guys,

    I only got the chance to fix this last week. Just to give you a heads up of how it went.

    1. I backed up the /var partition by tar'ing it and saving it in the root partition.

    2. Changed the /etc/vfstab of the machine that it was changed from ....../c0t0d0s7 to ........./d7 etc. I though it would be ok as the mirror seemed fine and I performed ls on both internal disks and they seemed identical.

    3. Rebooted machine. Instant Fail!! The system went into maintenance mode.

    4. I fixed it by editing the vfstab back to what it was via a serial connection and rebooted. It was fine.

    5. I used the commands metadetach and metaclear and removed the mirror. I then created the mirror again. Edited the vfstab to ......../d7 and rebooted.

    It worked perfectly. I switched the primary server over and repeated step five on the other one.

    Thanks for the help above guys.

    Steve


Advertisement