ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    How to Stop XenServer from Mounting /var/log

    IT Discussion
    4
    78
    4.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • travisdh1T
      travisdh1 @scottalanmiller
      last edited by

      @scottalanmiller said in How to Stop XenServer from Mounting /var/log:

      @travisdh1 said in How to Stop XenServer from Mounting /var/log:

      @BRRABill said in How to Stop XenServer from Mounting /var/log:

      @scottalanmiller said

      Those are fake block devices. If you try to copy them they will take a very long time since /proc includes maps to the entire memory space and /dev includes all devices of any type including many mappings to every disk.

      So using dd to clone a USB while running (which we were discussing) would clone differently that if you shut down the XS, and used a separate machine, such as @DustinB3403 originally posted?

      Yes. A running system has things like /proc and /dev. I haven't experimented with cloning the actual block device (/dev/sdaX) instead of the mounted file system, but I don't know how well it would work if you're not doing it from an LVM snapshot.....

      Speaking of which, please tell me that XenServer 7 uses LVM for it's important bits?

      dd clones the block device, not the file system hierarchy.

      Yeah, yet I've had problems using it to make a copy of a block device that is in use.

      DustinB3403D scottalanmillerS 2 Replies Last reply Reply Quote 1
      • DustinB3403D
        DustinB3403 @travisdh1
        last edited by

        @travisdh1 said in How to Stop XenServer from Mounting /var/log:

        @scottalanmiller said in How to Stop XenServer from Mounting /var/log:

        @travisdh1 said in How to Stop XenServer from Mounting /var/log:

        @BRRABill said in How to Stop XenServer from Mounting /var/log:

        @scottalanmiller said

        Those are fake block devices. If you try to copy them they will take a very long time since /proc includes maps to the entire memory space and /dev includes all devices of any type including many mappings to every disk.

        So using dd to clone a USB while running (which we were discussing) would clone differently that if you shut down the XS, and used a separate machine, such as @DustinB3403 originally posted?

        Yes. A running system has things like /proc and /dev. I haven't experimented with cloning the actual block device (/dev/sdaX) instead of the mounted file system, but I don't know how well it would work if you're not doing it from an LVM snapshot.....

        Speaking of which, please tell me that XenServer 7 uses LVM for it's important bits?

        dd clones the block device, not the file system hierarchy.

        Yeah, yet I've had problems using it to make a copy of a block device that is in use.

        Same, I tested this at home on my running XS server, to clone the boot-usb to another USB and upon trying to boot from the clone it fails.

        Recommended solution: turn server off, and clone from a different system.

        scottalanmillerS 1 Reply Last reply Reply Quote 1
        • BRRABillB
          BRRABill
          last edited by

          I'm not trying to be argumentative. It's just that we're recommended X and Y, but it seems that they don't seem to work.

          I'd like to come up with a set guideline of ... hey XS is great off USB, but THIS is what you have to do, and anything will crash your system.

          It just seems like we are having a lot of system crashes or "yeah I tried this in my home/test lab and it didn't work" situations.

          scottalanmillerS 1 Reply Last reply Reply Quote 1
          • scottalanmillerS
            scottalanmiller @travisdh1
            last edited by

            @travisdh1 said in How to Stop XenServer from Mounting /var/log:

            Yeah, yet I've had problems using it to make a copy of a block device that is in use.

            That's a locking and access issue, in no way does it related to things like /proc though since those are not related to the block device.

            1 Reply Last reply Reply Quote 0
            • scottalanmillerS
              scottalanmiller @DustinB3403
              last edited by

              @DustinB3403 said in How to Stop XenServer from Mounting /var/log:

              @travisdh1 said in How to Stop XenServer from Mounting /var/log:

              @scottalanmiller said in How to Stop XenServer from Mounting /var/log:

              @travisdh1 said in How to Stop XenServer from Mounting /var/log:

              @BRRABill said in How to Stop XenServer from Mounting /var/log:

              @scottalanmiller said

              Those are fake block devices. If you try to copy them they will take a very long time since /proc includes maps to the entire memory space and /dev includes all devices of any type including many mappings to every disk.

              So using dd to clone a USB while running (which we were discussing) would clone differently that if you shut down the XS, and used a separate machine, such as @DustinB3403 originally posted?

              Yes. A running system has things like /proc and /dev. I haven't experimented with cloning the actual block device (/dev/sdaX) instead of the mounted file system, but I don't know how well it would work if you're not doing it from an LVM snapshot.....

              Speaking of which, please tell me that XenServer 7 uses LVM for it's important bits?

              dd clones the block device, not the file system hierarchy.

              Yeah, yet I've had problems using it to make a copy of a block device that is in use.

              Same, I tested this at home on my running XS server, to clone the boot-usb to another USB and upon trying to boot from the clone it fails.

              That may be because some blocks are in process of being changed and are not consistent.

              1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller @BRRABill
                last edited by

                @BRRABill said in How to Stop XenServer from Mounting /var/log:

                I'm not trying to be argumentative. It's just that we're recommended X and Y, but it seems that they don't seem to work.

                I thought that the recommendation was to clone prior to boot time.

                BRRABillB 1 Reply Last reply Reply Quote 0
                • BRRABillB
                  BRRABill @scottalanmiller
                  last edited by

                  @scottalanmiller said

                  I thought that the recommendation was to clone prior to boot time.

                  Is it? We've winded around it so much, I wasn't sure.

                  scottalanmillerS 1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller @BRRABill
                    last edited by

                    @BRRABill said in How to Stop XenServer from Mounting /var/log:

                    @scottalanmiller said

                    I thought that the recommendation was to clone prior to boot time.

                    Is it? We've winded around it so much, I wasn't sure.

                    That's the only way that we've ever approached it. Meaning how we (NTG) deal with any cloning operations for production systems. If you want to clone while it is running you need it locked as read only, I'm pretty sure. Which you don't normally want to do while running.

                    1 Reply Last reply Reply Quote 1
                    • BRRABillB
                      BRRABill
                      last edited by

                      Coming back around to this, I had some time today, and threw the hard drive from the crashed system (the one that crashed when I added a folder to the SR) into my test XS setup.

                      Booted up fine, and everything seems to be OK. The drive from the crash is /dev/sdb

                        --- Physical volume ---
                        PV Name               /dev/sdb
                        VG Name               XSLocalEXT-40f7cced-9587-c38f-e152-057e4ec2b2d0
                        PV Size               447.13 GiB / not usable 14.84 MiB
                        Allocatable           yes (but full)
                        PE Size               4.00 MiB
                        Total PE              114462
                        Free PE               0
                        Allocated PE          114462
                        PV UUID               pC2Rq6-pQ7S-rQr3-0eTq-d1OS-2Bnh-ot2ajP
                      
                      
                        --- Volume group ---
                        VG Name               XSLocalEXT-40f7cced-9587-c38f-e152-057e4ec2b2d0
                        System ID
                        Format                lvm2
                        Metadata Areas        1
                        Metadata Sequence No  2
                        VG Access             read/write
                        VG Status             resizable
                        MAX LV                0
                        Cur LV                1
                        Open LV               0
                        Max PV                0
                        Cur PV                1
                        Act PV                1
                        VG Size               447.12 GiB
                        PE Size               4.00 MiB
                        Total PE              114462
                        Alloc PE / Size       114462 / 447.12 GiB
                        Free  PE / Size       0 / 0
                        VG UUID               3F38x8-Jz47-oaL9-oGSf-lGJb-tudH-mg0iB5
                      
                      

                      lvs shows the LV. But when I go to /dev/mapper, it is not listed. This is the same thing that happened on the crashed server.

                      lvdisplay gives us a little more info

                      Googling around, I found the lvscan command, which gave me this.

                      
                        inactive          '/dev/XSLocalEXT-40f7cced-9587-c38f-e152-057e4ec2b2d0/40f7cced-9587-c38f-e152-057e4ec2b2d0' [447.12 GiB] inherit
                        ACTIVE            '/dev/XSLocalEXT-dba1e375-4e51-7e22-a64b-e7bcc39db67a/dba1e375-4e51-7e22-a64b-e7bcc39db67a' [465.75 GiB] inherit
                      

                      Uh-oh ... inactive.

                      Doing some more Googling, it appears that
                      lvchange -a <LVname>
                      will reactivate it. Is that correct?

                      Also, what typically would take a LV offline? That must have been what happened.

                      1 Reply Last reply Reply Quote 0
                      • BRRABillB
                        BRRABill
                        last edited by

                        Actually it was:

                        lvchange -ay <VGname/LVname>

                        1 Reply Last reply Reply Quote 1
                        • 1
                        • 2
                        • 3
                        • 4
                        • 4 / 4
                        • First post
                          Last post