[SOLVED] Is it possible to mount ceph snapshot (for backup with borg)?

atec666

Member
Mar 8, 2019
136
4
18
Issoire
I'm near .... but :

#rbd snap ls cephPool1/vm-106-disk-0
==>
SNAPID NAME SIZE TIMESTAMP
32 Backup28102019 32GiB Mon Oct 28 19:46:00 2019

Then
#rbd map --read-only cephPool1/vm-106-disk-0@Backup28102019
==>
/dev/rbd3

# rbd showmapped
id pool image snap device
0 cephPool1 vm-101-disk-0 - /dev/rbd0
1 cephPool1 vm-106-disk-0 - /dev/rbd1
2 cephPool1 vm-107-disk-0 - /dev/rbd2
3 cephPool1 vm-106-disk-0 Backup28102019 /dev/rbd3


And finaly :
mount /dev/rbd3 /mnt/borg .....
==>
# mount /dev/rbd/cephPool1/vm-106-disk-0@Backup28102019 /mnt/borg/
mount: /dev/rbd3 is write protected, ans will b e mount in read only (OK ! good)
mount: impossible to mount /dev/rbd3 in read only (ouchhhhhh !!!)

dmesg|tail
==>
[1342340.220678] EXT4-fs (rbd3): Unrecognized mount option "nouuid" or missing value
[1342354.756600] EXT4-fs (rbd3): Unrecognized mount option "nouuid" or missing value
[1342407.463896] EXT4-fs (rbd3): INFO: recovery required on readonly filesystem
[1342407.463898] EXT4-fs (rbd3): write access unavailable, cannot proceed (try mounting with noload)
[1342864.427501] rbd: rbd3: capacity 34359738368 features 0x1
[1342873.906068] EXT4-fs (rbd3): INFO: recovery required on readonly filesystem
[1342873.906070] EXT4-fs (rbd3): write access unavailable, cannot proceed (try mounting with noload)
[1343242.451830] rbd: rbd3: capacity 34359738368 features 0x1
[1343285.621429] EXT4-fs (rbd3): INFO: recovery required on readonly filesystem
[1343285.621430] EXT4-fs (rbd3): write access unavailable, cannot proceed (try mounting with noload)


Failed !!!

Why ?
 
mount: impossible to mount /dev/rbd3 in read only (ouchhhhhh !!!)
The mount may need some options, eg. to not replay journal.
 
Or this is a Proxmox issue while mounting ceph rbd snapshot ? (from CT )
How so? You mapped and mounted the rbd by hand. This is not related to our tooling, but in principle, our tooling does the same thing.
# mount /dev/rbd/cephPool1/vm-106-disk-0@Backup28102019 /mnt/borg/
Is that the exact mount command?
[1342340.220678] EXT4-fs (rbd3): Unrecognized mount option "nouuid" or missing value
This seems to suggest that there have been mount options set.
[1342407.463898] EXT4-fs (rbd3): write access unavailable, cannot proceed (try mounting with noload)
Did you try to specify the -o noload option?
 
@Alwin : thank you, your are the chief !, your option did the job ;-)
So for doing backup with Borgbackup (never do snapshot with rbd directlry ... because CT -LXC- conf while be false after doing that ... !!!):

  • mkdir -p /mnt/borg/<CT_ID>
  • pct snapshot <CT_ID> BorgSnap_date --description “CT SnapShot for BorgBackup”
  • (verify command) : pct listsnapshot <CT_ID>
  • rbd map --read-only cephPool/vm-id-disk-x@BorgSnap_date
  • (verify command) : rbd showmapped
  • mount -o noload /dev/rbd/cephPool/vm-id-disk-x@BorgSnap_date /mnt/borg/<CT_ID>
  • (verify command) : ls -alh /mnt/borg/<CT_ID>
  • umount /mnt/borg/<CT_ID>
  • sync
  • rbd unmap cephPool/vm-id-disk-x@BorgSnap_date
  • sync
  • (verify command) : rbd showmapped ==> snapshot must not be listed !
  • pct delsnapshot <CT_ID> BorgSnap_date ==> BIEN LIBERER les SNAPSHOT (sinon souci!)
  • sync
  • pct listsnapshot <CT_ID>
 
  • umount /mnt/borg/<CT_ID>
  • sync
Better use sync -f <file> (see man sync). The sync is global and forces all filesystems (mounted) to flush outstanding writes.

  • rbd unmap cephPool/vm-id-disk-x@BorgSnap_date
  • sync
  • (verify command) : rbd showmapped ==> snapshot must not be listed !
  • pct delsnapshot <CT_ID> BorgSnap_date ==> BIEN LIBERER les SNAPSHOT (sinon souci!)
  • sync
Why these syncs? The snapshot is read only mapped and the snapshot is deleted on Ceph, no filesystem involved.
 
Better use sync -f <file> (see man sync). The sync is global and forces all filesystems (mounted) to flush outstanding writes.


Why these syncs? The snapshot is read only mapped and the snapshot is deleted on Ceph, no filesystem involved.
Thank you alwin.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!