Proxmox. Mount CephFS: различия между версиями

Материал из Wiki
Перейти к навигации Перейти к поиску
Строка 5: Строка 5:


== Proxmox CLI ==
== Proxmox CLI ==
Get user admin auth Keyring from Ceph server
Create dir for the keyring


<code>mkdir /etc/pve/priv/ceph</code>
<code>mkdir /etc/pve/priv/ceph</code>


<code>scp ceph01.local:/etc/ceph/ceph.client.admin.keyring /etc/pve/priv/ceph/ceph-rbd01.keyring</code>
Get user '''admin''' auth Keyring from '''Ceph server'''
 
<code>scp ceph01.local:/etc/ceph/'''ceph.client.admin.keyring''' /etc/ceph/</code>
 
'''''-OR-'''''
 
Get user '''user03''' auth Keyring from '''Ceph server'''
 
<code>scp ceph01.local:/etc/ceph/'''ceph.client.user03.keyring''' /etc/ceph/</code>


== Proxmox Web-interface ==
== Proxmox Web-interface ==


=== Root '''cephfs01''' mount ===
=== Case 1. Root '''cephfs01''' mount ===
* Datacenter - Storage - Add CephFS:
* Datacenter - Storage - Add CephFS:
** ID: '''cephfs01'''
** ID: '''cephfs01'''
Строка 21: Строка 29:
** Secret key: '''<key>''' # Get key on the Ceph Server: <code>cat /etc/ceph/ceph.client.admin.keyring | awk -F" = " '/key/{print $2}'</code>
** Secret key: '''<key>''' # Get key on the Ceph Server: <code>cat /etc/ceph/ceph.client.admin.keyring | awk -F" = " '/key/{print $2}'</code>


=== Subdirectory '''cephfs01/pve''' mount ===
=== Case 2. Subdirectory '''cephfs01/pve''' mount ===
Disable created via web-interface Ceph Storage (like above)
Remove created via web-interface Ceph Storage (like above), if you've already created it, of course.


Unmount stoarage via CLI manually:
Unmount storage via CLI manually:


<code>umount  /mnt/pve/cephfs01</code>
<code>umount  /mnt/pve/cephfs01</code>
Строка 31: Строка 39:


<code>nano /etc/pve/storage.cfg</code>
<code>nano /etc/pve/storage.cfg</code>
  cephfs: cephfs01
  cephfs: cephfs01-pve
         path /mnt/pve/cephfs01
         path /mnt/pve/cephfs01
         content iso,snippets,backup,vztmpl
         content iso,snippets,backup,vztmpl
Строка 39: Строка 47:
         '''''subdir /pve'''''
         '''''subdir /pve'''''
         username admin
         username admin
Enable created via web-interface Ceph Storage
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)
 
<code>scp /etc/ceph/ceph.client.user03.keyring pve02:/etc/ceph/</code>
 
<code>scp /etc/ceph/ceph.client.user03.keyring pve03:/etc/ceph/</code>
[[Категория:Proxmox]]
[[Категория:Proxmox]]
[[Категория:Ceph]]
[[Категория:Ceph]]
__ОБЯЗАТЕЛЬНОЕ_ОГЛАВЛЕНИЕ__
__ОБЯЗАТЕЛЬНОЕ_ОГЛАВЛЕНИЕ__

Версия 22:22, 12 мая 2023

Description

Mount CephFS device (for iso, etc.)

Install

Proxmox CLI

Create dir for the keyring

mkdir /etc/pve/priv/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/