blob: 844643baedb51ab8a00944166e5fbc5c2a3ca86b (
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
32
33
34
35
36
37
38
39
40
|
$ rbd create --size 20M img
$ DEV=$(sudo rbd map img)
$ blockdev --getiomin $DEV
65536
$ blockdev --getioopt $DEV
65536
$ cat /sys/block/${DEV#/dev/}/queue/discard_granularity
65536
$ sudo rbd unmap $DEV
$ DEV=$(sudo rbd map -o alloc_size=512 img)
$ blockdev --getiomin $DEV
512
$ blockdev --getioopt $DEV
512
$ cat /sys/block/${DEV#/dev/}/queue/discard_granularity
512
$ sudo rbd unmap $DEV
$ DEV=$(sudo rbd map -o alloc_size=4194304 img)
$ blockdev --getiomin $DEV
4194304
$ blockdev --getioopt $DEV
4194304
$ cat /sys/block/${DEV#/dev/}/queue/discard_granularity
4194304
$ sudo rbd unmap $DEV
$ DEV=$(sudo rbd map -o alloc_size=8388608 img)
$ blockdev --getiomin $DEV
4194304
$ blockdev --getioopt $DEV
4194304
$ cat /sys/block/${DEV#/dev/}/queue/discard_granularity
4194304
$ sudo rbd unmap $DEV
$ rbd rm --no-progress img
|