All Projects → cirocosta → xfsvol

cirocosta / xfsvol

Licence: other
Local Docker Volumes with XFS Project Quota

Programming Languages

go
31211 projects - #10 most used programming language
c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to xfsvol

vzvol
vzvol is a general use ZFS zvol management tool, that handles creation, destruction, listing, and formatting with various FSes, in an easy to use single program
Stars: ✭ 27 (+12.5%)
Mutual labels:  storage, xfs
carrierwave-dropbox
Carrierwave storage for Dropbox
Stars: ✭ 67 (+179.17%)
Mutual labels:  storage
ScopedStorageDemo
medium.com/better-programming/all-you-need-to-know-about-scoped-storage-in-android-10-e621f40bc8b9
Stars: ✭ 44 (+83.33%)
Mutual labels:  storage
Ionic-2-sqlite-demo
Simple demo to show how to work with Sqlite Storage in Ionic 2
Stars: ✭ 20 (-16.67%)
Mutual labels:  storage
iOS-Shared-CoreData-Storage-for-App-Groups
iOS Shared CoreData Storage for App Groups
Stars: ✭ 48 (+100%)
Mutual labels:  storage
cruise
User space POSIX-like file system in main memory
Stars: ✭ 27 (+12.5%)
Mutual labels:  storage
storage
Storage Standard
Stars: ✭ 92 (+283.33%)
Mutual labels:  storage
RunningLow
Free PowerShell script to to check for low disk space on local and network drives and send e-mail alerts when it goes under a user-defined quota.
Stars: ✭ 17 (-29.17%)
Mutual labels:  quota
storage
Go library providing common interface for working across multiple cloud storage backends
Stars: ✭ 154 (+541.67%)
Mutual labels:  storage
minio-rclone-webdav-server
A @rclone served WebDAV server with @minio as the s3 storage backend docker example
Stars: ✭ 17 (-29.17%)
Mutual labels:  storage
lvm-localpv
CSI Driver for dynamic provisioning of Persistent Local Volumes for Kubernetes using LVM.
Stars: ✭ 86 (+258.33%)
Mutual labels:  storage
modernstorage
ModernStorage is a group of libraries that provide an abstraction layer over storage on Android to simplify its interactions
Stars: ✭ 982 (+3991.67%)
Mutual labels:  storage
EDS
💡 💾 💽 A simple, intuitive and Efficient single cell binary Data Storage format
Stars: ✭ 16 (-33.33%)
Mutual labels:  storage
blobit
BlobIt - a Distributed Large Object Storage
Stars: ✭ 29 (+20.83%)
Mutual labels:  storage
S4
S4 is 100% S3 compatible storage, accessed through Tor and distributed using IPFS.
Stars: ✭ 67 (+179.17%)
Mutual labels:  storage
sqlweb
SqlWeb is an extension of JsStore which allows to use sql query for performing database operation in IndexedDB.
Stars: ✭ 38 (+58.33%)
Mutual labels:  storage
dgs19
Docker Getting Started
Stars: ✭ 22 (-8.33%)
Mutual labels:  volumes
tag-storage
🗄CNCF Storage TAG
Stars: ✭ 94 (+291.67%)
Mutual labels:  storage
file-storage-system
一个基于 Go 语言实现的分布式云存储服务,慕课网实战仿百度网盘项目。
Stars: ✭ 149 (+520.83%)
Mutual labels:  storage
miniovol
Minio Docker volume plugin. Create docker volumes that mount Minio buckets. Minio is S3 compatible.
Stars: ✭ 14 (-41.67%)
Mutual labels:  docker-plugin

xfsvol 📂

Docker Volume Plugin for managing local XFS-based volumes

Build Status

Quickstart

  1. Create a mountpoint at /mnt/xfs and a directory /mnt/xfs/volumes.

For testing purposes this mountpoint can be a loopback device (note: use a loopback device for testing purposes only).

sudo dd if=/dev/zero of=/xfs.1G bs=1M count=1024
sudo losetup /dev/loop0 /xfs.1G
sudo mkfs -t xfs -n ftype=1 /dev/loop0
sudo mkdir -p /mnt/xfs/volumes
sudo mount /dev/loop0 /mnt/xfs -o pquota
  1. Install the plugin
