How Do I Fix Error "SMS.1353: Bind mount or repeated mount detected on /xxx of the source server" When I Fail to Start the Agent on a Linux 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 is mounted on multiple directories. For example, disk /dev/vda1 is mounted on both the root directory / and the /home/mnt_test directory.
A bind mount indicates that the directory where a disk or partition is mounted on another directory. For example, disk /dev/vda1 is mounted on the root directory /, and the root directory / is mounted on the /root/bind_test/bind_mount directory.
The common features of repeated mounts and bind mounts are as follows:
- If the data in a mounted directory changes, the changes will be synchronized to other mounted 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
- 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 root directory / and the /home/mnt_test directory.
- The SMS-Agent uses df -TH to determine how much data is on the source server. As shown in the following figure, even if there are two mount points, only one of them will be returned by df -TH. However, because of the two mount points, the data in /dev/vda1 gets migrated twice and the amount of data displayed on the SMS console (which relies on df -TH) is less than the amount of data actually migrated.
- 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.
- 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 root directory / and the /home/mnt_test directory.
- Possible cause 2: Bind mounts
Check Method
- 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.
- Run df -TH on the source server. The command output shows that only one mount point can be returned.
- 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.
- 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.
Solutions
- Solution for repeated mounts
- 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 directory where the SMS-Agent is installed on the source server.
In 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.
- (Optional) If you want that the target server has the same mounted directories as the source server after the migration is complete, perform the following operations:
After the migration is complete, modify the mounted directories 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.
- Restart the SMS-Agent.
- 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 directory where the SMS-Agent is installed on the source server.
- Solution for bind mounts
- 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.
In 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.
- (Optional) If you want that the target server has the same mounted directories as the source server after the migration is complete, perform the following operations:
After the migration is complete, modify the mounted directories 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 directories and 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.
- Restart the SMS-Agent.
- 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot