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

Can't restore CT with bind-mounted filesystem

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Fix Version/s: OpenVZ-legacy
    • Component/s: Containers::Kernel
    • Security Level: Public
    • Environment:
      Operating System: Other Linux
      Platform: x86_64 (AMD64)

      Description

      Greetings!

      I can't restore CT with following configuration:

      $ uname -r
      2.6.32-042stab062.2

      # RAM
      PHYSPAGES="70:75G"

      # Swap
      SWAPPAGES="0:0G"

      # Disk quota parameters (in form of softlimit:hardlimit)
      DISKSPACE="1.5T:2.0T"
      DISKINODES="161061274:214748365"
      QUOTATIME="0"

      # CPU fair scheduler parameter
      CPUUNITS="1000"
      VE_ROOT="/vz/root/$VEID"
      VE_PRIVATE="/vz/private/$VEID"
      OSTEMPLATE="ubuntu-12.04-x86_64"
      ORIGIN_SAMPLE="vswap-4g"
      HOSTNAME="ppcdev-precise"
      NAME="ppcdev-precise"
      ONBOOT="no"
      NETIF="ifname=eth0,mac=00:18:51:23:C5:4F,host_ifname=veth1000.0,host_mac=00:18:51:DB:4A:BC;"
      NET_IP="xx.xx.xx.xx"
      IOPRIO="2"
      CAPABILITY="SYS_ADMIN:on"
      BRIDGEDEV="br0"
      NETIFDEV="veth1000.0"

      .mount script:

      [ -f /etc/vz/vz.conf ] || exit 1
      [ -f $VE_CONFFILE ] || exit 1

      # source both files. Note the order, it is important
      . /etc/vz/vz.conf
      . /etc/vz/conf/mount.conf
      . $VE_CONFFILE

      RETVAL=0

      {
          sleep 5 && /usr/sbin/brctl addif $BRIDGEDEV $NETIFDEV
      } &

          /bin/mount --bind -o rw /mnt/storebackup "$VE_ROOT"/mnt/backup
          /bin/mount --bind -o rw /mnt/ssd1 "$VE_ROOT"/var/www

      RETVAL=$?

      exit $RETVAL

      .umount script:

      [ -f /etc/vz/vz.conf ] || exit 1
      [ -f $VE_CONFFILE ] || exit 1
      # source both files. Note the order, it is important
      . /etc/vz/vz.conf
      . /etc/vz/conf/mount.conf
      . $VE_CONFFILE

      RETVAL=0

      /bin/umount "$VE_ROOT"/opt ||:
      /bin/umount "$VE_ROOT"/mnt/backup ||:
      /bin/umount "$VE_ROOT"/var/www ||:

      RETVAL=$?

      exit $RETVAL

      checkpoint command is OK:
      2012-10-15T16:06:14+0400 vzctl : CT 1000 : Setting up checkpoint...
      2012-10-15T16:06:14+0400 vzctl : CT 1000 : suspend...
      2012-10-15T16:06:14+0400 vzctl : CT 1000 : dump...
      2012-10-15T16:06:15+0400 vzctl : CT 1000 : kill...
      2012-10-15T16:06:15+0400 vzctl : CT 1000 : Checkpointing completed successfully
      2012-10-15T16:06:17+0400 vzctl : CT 1000 : Container is unmounted

      restore command:
      $ vzctl restore 1000
      2012-10-15T16:10:30+0400 vzctl : CT 1000 : Restoring container ...
      2012-10-15T16:10:30+0400 vzctl : CT 1000 : Starting container ...
      2012-10-15T16:10:30+0400 vzctl : CT 1000 : Container is mounted
      2012-10-15T16:10:31+0400 vzctl : CT 1000 : Setting CPU units: 1000
      2012-10-15T16:10:31+0400 vzctl : CT 1000 : Configure veth devices: veth1000.0
      2012-10-15T16:10:32+0400 vzctl : CT 1000 : Container start failed
      2012-10-15T16:10:32+0400 vzctl : CT 1000 : Container is unmounted

      relevant part in dmesg:

      [ 69.603298] CT: 1000: started
      [ 70.045691] CPT ERR: ffff880c359e9000,1000 :file 1455960 flags mismatch 00048001 0004c001
      [ 70.687896] CPT ERR: ffff880c359e9000,1000 :rst_open_file: failed to lookup path '/proc/579/stat': -2
      [ 70.929058] CPT ERR: ffff880c359e9000,1000 :rst_open_file: failed to lookup path '/proc/630/stat': -2
      [ 70.956099] CPT ERR: ffff880c359e9000,1000 :rst_open_file: failed to lookup path '/proc/631/stat': -2
      [ 71.035516] CPT ERR: ffff880c359e9000,1000 :do_rst_vma: sc_m(un)lock failed
      [ 71.035585] CPT ERR: ffff880c359e9000,1000 :do_rst_mm: failed to restore vma: -12
      [ 71.035652] CPT ERR: ffff880c359e9000,1000 :do_rst_mm 318909992
      [ 71.035710] CPT ERR: ffff880c359e9000,1000 :rst_mm: -12
      [ 71.035968] CPT ERR: ffff880c359e9000,1000 :make_baby: -12
      [ 71.036027] CPT ERR: ffff880c359e9000,1000 :rst_clone_children
      [ 71.299658] CT: 1000: stopped

        Attachments

          Activity

            People

            Assignee:
            skinsbursky@openvz.org Kinsbursky Stanislav
            Reporter:
            lakostis@yandex-team.ru Konstantin Lepikhov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: