Uploaded image for project: 'OpenVZ'
  1. OpenVZ
  2. OVZ-5707

container custom mount script fails on restart

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Fix Version/s: OpenVZ-legacy
    • Component/s: Containers::Userspace
    • Security Level: Public
    • Environment:
      Operating System: Debian
      Platform: x86_64 (AMD64)

      Description

      I'm using RHEL6 kernel 2.6.32-042stab076.8 on Debian squeeze box.

      vzctl, vzctl-core are latest 4.3 built from the RPMs as well.

      I have 2 issues with mounting:

      1. If container had no mounts (for example mount script failed for some reason due unavailable path or smth) and box got rebooted vzctl is not executing mount script for this container.

      2. If container had mounts before reboot they are not restored after reboot.

      [ 32.772009] CPT ERR: ffff880637615000,101 :mount point is missing: /home/www/devel.www
      [ 32.772146] CPT ERR: ffff880637615000,101 :Failed to restore mount point @3528 dev '/var/tmp/test123', type 'simfs', path '/home/www/devel.www'
      [ 32.772291] CPT ERR: ffff880637615000,101 :rst_namespace: -2

      here is 101.mount script I'm using:

      #!/bin/bash
      . /etc/vz/vz.conf
      . ${VE_CONFFILE}

      SRC[0]=/var/tmp/test123
      DST[0]=/home/www/devel.www

      echo "Starting ${VEID}.mount..."
      for ((i=0;i<${#SRC[@]};i++)); do
        if [ ! -e ${VE_ROOT}${DST[$i]} ]; then mkdir -p ${VE_ROOT}${DST[$i]}; fi
          mount -n -t simfs ${SRC[$i]} ${VE_ROOT}${DST[$i]} -o ${SRC[$i]}
      done

      If I do vzctl restart 101 it mounts perfectly shared folders.

      Please suggest what to do.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kir Kir Kolyshkin
              Reporter:
              spameden@gmail.com sp
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: