Commit Graph

5 Commits

Author SHA1 Message Date
Mehran Kholdi
b2c4b77911 Implement STAGE_UNSTAGE_VOLUME capability
Summary: Before this, we directly mounted the the rawfile on the mountpoint. In this revision the `STAGE_UNSTAGE_VOLUME` capability is implemented, meaning that the volume is first mounted to a staging path, and then `bind`-mounted to the actual path. This way we can free up loopback devices when they are not needed.

Test Plan:
- Create a pvc, and use it inside a pod
- Run `losetup -l` on the node running the pod, and assert the creation of a loop device
- Delete the pod, but not the pvc
- Run `losetup -l` on the same node, and assert the removal of the loop device

Reviewers: h.marvi, bghadiri

Differential Revision: https://phab.hamravesh.ir/D806
2020-05-31 13:23:10 +04:30
Mehran Kholdi
9deaefc203 Implement basic metrics 2020-04-26 02:02:00 +04:30
Mehran Kholdi
c9da83b19b Setup loopback devices using Direct I/O 2020-04-26 02:01:42 +04:30
Mehran Kholdi
dcc2210b3c Handle attaching loop devices instead of handing it to mount
* So that we can pass extra loop options like Direct I/O
* To workaround an issue with loop device files not getting
automatically created
2020-04-26 02:01:42 +04:30
Mehran Kholdi
4ec6acf731 Store metadata file 2020-04-26 01:37:23 +04:30