cloudbase / wnbd

Windows Ceph RBD NBD driver
GNU Lesser General Public License v2.1
57 stars 26 forks source link

Supports mounting a single rbd with a snapshot count greater than 256 #136

Closed bluesdawn closed 3 months ago

bluesdawn commented 4 months ago

Hi, Currently found a problem, if the number of snapshots of a single rbd image exceeds 256, it can not be mounted in windows. The snapshots are in use and can't be deleted in time, is it possible to solve it with certain configuration parameters, thanks!

petrutlucian94 commented 4 months ago

Hi,

Interesting, I couldn't reproduce the issue. Here's what I tried:

rbd create test_snap --size 512M
1..280 | % { write-host "creating snap: $_" ; rbd snap create "test_snap@$_" }
rbd device map test_snap
rbd device map test_snap@280

Could you provide some more details?

Thanks, Lucian

bluesdawn commented 3 months ago

hi: windows version:10.0.19044 wrbd-wnbd version:16.2.5 (There is no suitable version, only neighboring versions can be installed) ceph version:15.2.11

Step 1: for v in seq 1 255;do rbd snap create test_pool/test.image@v$v;done for v in seq 1 255;do rbd snap protect test_pool/test.image@v$v;done rbd clone test_pool/test.image@v255 test_2_pool/test2.image.v255

windows run:

PS C:\Windows\system32>rbd map test_2_pool/test2.image.v255 (Successful) PS C:\Windows\system32>rbd-wnbd map test_2_pool/test2.image.v255 (Successful)

Then umap,Number of snapshots not exceeding 255.

Step 2: rbd snap create test_pool/test.image@v256 (Number of snapshots 256)

windows run:

PS C:\Windows\system32>rbd map test_2_pool/test2.image.v255 (error) log: 2024-03-22T00:43:19.848 6 -1 monclient(hunting): handle_auth_bad_method server allowed_methods [2] but i only support [2] 2024-03-22T00:43:49.880 1 -1 rbd-wnbd: The ceph service failed to map the image. Error: -22 rbd: rbd-wnbd failed with error: C:\Program Files\Ceph\bin\rbd-wnbd: exit status: -22

PS C:\Windows\system32>rbd-wnbd map -f test_2_pool/test2.image.v255 (error) log: 2024-03-22T00:45:10.696 1 0 ceph version 16.2.5 (0883bdea7337b95e4b611c768c0279868462204a) pacific (stable), process rbd-wnbd, pid 9312 2024-03-22T00:45:10.696 1 0 rbd-wnbd: Mapping RBD image: test_2_pool/test2.image.v255 (Waiting a long time....) 2024-03-22T01:24:52.657 1 -1 Error: (5) Access denied。 . Could not open registry key: SYSTEM\CurrentControlSet\Services\rbd-wnbd\test_2_pool/test2.image.v255

Thanks!

petrutlucian94 commented 3 months ago

Thanks for the additional information. I ran the exact same commands but it did not reproduce using the latest Ceph code.

I'll try out Ceph Pacific (v16) and see if the error shows up. For what is worth, Ceph Pacific is no longer maintained, so I suggest upgrading to a more recent version. There are Quincy and Reef installers on https://cloudbase.it/ceph-for-windows, the Squid release will also be available soon.

petrutlucian94 commented 3 months ago

I've tried Ceph Pacific but still couldn't reproduce the problem. I'll close this issue for now but please let me know if it shows up with supported Ceph versions.

By the way, the latest Ceph Pacific MSI from cloudbase.it has the 16.4.10 version, feel free to give it a try.

rbd-wnbd --version
ceph version 16.4.10 (098d1997c4537d70f04e0f68d3413458fc54fda5) pacific (stable)
bluesdawn commented 3 months ago

Thanks !!:-)