<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<div class="moz-cite-prefix">On 26/4/19 10:52 pm, Roland Kammerer
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:20190426125227.565vggbrzx7fxqzx@rck.sh">
<pre class="moz-quote-pre" wrap="">On Thu, Apr 25, 2019 at 11:02:55AM +1000, David wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
On 24/4/19 5:44 pm, Roland Kammerer wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">On Tue, Apr 23, 2019 at 10:22:16PM +1000, David wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">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?
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">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.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
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 :)
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
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.</pre>
</blockquote>
<p>Thanks for your continuing help.... <br>
</p>
<p>fstab has only the host's root and swap. The guest called "acc"
is represented thus:</p>
<blockquote>
<p>root@hostl1:~# ls -l /dev/drbd/by-res/acc-hda<br>
lrwxrwxrwx 1 root root 12 Apr 18 15:09 /dev/drbd/by-res/acc-hda
-> ../../drbd15</p>
<p>root@host1:~# ls -l /dev/drbd/by-disk/host1/acc-hda <br>
lrwxrwxrwx 1 root root 15 Apr 18 15:09
/dev/drbd/by-disk/host1/acc-hda -> ../../../drbd15</p>
<p>root@host1:~# ls -l /dev/drbd15<br>
brw-rw---T 1 libvirt-qemu libvirt-qemu 147, 15 Apr 27 18:42
/dev/drbd15<br>
</p>
<a class="moz-txt-link-abbreviated" href="mailto:root@host1:/etc/drbd.d#">root@host1:/etc/drbd.d#</a> cat acc-hda.res <br>
resource acc-hda {<br>
on host1 {<br>
device /dev/drbd15;<br>
disk /dev/host1/acc-hda;<br>
address 169.254.88.21:44535;<br>
meta-disk internal;<br>
}<br>
on host2 {<br>
device /dev/drbd15;<br>
disk /dev/host2/acc-hda;<br>
address 169.254.88.22:44535;<br>
meta-disk internal;<br>
}<br>
<br>
net {<br>
allow-two-primaries;<br>
}<br>
}<br>
<br>
root@host1:~# ls -l /dev/host1/acc-hda <br>
lrwxrwxrwx 1 root root 8 Apr 18 15:06 /dev/host1/acc-hda ->
../dm-14<br>
<br>
</blockquote>
<p>Am I right to assume that dm-14 being similar to the minor number
(15) is coincidence? It's not clear to me how /dev/host1/acc-hda
is set up or even what it does. Does that come from the udev rule
somehow?<br>
</p>
<p>The change I need to make is of the form "acc" to "xyz", so the
steps that make sense to me are:</p>
<blockquote>
<p>* edit acc --> xyz in /etc/drbd/acc-hda.res on BOTH hosts<br>
</p>
<p>* shutdown xyz guest on both hosts</p>
<p>* reload udev rule on both hosts <# udevadm trigger></p>
<p>* restart primary guest<br>
</p>
</blockquote>
<p>Does that look right? I would hate to make changes that cause a
crash I can't recover from.</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:20190426125227.565vggbrzx7fxqzx@rck.sh">
<pre class="moz-quote-pre" wrap="">
Regards, rck
_______________________________________________
drbd-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:drbd-user@lists.linbit.com">drbd-user@lists.linbit.com</a>
<a class="moz-txt-link-freetext" href="http://lists.linbit.com/mailman/listinfo/drbd-user">http://lists.linbit.com/mailman/listinfo/drbd-user</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
David McQuire
0418 310312</pre>
</body>
</html>