<div><div dir="auto"><span style="color:rgb(49,49,49);word-spacing:1px">/dev/host1/acc-hda is the backing storage device where drbd writes the data for the resource acc-hda.res .</span><br></div><div dir="auto"><div dir="auto">The type of storage can be any form of raw block device, like for example a disk partition (/dev/sdd1) or a lvm volume (/dev/vg/lv)...or something else similar.</div><div dir="auto">In your case /dev/host1/acc-hda represents a lvm logical volume called "acc-hda" which resides in the volume group "host1".</div><div dir="auto">To verify if this is the case, you can issue "pvs", "vgs", "lvs" . If "acc-hda" shows up in there, then that's the case...</div><div dir="auto">To rename the logical volume you can use "lvrename" command. Make sure you bring down the drbd resource first, before doing that. Do this one on the secondary node first (i.e host2).</div><div dir="auto">Once you rename LV, update drbd resource file with the new name and finally bring up the resource. You need to update ".res" file on both nodes, but only the section which refers to the secondary node (host2).</div><div dir="auto">Once resource is up and running, repeat same steps on the primary node (host1).</div><div dir="auto"><br></div><div dir="auto">Gianni</div><div dir="auto"><br></div><div dir="auto"><br></div></div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 28 Apr 2019 at 03:13, David <<a href="mailto:david@kenpro.com.au">david@kenpro.com.au</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"></div><div text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<div class="m_6317760977172185877moz-cite-prefix">On 26/4/19 10:52 pm, Roland Kammerer
wrote:<br>
</div>
<blockquote type="cite">
<pre class="m_6317760977172185877moz-quote-pre">On Thu, Apr 25, 2019 at 11:02:55AM +1000, David wrote:
</pre>
<blockquote type="cite">
<pre class="m_6317760977172185877moz-quote-pre">On 24/4/19 5:44 pm, Roland Kammerer wrote:
</pre>
<blockquote type="cite">
<pre class="m_6317760977172185877moz-quote-pre">On Tue, Apr 23, 2019 at 10:22:16PM +1000, David wrote:
</pre>
<blockquote type="cite">
<pre class="m_6317760977172185877moz-quote-pre">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="m_6317760977172185877moz-quote-pre">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="m_6317760977172185877moz-quote-pre">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="m_6317760977172185877moz-quote-pre">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>
</div><div text="#000000" bgcolor="#FFFFFF"><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="m_6317760977172185877moz-txt-link-abbreviated" href="mailto:root@host1:/etc/drbd.d#" target="_blank">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 <a href="http://169.254.88.21:44535" target="_blank">169.254.88.21:44535</a>;<br>
meta-disk internal;<br>
}<br>
on host2 {<br>
device /dev/drbd15;<br>
disk /dev/host2/acc-hda;<br>
address <a href="http://169.254.88.22:44535" target="_blank">169.254.88.22:44535</a>;<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">
<pre class="m_6317760977172185877moz-quote-pre">Regards, rck
_______________________________________________
drbd-user mailing list
<a class="m_6317760977172185877moz-txt-link-abbreviated" href="mailto:drbd-user@lists.linbit.com" target="_blank">drbd-user@lists.linbit.com</a>
<a class="m_6317760977172185877moz-txt-link-freetext" href="http://lists.linbit.com/mailman/listinfo/drbd-user" target="_blank">http://lists.linbit.com/mailman/listinfo/drbd-user</a>
</pre>
</blockquote>
<pre class="m_6317760977172185877moz-signature" cols="72">--
David McQuire
0418 310312</pre>
</div>
_______________________________________________<br>
drbd-user mailing list<br>
<a href="mailto:drbd-user@lists.linbit.com" target="_blank">drbd-user@lists.linbit.com</a><br>
<a href="http://lists.linbit.com/mailman/listinfo/drbd-user" rel="noreferrer" target="_blank">http://lists.linbit.com/mailman/listinfo/drbd-user</a><br>
</blockquote></div></div>