Proxmox. Mount CephFS: различия между версиями
Cless (обсуждение | вклад) |
Cless (обсуждение | вклад) |
||
| (не показана 1 промежуточная версия этого же участника) | |||
| Строка 4: | Строка 4: | ||
= Install = | = Install = | ||
== Proxmox | == Proxmox prerequisites == | ||
=== For '''Debian 10''' + '''PVE 6.x''' === | |||
Create dir for the keyring | Create dir for the keyring | ||
<code>mkdir /etc/pve/priv/ceph</code> | <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> | |||
Create repo list | |||
''' | <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> | <code>apt-get dist-upgrade</code> | ||
== Proxmox | == Proxmox CephFS add == | ||
=== Case 1. Root '''cephfs01''' mount === | === 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''' | ||
| Строка 34: | Строка 46: | ||
=== Case 2. Subdirectory '''cephfs01/pve''' mount === | === 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. | Remove created via web-interface Ceph Storage (like above), if you've already created it, of course. | ||
| Строка 50: | Строка 70: | ||
prune-backups keep-all=1 | prune-backups keep-all=1 | ||
'''''subdir /pve''''' | '''''subdir /pve''''' | ||
username | username '''pve''' | ||
Now there's new CephFS entry appeared in the web-interface. Enable it! | Now there's new CephFS entry appeared in the web-interface. Enable it! | ||
Текущая версия на 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/