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/318237 /git.openstack. org/cgit/ openstack/ fuel-agent/ commit/ ?id=dacf3d99873 fb298570d65dbfc 8e31a7a68786dd
Committed: https:/
Submitter: Jenkins
Branch: stable/mitaka
commit dacf3d99873fb29 8570d65dbfc8e31 a7a68786dd
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 86ddc4ccd367c21 c00aa8337d)
Closes-Bug: #1537699
(cherry picked from commit 5809a3fea96b763