User Tools

Site Tools


services:cephfs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
services:cephfs [2025/12/17 14:13]
pdonnell [Mounting all Sepia CephFS file systems]
services:cephfs [2025/12/17 14:53] (current)
pdonnell [Mounting all Sepia CephFS file systems]
Line 13: Line 13:
  
 <code bash> <code bash>
 +
 sudo mkdir -p -m 755 /etc/ceph sudo mkdir -p -m 755 /etc/ceph
 ssh doli01.front.sepia.ceph.com 'env CEPH_KEYRING=/​etc/​ceph/​client.sepian.keyring ceph --id sepian config generate-minimal-conf'​ | sudo tee /​etc/​ceph/​ceph.conf ssh doli01.front.sepia.ceph.com 'env CEPH_KEYRING=/​etc/​ceph/​client.sepian.keyring ceph --id sepian config generate-minimal-conf'​ | sudo tee /​etc/​ceph/​ceph.conf
 sudo chmod 644 /​etc/​ceph/​ceph.conf sudo chmod 644 /​etc/​ceph/​ceph.conf
-ssh doli01.front.sepia.ceph.com 'cat /​etc/​ceph/​client.sepian.keyring'​ | sudo tee /​etc/​ceph/​client.sepian.keyring+ssh doli01.front.sepia.ceph.com 'cat /​etc/​ceph/​client.sepian.keyring'​ | sudo tee /​etc/​ceph/​client.sepian.keyring | sudo tee -a /etc/ceph/keyring
 sudo chmod 644 /​etc/​ceph/​client.sepian.keyring sudo chmod 644 /​etc/​ceph/​client.sepian.keyring
 ssh doli01.front.sepia.ceph.com '​ceph-authtool /​etc/​ceph/​client.sepian.keyring -n client.sepian -p' | sudo tee /​etc/​ceph/​client.sepian.secret ssh doli01.front.sepia.ceph.com '​ceph-authtool /​etc/​ceph/​client.sepian.keyring -n client.sepian -p' | sudo tee /​etc/​ceph/​client.sepian.secret
Line 25: Line 26:
  
 ==== Mounting all Sepia CephFS file systems ==== ==== Mounting all Sepia CephFS file systems ====
 +
 +**Note**: you need the ''​mount.ceph''​ program installed to use this mount syntax. It is usually part of the ''​ceph-common''​ package.
  
 Generate mounts for your ''/​etc/​fstab''​ using the script below. Copy it locally, mark it executable, and run: Generate mounts for your ''/​etc/​fstab''​ using the script below. Copy it locally, mark it executable, and run:
Line 30: Line 33:
 <code bash> <code bash>
 #!/bin/bash #!/bin/bash
 +
 +set -ex
  
 function genmount { function genmount {
Line 35: Line 40:
   local mntpnt="​$2"​   local mntpnt="​$2"​
   local fsname="​$3"​   local fsname="​$3"​
-  ​+ 
   local secret=$(sudo cat /​etc/​ceph/​client.sepian.secret)   local secret=$(sudo cat /​etc/​ceph/​client.sepian.secret)
   # create mountpoint   # create mountpoint
-  sudo mkdir -p -- "$2"+  sudo mkdir -p -- "$mntpnt" ​|| true
   # make the mountpoint directory (shadowed) unwriteable to prevent accidental modification   # make the mountpoint directory (shadowed) unwriteable to prevent accidental modification
-  sudo chmod 000 -- "$2"+  sudo chmod 000 -- "$mntpnt" ​|| true
   # set it immutable to enforce that even for root   # set it immutable to enforce that even for root
-  sudo chattr +i -- "$2+  sudo chattr +i -- "$mntpnt" ​|| true 
-  printf '​sepian@b6f4aaad-d45d-11f0-b949-905a08286547.%s=%s\t%s\tceph\t_netdev\t0\t0'​ "$path" "$mntpnt" "$fsname"+  printf '​sepian@b6f4aaad-d45d-11f0-b949-905a08286547.%s=%s\t%s\tceph\t_netdev\t0\t0\n' "$fsname" "$path" "$mntpnt"
 } }
 + 
 genmount /​teuthology-archive /teuthology teuthology | sudo tee -a /etc/fstab genmount /​teuthology-archive /teuthology teuthology | sudo tee -a /etc/fstab
 genmount / /scratch scratch | sudo tee -a /etc/fstab genmount / /scratch scratch | sudo tee -a /etc/fstab
-genmount / /postfile postfile | sudo tee -a /etc/fstab 
 </​code>​ </​code>​
  
services/cephfs.1765980832.txt.gz · Last modified: 2025/12/17 14:13 by pdonnell