docker plugin install \
        --grant-all-permissions \
        --alias xfsvol \
        cirocosta/xfsvol

docker plugin ls
ID                  NAME                DESCRIPTION                                   ENABLED
06545b643c6a        xfsvol:latest       Docker plugin to manage XFS-mounted volumes   true
  1. Create a named volume
docker volume create \
        --driver xfsvol \
        --opt size=10M \
        myvolume1
  1. Run a container with the volume attached
docker run -it \
        -v myvolume1:/myvolume1 \
        alpine /bin/sh

dd if=/dev/zero of=/myvolume1/file bs=1M count=100
(fail!)
  1. Check the volumes list
docker volume ls
DRIVER              VOLUME NAME
xfsvol:latest       myvolume1 (1.004MB)
local               dockerdev-go-pkg-cache-gopath
local               dockerdev-go-pkg-cache-goroot-linux_amd64
local               dockerdev-go-pkg-cache-goroot-linux_amd64_netgo

and the xfsvolctl utility:

sudo /usr/bin/xfsvolctl ls --root /mnt/xfs/volumes/
NAME   QUOTA
ciro   1.004 MB

xfsvolctl

This tool is made to help inspect the project quotas created under a given root path as well as create/delete others. It's usage is documented under --help:

xfsvolctl --help
NAME:
   xfsvolctl - Controls the 'xfsvol' volume plugin

USAGE:
   xfsvolctl [global options] command [command options] [arguments...]

VERSION:
   0.0.0

COMMANDS:
     ls       Lists the volumes managed by 'xfsvol' plugin
     create   Creates a volume with XFS project quota enforcement
     delete   Deletes a volume managed by 'xfsvol' plugin
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version

Under the hood

$ sudo mkdir -p /mnt/xfs/tmp/bbb
$ sudo strace -f xfsvolctl create \
        --root /mnt/xfs/tmp/bbb \
        --name ccc \
        --size 1024 \
        --inode 1024

stat("/mnt/xfs/tmp/bbb", {st_mode=S_IFDIR|0755, st_size=6, ...}) = 0
unlinkat(AT_FDCWD, "/mnt/xfs/tmp/bbb/backingFsBlockDev", 0) = -1 ENOENT (No such file or directory)
mknodat(AT_FDCWD, "/mnt/xfs/tmp/bbb/backingFsBlockDev", S_IFBLK|0600, makedev(7, 0)) = 0
quotactl(Q_XSETQLIM|PRJQUOTA, "/mnt/xfs/tmp/bbb/backingFsBlockDev", 1, {version=1, flags=XFS_PROJ_QUOTA, fieldmask=0xc, id=1, blk_hardlimit=0, blk_softlimit=0, ino_hardlimit=0, ino_softlimit=0, bcount=0, icount=0, ...}) = 0
...
mkdirat(AT_FDCWD, "/mnt/xfs/tmp/bbb/ccc", 0755) = 0
open("/mnt/xfs/tmp/bbb/ccc", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFDIR|0755, st_size=6, ...}) = 0
ioctl(3, FS_IOC_FSGETXATTR, 0xc4201a95e4) = 0
ioctl(3, FS_IOC_FSSETXATTR, 0xc4201a95e4) = 0

quotactl(Q_XSETQLIM|PRJQUOTA, "/mnt/xfs/tmp/bbb/backingFsBlockDev", 2, {version=1, flags=XFS_PROJ_QUOTA, fieldmask=0xc, id=2, blk_hardlimit=2, blk_softlimit=2, ino_hardlimit=1024, ino_softlimit=1024, bcount=0, icount=0, ...}) = 0
[pid  6833] ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0


// retrieving (ls)

[pid  8609] quotactl(Q_XGETQUOTA|PRJQUOTA, "/mnt/xfs/tmp/ddd/backingFsBlockDev", 2, {version=1, flags=XFS_PROJ_QUOTA, fieldmask=0, id=2, blk_hardlimit=8, blk_softlimit=8, ino_hardlimit=0, ino_softlimit=0, bcount=8, icount=104, ...}) = 0


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].