Proxmox. Mount CephFS

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

Description

Mount CephFS device (for iso, etc.)

Install

Proxmox prerequisites

For Debian 10 + PVE 6.x

Create dir for the keyring

mkdir /etc/pve/priv/ceph

For Debian 11 + PVE 7.4-3

https://forum.proxmox.com/threads/ceph-migrations-are-failing.67671/ https://pve.proxmox.com/wiki/Package_Repositories#sysadmin_package_repositories_ceph

Create dir for the keyring

mkdir /etc/pve/priv/ceph

Create repo list

nano /etc/apt/sources.list.d/ceph.list

deb http://download.proxmox.com/debian/ceph-quincy bullseye test

Update and upgrade (ceph-common will be installed)

apt-get update && apt-get upgrade -y

apt-get dist-upgrade

Proxmox CephFS add

Case 1. Root cephfs01 mount

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/

  • 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

Copy ceph.conf to PVE

scp ceph01.local:/etc/ceph/ceph.conf /etc/ceph/

Get user pve auth Keyring from Ceph server

scp ceph01.local:/etc/ceph/ceph.client.pve.keyring /etc/ceph/

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 pve

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/