blob: d652a1bdd0512dab7d0ebaef0b0fc427d9ae7c6f (
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
|
$ monmaptool --create mymonmap
monmaptool: monmap file mymonmap
monmaptool: generated fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
monmaptool: writing epoch 0 to mymonmap (0 monitors)
$ ORIG_FSID="$(monmaptool --print mymonmap|grep ^fsid)"
$ monmaptool --add foo 2.3.4.5:6789 mymonmap
monmaptool: monmap file mymonmap
monmaptool: writing epoch 0 to mymonmap (1 monitors)
$ monmaptool --add foo 3.4.5.6:7890 mymonmap
monmaptool: monmap file mymonmap
monmaptool: map already contains mon.foo
monmaptool -h for usage
[1]
$ monmaptool --print mymonmap
monmaptool: monmap file mymonmap
epoch 0
fsid [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} (re)
last_changed \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ (re)
created \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+ (re)
min_mon_release 0 (unknown)
0: v1:2.3.4.5:6789/0 mon.foo
$ NEW_FSID="$(monmaptool --print mymonmap|grep ^fsid)"
$ [ "$ORIG_FSID" = "$NEW_FSID" ]
|