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

Материал из Wiki
Перейти к навигации Перейти к поиску
(Новая страница: «== Description == Mount CephFS device (for iso, etc.) === Proxmox CLI === Get user admin auth Keyring from Ceph server <code>mkdir /etc/pve/priv/ceph</code> <c...»)
 
 
(не показано 6 промежуточных версий этого же участника)
Строка 1: Строка 1:
== Description ==
= Description =
Mount CephFS device (for iso, etc.)
Mount CephFS device (for iso, etc.)


=== Proxmox CLI ===
= Install =
Get user admin auth Keyring from Ceph server
 
== Proxmox prerequisites ==
 
=== For '''Debian 10''' + '''PVE 6.x''' ===
Create dir for the keyring
 
<code>mkdir /etc/pve/priv/ceph</code>
 
=== For '''Debian 11''' + '''PVE 7.4-3''' ===
<blockquote>https://forum.proxmox.com/threads/ceph-migrations-are-failing.67671/
 
https://pve.proxmox.com/wiki/Package_Repositories#sysadmin_package_repositories_ceph</blockquote>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>
Create repo list


=== Proxmox Web-interface ===
<code>nano /etc/apt/sources.list.d/ceph.list</code>
deb <nowiki>http://download.proxmox.com/debian/ceph-quincy</nowiki> bullseye test
Update and upgrade ('''ceph-common''' will be installed)


<code>apt-get update && apt-get upgrade -y</code>
<code>apt-get dist-upgrade</code>
== Proxmox CephFS add ==
=== Case 1. Root '''cephfs01''' mount ===
Copy ceph.conf to PVE
<code>scp ceph01.local:/etc/ceph/ceph.conf /etc/ceph/</code>
Get user admin auth Keyring from Ceph server
<code>scp ceph01.local:/etc/ceph/ceph.client.admin.keyring /etc/ceph/</code>
* Datacenter - Storage - Add CephFS:
* Datacenter - Storage - Add CephFS:
*   ID: '''cephfs01'''
** ID: '''cephfs01'''
*   Monitor(s): '''192.168.199.121 192.168.199.122 192.168.199.123'''  # IPs of ceph nodes with MONITORs
** Monitor(s): '''192.168.199.121 192.168.199.122 192.168.199.123'''  # IPs of ceph nodes with MONITORs
*   User name: '''admin'''
** User name: '''admin'''
* FS Name: '''cephfs01'''
** FS Name: '''cephfs01'''
* 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>
 
=== Case 2. Subdirectory '''cephfs01/pve''' mount ===
Copy ceph.conf to PVE
 
<code>scp ceph01.local:/etc/ceph/ceph.conf /etc/ceph/</code>
 
Get user '''pve''' auth Keyring from Ceph server
 
<code>scp ceph01.local:/etc/ceph/ceph.client.pve.keyring /etc/ceph/</code>
 
Remove created via web-interface Ceph Storage (like above), if you've already created it, of course.
 
Unmount storage via CLI manually:
 
<code>umount  /mnt/pve/cephfs01</code>
 
Add "'''''subdir /pve"''''' to config file:
 
<code>nano /etc/pve/storage.cfg</code>
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)
 
<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]]
__ОБЯЗАТЕЛЬНОЕ_ОГЛАВЛЕНИЕ__
__ОБЯЗАТЕЛЬНОЕ_ОГЛАВЛЕНИЕ__

Текущая версия на 00:15, 23 мая 2023

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/