{"id":20703168,"url":"https://github.com/sfttech/ceph-mount","last_synced_at":"2025-04-23T00:17:20.870Z","repository":{"id":46833949,"uuid":"169606335","full_name":"SFTtech/ceph-mount","owner":"SFTtech","description":"Pure-Python CephFS mount helper","archived":false,"fork":false,"pushed_at":"2024-09-13T15:46:03.000Z","size":19,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-23T00:17:13.432Z","etag":null,"topics":["ceph","cephfs","linux","mount","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SFTtech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"liberapay":"SFTtech"}},"created_at":"2019-02-07T16:50:04.000Z","updated_at":"2025-03-29T23:46:07.000Z","dependencies_parsed_at":"2024-11-17T01:06:42.324Z","dependency_job_id":"58284d73-b52c-4a4e-bcf6-e65276a0e18b","html_url":"https://github.com/SFTtech/ceph-mount","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SFTtech%2Fceph-mount","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SFTtech%2Fceph-mount/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SFTtech%2Fceph-mount/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SFTtech%2Fceph-mount/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SFTtech","download_url":"https://codeload.github.com/SFTtech/ceph-mount/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250343960,"owners_count":21415042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ceph","cephfs","linux","mount","python"],"created_at":"2024-11-17T01:06:31.982Z","updated_at":"2025-04-23T00:17:20.844Z","avatar_url":"https://github.com/SFTtech.png","language":"Python","funding_links":["https://liberapay.com/SFTtech"],"categories":[],"sub_categories":[],"readme":"CephFS Standalone Mount Tool\n============================\n\nCephFS is part of the Linux kernel, so you don't need the userland Ceph packages installed.\n\nUsually, `/sbin/mount.ceph` is shipped by the Ceph packages written in C++.\nThis standalone pure Python implementation mimics the `mount.ceph` functionality.\n\nWith this script you can mount Ceph e.g. with systemd mount units without installing Ceph.\n\nThis tool can upload the secret key into the kernel keyring and mount your CephFS.\n\n`mount.ceph` is the \"high-level\" mount helper,\n`cephfs_mount` is the \"low-level\" tool which actually mounts.\n\n\n### Installation\n\n`mount -t ceph` really only calls `/sbin/mount.ceph`, so we need to provide that file.\n\nWay 1:\n* Clone the repo e.g. to `/opt/ceph-mount` via `git clone https://github.com/SFTtech/ceph-mount /opt/ceph-mount`\n* Symlink `/sbin/mount.ceph -\u003e /opt/ceph-mount/mount.ceph`\n\nWay 2:\n* Install `mount.ceph` and `cephfs_mount` to `/usr/bin/`\n* Symlink `/sbin/mount.ceph -\u003e /usr/bin/mount.ceph`\n\nWay 3:\n* Install `mount.ceph` and `cephfs_mount` to `/sbin/`\n\n\n### Examples\n\n`/sbin/mount.ceph` is called by `mount` when the fstype is `ceph`,\nso that's how an entry in `/etc/fstab` still makes use of this tool.\n\nLikely `mount.ceph --help` or `cephfs_mount --help` will guide you.\n\nExample `/etc/fstab` entry:\n\n```\nmon1.ceph.lol,mon2.ceph.lol,mon3.ceph.lol:/your/path /your/mountpoint ceph rw,noatime,name=your-auth-name,secretfile=/etc/ceph/ceph.client.your-auth-name.keyring,_netdev 0 0\n```\n\nExample `mount` invocation:\n\n```\nmount -t ceph -o rw,noatime,name=your-auth-name,secretfile=/etc/ceph/ceph.client.your-auth-name.keyring mon1.ceph.lol,mon2.ceph.lol,mon3.ceph.lol:/your/path /your/mountpoint\n```\n\nExample `./cephfs_mount` invocation:\n\n```\n./cephfs_mount --user your-auth-name mon1.ceph.lol,mon2.ceph.lo,mon3.ceph.lol:/path /destination\n# this looks in /etc/ceph/ceph.client.your-auth-name.keyring for the key\n# if you write :/path only, it uses the MONs from /etc/ceph/ceph.conf\n```\n\nIf in doubt, look at the source code :)\n\n#### Complete example\n\nA complete example for manual mounting by setting up the monitors in a `ceph.conf` and the secret key as a file.\n\n|ceph path | mount path | ceph name | key | monitor domain names |\n|---|---|---|---|---|\n|`/nilm`|`/home/ubuntu/nilm`|`fs.nilm`|`my-secret-key-ABCDEFG`|`monitor1.domain.com,monitor2.domain.com`|\n\n*Watch to put a space before the echo commands to not add the secrets to your terminal history.*\n\n```bash\n/home/ubuntu\u003e sudo git clone https://github.com/SFTtech/ceph-mount /opt/ceph-mount\n/home/ubuntu\u003e sudo ln -s /opt/ceph-mount/mount.ceph /sbin/mount.ceph\n/home/ubuntu\u003e sudo mkdir /etc/ceph\n/home/ubuntu\u003e  sudo echo \"my-secret-key-ABCDEFG\" \u003e /etc/ceph/nilm.keyring\n/home/ubuntu\u003e  sudo echo -e \"[global]\\nmon_host=monitor1.domain.com,monitor2.domain.com\" \u003e /etc/ceph/ceph.conf\n/home/ubuntu\u003e mkdir /home/ubuntu/nilm\n/home/ubuntu\u003e sudo mount -t ceph :/nilm /home/ubuntu/nilm -o name=fs.nilm,secretfile=/etc/ceph/nilm.keyring\n```\n\n### Contact\n\nIf you have questions, suggestions, encounter any problem,\nplease join our Matrix or IRC channel and ask!\n\n```\n#sfttech:matrix.org\nirc.freenode.net #sfttech\n```\n\n\n### License\n\nLicense: GPL version 3 (or any later version)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfttech%2Fceph-mount","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsfttech%2Fceph-mount","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfttech%2Fceph-mount/lists"}