Move files from mount points to actual file systems
The thing is that sometimes we have file system images and mount
point hierachies which are not aligned. Let's say, we have root
file system image, while partition scheme says that two file
systems should be created on the node: / and /var. In this case
root image has /var directory with a set of files. Obviously, we
need to move all these files from /var directory on the root
file system to /var file system because /var directory will be
used as mount point.
In order to achieve this we mount all existent file systems into
a flat set of temporary directories. We then try to find
specific paths which correspond to mount points and move all
files from these paths to corresponding file systems.
Reviewed: https:/ /review. openstack. org/310717 /git.openstack. org/cgit/ openstack/ fuel-agent/ commit/ ?id=5809a3fea96 b76386ddc4ccd36 7c21c00aa8337d
Committed: https:/
Submitter: Jenkins
Branch: master
commit 5809a3fea96b763 86ddc4ccd367c21 c00aa8337d
Author: Vladimir Kozhukalov <email address hidden>
Date: Thu Sep 17 02:24:07 2015 +0300
Move files from mount points to actual file systems
The thing is that sometimes we have file system images and mount
point hierachies which are not aligned. Let's say, we have root
file system image, while partition scheme says that two file
systems should be created on the node: / and /var. In this case
root image has /var directory with a set of files. Obviously, we
need to move all these files from /var directory on the root
file system to /var file system because /var directory will be
used as mount point.
In order to achieve this we mount all existent file systems into
a flat set of temporary directories. We then try to find
specific paths which correspond to mount points and move all
files from these paths to corresponding file systems.
Co-Authored-By: Alexey Stupnikov <email address hidden>
Change-Id: I1aa7523055ac4b cf6f8a93e9740cc f652ed35cc1
Closes-Bug: #1537699