Proxmox. Mount CephFS: различия между версиями
Cless (обсуждение | вклад) |
Cless (обсуждение | вклад) |
||
| Строка 8: | Строка 8: | ||
<code>mkdir /etc/pve/priv/ceph</code> | <code>mkdir /etc/pve/priv/ceph</code> | ||
Copy '''ceph.conf''' to PVE | |||
<code>scp ceph01.local:/etc/ceph/ceph.conf /etc/ceph/</code> | |||
Get user '''admin''' auth Keyring from '''Ceph server''' | Get user '''admin''' auth Keyring from '''Ceph server''' | ||
Версия 22:55, 22 мая 2023
Description
Mount CephFS device (for iso, etc.)
Install
Proxmox CLI
Create dir for the keyring
mkdir /etc/pve/priv/ceph
Copy ceph.conf to PVE
scp ceph01.local:/etc/ceph/ceph.conf /etc/ceph/
Get user admin auth Keyring from Ceph server
scp ceph01.local:/etc/ceph/ceph.client.admin.keyring /etc/ceph/
-OR-
Get user user03 auth Keyring from Ceph server
scp ceph01.local:/etc/ceph/ceph.client.user03.keyring /etc/ceph/
Proxmox Web-interface
Case 1. Root cephfs01 mount
- Datacenter - Storage - Add CephFS:
- ID: cephfs01
- Monitor(s): 192.168.199.121 192.168.199.122 192.168.199.123 # IPs of ceph nodes with MONITORs
- User name: admin
- FS Name: cephfs01
- Secret key: <key> # Get key on the Ceph Server:
cat /etc/ceph/ceph.client.admin.keyring | awk -F" = " '/key/{print $2}'
Case 2. Subdirectory cephfs01/pve mount
Remove created via web-interface Ceph Storage (like above), if you've already created it, of course.
Unmount storage via CLI manually:
umount /mnt/pve/cephfs01
Add "subdir /pve" to config file:
nano /etc/pve/storage.cfg
cephfs: cephfs01-pve
path /mnt/pve/cephfs01
content iso,snippets,backup,vztmpl
fs-name cephfs01
monhost 192.168.199.121 192.168.199.122 192.168.199.123
prune-backups keep-all=1
subdir /pve
username admin
Now there's new CephFS entry appeared in the web-interface. Enable it!
Populate keyring to other PVE hosts (if you have a PVE cluster)
scp /etc/ceph/ceph.client.user03.keyring pve02:/etc/ceph/
scp /etc/ceph/ceph.client.user03.keyring pve03:/etc/ceph/