Help Center/ Server Migration Service/ FAQs/ Known Errors and Solutions/ SMS.1353: Bind Mount or Repeated Mount Detected on /xxx of the Source Server
Updated on 2024-08-31 GMT+08:00

SMS.1353: Bind Mount or Repeated Mount Detected on /xxx of the Source Server

Symptom

On a Linux source server, the Agent failed to be started, and the message "SMS.1353: Bind mount or repeated mount detected on /xxx of the source server" was displayed.

Possible Causes

The source server may have repeated or bind mounts. In this case, data may be migrated repeatedly or the disk space of the target server may be insufficient.

A repeated mount indicates that a disk or partition has multiple mount points. For example, partition /dev/vda1 is mounted on both the root directory / and the /home/mnt_test directory.

A bind mount indicates that a disk or partition is mounted on a directory while the directory is mounted on another directory. For example, partition /dev/vda1 is mounted on the root directory /, and the root directory / is mounted on the /root/bind_test/bind_mount directory.

Repeated mounts and bind mounts have the following features:

  • If the data in a directory changes, the changes will be synchronized to other directories.
  • A disk or partition is identified at several locations by the mount command.

The disks and folders mentioned in this section are only examples. Replace them as required.

  • Possible cause 1: Repeated mounts

    Check method

    1. Run mount on the source server to check whether a disk or partition is mounted on multiple directories. In the following figure, /dev/vda1 is mounted on both the root directory / and the /home/mnt_test directory.

    2. The SMS-Agent uses df -TH to determine how much data is on the source server. As shown in the following figure, df -TH only returns one of the two mount directories. So the amount of data displayed on the SMS console (which relies on df -TH) is less than the amount of data actually migrated (data in /dev/vda1 gets migrated twice).

    3. Run the ls command to check the files in the root directory / and /home/mnt_test. If the files are the same, it indicates that a repeated mount exists. To learn how to fix this problem, see Solution for repeated mounts.
  • Possible cause 2: Bind mounts

    Check method

    1. Run mount on the source server to check whether a disk or partition is mounted on multiple directories. In the following figure, the /dev/vda1 disk is mounted on both the / and /root/bind_test/bind_mount directories.

    2. Run df -TH on the source server. Only one mount point is returned.

    3. In the /root directory on the source server, run the # du -h --max-depth=1 ~ command to check how large the bind_test folder is.

      Run the # du -h --max-depth=1 ~/bind_test command to check how large the /root/bind_test/bind_mount folder is. As shown in the command outputs, the subdirectory is larger than its parent directory. This indicates a bind mount exists. To learn how to fix this problem, see Solution for bind mounts.

Solutions

  • Solution for repeated mounts
    1. In the .../SMS-Agent/agent/config/g-property.cfg file in directory where the SMS-Agent is installed on the source server, add mount points to be excluded from migration after the tar.exclude.dir and rsync.exclude.dir parameters.

      For example 1, if /home/mnt_test/* is added to the end of tar.exclude.dir and rsync.exclude.dir, all files in the /home/mnt_test/ directory will not be migrated and synchronized.

    2. (Optional) If you want that the target server has the same mount points as the source server after the migration is complete, perform the following operations:

      After the migration is complete, modify the mount points in the /etc/fstab file on the target server, as shown in the figure below. Ensure that the disk /dev/vdb on the target server is automatically mounted to the /mnt and /home/mnt_test directories.

    3. Restart the SMS-Agent.
  • Solution for bind mounts
    1. Add mount points to be excluded from migration after the tar.exclude.dir and rsync.exclude.dir parameters in the .../SMS-Agent/agent/config/g-property.cfg file in the SMS-Agent installation path on the source server.

      For example 2, if /root/bind_test/bind_mount/ is added to the end of tar.exclude.dir and rsync.exclude.dir, all files in the /root/bind_test/bind_mount/ directory will be excluded from migration and synchronization.

    2. (Optional) If you want that the target server has the same mount points as the source server after the migration is complete, perform the following operations:

      Modify the mount point information in the /etc/fstab file on the target server, as shown in the figure below. Ensure that partition /dev/vda1 on the target server is automatically mounted to the /root/bind_test/bind_mount directory.

      /    /root/bind_test/bind_mount  ext3  rw,bind 0 0

      Change the mount points based on your requirements. In the command shown in the above figure, the first item (/) is the mount directory, the second item (/root/bind_test/bind_mount) is the mount point, and the third item (ext3) is the file system type. Retain rw,bind 0 0.

    3. Restart the SMS-Agent.