Closed hradec closed 4 years ago
using pre-mount-cmd and pre-umount-cmd, we can make mcachefs mount the source folder automatically when it's mounted, and umount the source folder once mcachefs is umounted.
For example: mcachefs -o pre-mount-cmd='mkdir -p /source_folder ; sshfs :/source_folder /source_folder', pre-umount-cmd='sudo umount /source_folder ; rmdir /source_folder' /source_folder /backed_folder
this enables mcachefs to be used with autofs smoothly.
todo: add post-mount-cmd to execute a cmd right after mcachefs has being mounted. For example, "echo flush_metadata > /backed_fs/.mcachefs/action"
using pre-mount-cmd and pre-umount-cmd, we can make mcachefs mount the source folder automatically when it's mounted, and umount the source folder once mcachefs is umounted.
For example: mcachefs -o pre-mount-cmd='mkdir -p /source_folder ; sshfs:/source_folder /source_folder', pre-umount-cmd='sudo umount /source_folder ; rmdir /source_folder' /source_folder /backed_folder
this enables mcachefs to be used with autofs smoothly.
todo: add post-mount-cmd to execute a cmd right after mcachefs has being mounted. For example, "echo flush_metadata > /backed_fs/.mcachefs/action"