summaryrefslogtreecommitdiffstats
path: root/qa/rbd/krbd_get_features.t
blob: 0c26e9c33231324f4d83d034b827468bd1ef75a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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 --no-progress 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