Coder Social home page Coder Social logo

cephfs-cpanel-quota's Introduction

CephFS quota for cPanel

This script brings partial compatibility for CephFS quota in cPanel. It sets up limits on home directory for every user and modifies a cPanel quota cache, so cPanel users can see actual usage of data (disk space and also inodes/files count).

Script is somehow optimized, it doesn't send a setxattr command if quota doesn't change.

Setup

  • Save file etc/ceph-quota.ini as /etc/ceph-quota.ini in Your system
  • Modify ceph-quota.ini to better resamble Your needs and configuration
  • Save cephfs-cpanel-quota as local binary i.e. in /usr/local/bin
  • Add executable permision for cephfs-cpanel-quota
  • Save cephfs-quota as local binary i.e. in /usr/local/bin
  • Add executable permision for cephfs-quota
  • Run pip/pip3 install -r /path/to/requirements.txt
  • Setup cron job for cephfs-cpanel-quota

On test machine with ~1500 users it takes 8-12 seconds to finish:

real    0m8.865s
user    0m1.090s
sys     0m0.382s

Knonw Issues

The following list is more about cPanel issues with CephFS than with this script:

  • Cleaning virtfs couses MDS to drop client connections due to hard links (Ceph MDS really doesn't like those)
  • Any operation by cPanel user that relay on creating temporary file outside of user directory would not work. For example, a full cPanel account backup which a user can create by himself will pack everything but won't save the archive in the user directory. It's coused by how CephFS handles directories with quota enabled. For Ceph it's like seperate device and cPanel tries to move result file by rename() command.

cephfs-cpanel-quota's People

Contributors

popcornpanda avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.