Hi, Tommi: What I see is like this.
lrwxrwxrwx 1 root root 10 2011-12-07 16:48 foo1:0 -> ../../rbd0 lrwxrwxrwx 1 root root 10 2011-12-07 16:50 foo2:1 -> ../../rbd1 The extra number (:0 and :1) behind the image name make the problem still exists. -----Original Message----- From: Tommi Virtanen [mailto:[email protected]] Sent: Thursday, December 08, 2011 1:31 AM To: Eric YH Chen/WHQ/Wistron Cc: [email protected]; Chris YT Huang/WHQ/Wistron Subject: Re: rbd device would disappear after re-boot On Tue, Dec 6, 2011 at 18:38, <[email protected]> wrote: > I have another little question. Could I map specific image to specific device? > > For example: > Before re-boot > id pool image snap device > 0 rbd foo1 - /dev/rbd0 > 1 rbd foo3 - /dev/rbd2 > > How could I re-map the image(foo3) to device(/dev/rbd2) but skip rbd1? The > command provided by ceph CLI cannot achieve this. > > If I re-map the image to another device, it would not sync with iSCSI > configuration and may cause problem. I'm just confirming what Damien said. Don't rely on the numbering to be consistent even from one boot to another; we provide a udev helper that assigns more permanent names, based on the pool, image name, and potentially snapshot name. You'll get a symlink like /dev/rbd/POOL/IMAGE or /dev/rbd/POOL/IMAGE@SNAP, use that name.
