[DRBD-user] changing resource names

Roland Kammerer roland.kammerer at linbit.com
Fri Apr 26 14:52:28 CEST 2019


On Thu, Apr 25, 2019 at 11:02:55AM +1000, David wrote:
> 
> On 24/4/19 5:44 pm, Roland Kammerer wrote:
> > On Tue, Apr 23, 2019 at 10:22:16PM +1000, David wrote:
> > > Sorry if this is a newbie question.
> > > 
> > > I have a number of resources (VM's) on a two node system for which the
> > > resource names are now misleading and I would like to change them. Is it
> > > possible?
> > > 
> > > Do I just change the .res files or some other config? Do I have to shutdown
> > > all VM's and change both node configs at the same time?
> > > 
> > > I can't find any documentation how to (safely) do it.
> > > 
> > > Could anybody point me to it?
> > You created these manually, right? No plugins/drbdmanage/LINSTOR involved?
> > 
> > If so, sure, you can do that. "down" it on one side, rename it in the
> > res file, and "up" it again. Check how you used the DRBD block device.
> > Via the minor? Good. Via the udev generated symlink? You need to adapt
> > your setup.
> > 
> > And again, this is all for a manual setup. All plugins I can imagine/we
> > provide would be horribly confused if somebody changes the name
> > underneath them.
> 
> I have this udev rule:
> KERNEL=="drbd*", IMPORT{program}="/sbin/drbdadm sh-udev minor-%m",
> NAME="$env{DEVICE}", SYMLINK="drbd/by-res/$env{RESOURCE}
> drbd/by-disk/$env{DISK}"
> 
> but I admit I have no idea what to do with it :)

Looks okay. So you most likely have some /dev/drbd/by-res/resname/0
symlinks to to the actual device. And then it depends how DRBD is used.
Maybe there is a file system on top and it gets mounted as "/dev/drbd123
/mnt". Then you are fine. But if it got mounted as
"/dev/drbd/by-res/.... /mnt", then obviously you have to change that
when you rename the DRBD resource. But you have to know your system.
"/etc/fstab" is one case where it might be necessary to change the block
device.

Regards, rck


More information about the drbd-user mailing list