-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ceph#31771 from idryomov/wip-krbd-read-only-test
qa: update krbd_blkroset.t and add krbd_get_features.t Reviewed-by: Dongsheng Yang <[email protected]>
- Loading branch information
Showing
3 changed files
with
97 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
journaling makes the image only unwritable, rather than both unreadable | ||
and unwritable: | ||
|
||
$ rbd create --size 1 --image-feature layering,exclusive-lock,journaling img | ||
$ rbd snap create img@snap | ||
$ rbd snap protect img@snap | ||
$ rbd clone --image-feature layering,exclusive-lock,journaling img@snap cloneimg | ||
|
||
$ DEV=$(sudo rbd map img) | ||
rbd: sysfs write failed | ||
rbd: map failed: (6) No such device or address | ||
[6] | ||
$ DEV=$(sudo rbd map --read-only img) | ||
$ blockdev --getro $DEV | ||
1 | ||
$ sudo rbd unmap $DEV | ||
|
||
$ DEV=$(sudo rbd map cloneimg) | ||
rbd: sysfs write failed | ||
rbd: map failed: (6) No such device or address | ||
[6] | ||
$ DEV=$(sudo rbd map --read-only cloneimg) | ||
$ blockdev --getro $DEV | ||
1 | ||
$ sudo rbd unmap $DEV | ||
|
||
$ rbd rm --no-progress cloneimg | ||
$ rbd snap unprotect img@snap | ||
$ rbd snap rm --no-progress img@snap | ||
$ rbd rm --no-progress img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ tasks: | |
clients: | ||
client.0: | ||
- qa/rbd/krbd_blkroset.t | ||
- qa/rbd/krbd_get_features.t |