]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: in cephadm shell mount /var/lib/ceph under /srv 68756/head
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 5 May 2026 17:47:44 +0000 (13:47 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 28 May 2026 18:21:59 +0000 (14:21 -0400)
When running cephadm shell mount /var/lib/ceph at /srv/ceph unless
/var/lib/ceph is already being passed to cephadm shell -v option.
The default mount is read only. Passing it manually allows the user
to mount it in a custom location read/write.

The mount location at /srv/ceph is chosen because /var/lib/ceph is
already in use for compatibility with various ceph. The /srv tree
is currently unused by the container and serves a similar purpose
to /var/lib if you turn your head in squint a little.

Making this change enables the use of tools that want to read
files or connect to sockets in that file heirarchy. Specifically,
in this case, the ceph smb ctl tool.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadm.py

index 45cb599e6481198a4f43bdeaad1dda8c303306b6..7cf65220c803de9880d54d0a00fbd0602e813c55 100755 (executable)
@@ -3376,6 +3376,8 @@ def command_shell(ctx):
                 mounts[mount] = dst
             else:
                 mounts[mount] = '/mnt/{}'.format(filename)
+    if '/var/lib/ceph' not in mounts:
+        mounts['/var/lib/ceph'] = '/srv/ceph:ro,z'
     if ctx.command:
         command = ctx.command
     else: