Proxmox. Mount Ceph RBD image: различия между версиями
Cless (обсуждение | вклад) |
Cless (обсуждение | вклад) |
||
| Строка 13: | Строка 13: | ||
<code>scp ceph01.local:/etc/ceph/ceph.client.admin.keyring /etc/pve/priv/ceph/ceph-rbd01.keyring</code> | <code>scp ceph01.local:/etc/ceph/ceph.client.admin.keyring /etc/pve/priv/ceph/ceph-rbd01.keyring</code> | ||
And also copy files to '''/etc/ceph/'''. Otherwise RBD may not work correctly - you couldn't see RBD info at PVE serv in that case | |||
<code>scp ceph01.local:/etc/ceph/ceph.client.admin.keyring /etc/ceph/</code> | |||
<code>scp ceph01.local:/etc/ceph/ceph.conf /etc/ceph/</code> | |||
=== Proxmox Web-interface === | === Proxmox Web-interface === | ||
| Строка 23: | Строка 29: | ||
**Keyring: '''<key>''' # Get keyring on the Ceph Server: <code>cat /etc/ceph/ceph.client.admin.keyring</code> | **Keyring: '''<key>''' # Get keyring on the Ceph Server: <code>cat /etc/ceph/ceph.client.admin.keyring</code> | ||
== Show RBD | == Show RBD info. '''You can see it in the terminal of the Ceph Server AND in the PVE terminal''' == | ||
=== RBD info === | === RBD info === | ||
| Строка 37: | Строка 43: | ||
vm-100-disk-0 | vm-100-disk-0 | ||
=== | == Snapshots == | ||
<blockquote>'''! IMPORTANT !''' | |||
Snapshots work correctly ONLY if you create them WITH "'''Include RAM'''" CHECK. In this case you can create and rollback to created Snapshot. | |||
Snapshot WITH NO "'''Include RAM'''" CHECK during creation rollback to previous Snapshot, that have RAM. | |||
I have no idea why it happens. Maybe PVE or Ceph bug. Do something with that!</blockquote> | |||
=== RBD Snapshots with NO "'''Include RAM'''" Check. They DON'T rollback correctly === | |||
<code>rbd snap ls vm-100-disk-0 -p rbd01</code> | <code>rbd snap ls vm-100-disk-0 -p rbd01</code> | ||
SNAPID NAME SIZE PROTECTED TIMESTAMP | SNAPID NAME SIZE PROTECTED TIMESTAMP | ||
4 clean 5 GiB Mon Sep 12 12:03:18 2022 | 4 clean 5 GiB Mon Sep 12 12:03:18 2022 | ||
=== RBD Snapshots WITH "'''Include RAM'''" Check. They rollback correctly === | |||
<code>rbd ls -l rbd01</code> | |||
NAME SIZE PARENT FMT PROT LOCK | |||
vm-100-disk-0 5 GiB 2 excl | |||
vm-100-disk-0@clean 5 GiB 2 | |||
vm-100-disk-0@s456_ready 5 GiB 2 | |||
vm-100-state-clean 442 MiB 2 | |||
vm-100-state-s456_ready 443 MiB 2 | |||
[[Категория:Proxmox]] | [[Категория:Proxmox]] | ||
[[Категория:Ceph]] | [[Категория:Ceph]] | ||
__ОБЯЗАТЕЛЬНОЕ_ОГЛАВЛЕНИЕ__ | __ОБЯЗАТЕЛЬНОЕ_ОГЛАВЛЕНИЕ__ | ||
Версия 23:17, 12 сентября 2022
Description
Mount Ceph RBD device (for VM disks and Containers)
Yes, Snapshots snapshots are supported
Links
https://pve.proxmox.com/wiki/Storage:_RBD
Proxmox CLI
Get user admin auth Keyring from Ceph server
mkdir /etc/pve/priv/ceph
scp ceph01.local:/etc/ceph/ceph.client.admin.keyring /etc/pve/priv/ceph/ceph-rbd01.keyring
And also copy files to /etc/ceph/. Otherwise RBD may not work correctly - you couldn't see RBD info at PVE serv in that case
scp ceph01.local:/etc/ceph/ceph.client.admin.keyring /etc/ceph/
scp ceph01.local:/etc/ceph/ceph.conf /etc/ceph/
Proxmox Web-interface
- Datacenter - Storage - Add RBD:
- ID: ceph-rbd01
- Pool: rbd01
- Monitor(s): 192.168.199.121 192.168.199.122 192.168.199.123 # IPs of ceph nodes with MONITORs
- User name: admin
- Keyring: <key> # Get keyring on the Ceph Server:
cat /etc/ceph/ceph.client.admin.keyring
Show RBD info. You can see it in the terminal of the Ceph Server AND in the PVE terminal
RBD info
RBD pools info
ceph osd lspools
1 .mgr 2 cephfs01_data 3 cephfs01_metadata 4 rbd01
rbd ls -p rbd01
ceph-rbd01 vm-100-disk-0
Snapshots
! IMPORTANT !
Snapshots work correctly ONLY if you create them WITH "Include RAM" CHECK. In this case you can create and rollback to created Snapshot.
Snapshot WITH NO "Include RAM" CHECK during creation rollback to previous Snapshot, that have RAM.
I have no idea why it happens. Maybe PVE or Ceph bug. Do something with that!
RBD Snapshots with NO "Include RAM" Check. They DON'T rollback correctly
rbd snap ls vm-100-disk-0 -p rbd01
SNAPID NAME SIZE PROTECTED TIMESTAMP 4 clean 5 GiB Mon Sep 12 12:03:18 2022
RBD Snapshots WITH "Include RAM" Check. They rollback correctly
rbd ls -l rbd01
NAME SIZE PARENT FMT PROT LOCK vm-100-disk-0 5 GiB 2 excl vm-100-disk-0@clean 5 GiB 2 vm-100-disk-0@s456_ready 5 GiB 2 vm-100-state-clean 442 MiB 2 vm-100-state-s456_ready 443 MiB 2