moana icon indicating copy to clipboard operation
moana copied to clipboard

Block Sub-Volume support

Open aravindavk opened this issue 3 years ago • 1 comments

Add support for Block Subvols(Create a Block file and mount as loop dev)

Create

kadalu subvol create <volname>/<subvol-name> size <size> --virtblock

Example:

kadalu subvol create myvol/photos size 10G --virtblock
  • Mount the Volume if not mounted.(Predictable directory say /mnt/<volname>)
  • Truncate the file to the required size.
  • Store info within the Volume
  • Create xfs filesystem

Delete

kadalu subvol delete <volname>/<subvol-name>

Archive

kadalu subvol archive <volname>/<subvol-name>

Expand

kadalu subvol expand <volname>/<subvol-name> size <new-size>

Info

kadalu subvol info [--status] [<volname>]

Mount

Enhance the mount script to support mounting the subvol.

  • Mount the Main Volume if not mounted
  • Mount the block device to the requested path
mount -t kadalu <host>:/subvols/<volname>@<subvol-name> <mount-path>

aravindavk avatar Oct 29 '21 06:10 aravindavk