mirror of
https://github.com/ceph/ceph
synced 2024-12-17 00:46:05 +00:00
e58413abf4
When called with a "map" parameter, the rbdmap script iterates the list of images present in RBDMAPFILE (/etc/ceph/rbdmap), and maps each entry. When called with "unmap", rbdmap currently iterates *all* mapped RBD images and unmaps each one, regardless of whether it's listed in the RBDMAPFILE or not. This commit adds functionality such that only RBD images listed in the configuration file are unmapped. This behaviour is the new default for "rbdmap unmap". A new "unmap-all" parameter is added to offer the old unmap-all-rbd-images behaviour, which is used by the systemd service. Fixes: http://tracker.ceph.com/issues/18884 Signed-off-by: David Disseldorp <ddiss@suse.de>
18 lines
379 B
Desktop File
18 lines
379 B
Desktop File
[Unit]
|
|
Description=Map RBD devices
|
|
|
|
After=network-online.target local-fs.target
|
|
Wants=network-online.target local-fs.target
|
|
|
|
[Service]
|
|
EnvironmentFile=-/etc/sysconfig/ceph
|
|
Environment=RBDMAPFILE=/etc/ceph/rbdmap
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart=/usr/bin/rbdmap map
|
|
ExecReload=/usr/bin/rbdmap map
|
|
ExecStop=/usr/bin/rbdmap unmap-all
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|