This driver provides you next options:
loop
- simple loopback deviceqemu-nbd
- same like loopback but using qemu-nbdsheepdog
- sheepdog support (experimental)
Basicly this driver allows you to use large files on shared filesystem as vrtual drives for your containers.
It can be a necessary step if your containers have a lot of small files and you want to avoid excessive access to metadata of shared filesystem.
There is also experimental sheepdog support.
- Automatic volumes allocation and creation
- Multi-mount protection (for ext4 only)
- Checking for shared filesystem (is mounted or no)
- Kubernetes: >=1.9 version
loop mode requirements:
- Common filesystem mounted on each node in one place
qemu-nbd mode requirements:
- Common filesystem mounted on each node in one place
qemu-img
andqemu-nbd
installed in the system
sheepdog mode requirements:
- Sheepdog cluster
dog
,qemu-img
andqemu-nbd
installed in the system
- Only raw images currently supported.
- Each volume will formatted with simple file system, so only one pod can use it in r/w mode.
This command will install all the drivers on your nodes:
kubectl apply -f https://raw.githubusercontent.com/kvaps/flexvolume-qemu-nbd/master/flexvolume-qemu-nbd.yaml
There is few examples, check dir for more detail.
basic options:
kubernetes.io/fsType
- filesystem type (default:ext4
)mmp
- enable multimount protection (default:true
)size
- specify the volume size, if set driver will create volume in filesystemfsck
- run filesystem check before mount (defaulttrue
)mmpUpdateInterval
- specify the multimount protection interval (default5
)fsckOptions
- fsck options for checking filesystem (defaulta
)
loop and qemu-nbd specific options:
share
- path to your share, driver will return error if it not mounted in the systemfile
- releative path to your volume, from/
or fromshare
if set
sheepdog specific options:
vdiname
- volume name in sheepdog clusterprealloc
- preallocate all the data objectshyper
- create a hyper volumecopies
- specify the data redundancy leveladdress
- specify the sheepdog node address (defaultlocalhost
)port
- specify the sheepdog daemon portblock_size_shift
- specify the bit shift num for data object size
flexvolume-qemu-nbd
is under the Apache 2.0 license. (See the LICENSE file for details)