<html><head></head><body>Or you could just do a "pvdestroy /dev/drbd/by-res/<name>" on the host...<br>
<br>
Sorry for the tofu..<br><br><div class="gmail_quote"><br>
<br>
Digimer <lists@alteeve.ca> schrieb:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On 29/01/14 06:40 PM, Paul O'Rorke wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Hi all,<br /><br />a quick question. I have a DRBD resource that was once used as a drive<br />for a Linux machine that used LVM. I want to create a new VM (KVM<br />based) that uses this resource. I can start the installation OK - the<br />installer 'sees' the 300GB drive (/dev/drbd/by-res/<resource>) but when<br />I try using the partition manager in the Debian (guest) installer it<br />complains that there is already LVM data on there and it won't allow me<br />to use the drive without first cleaning up the LVM config on there.<br /><br />Is it possible to mount the resource in the host and use the command<br />line LVM tools to 'clean' that up? I was thinking that maybe I could<br />use *dd* to clone a new clean resource of the same size but that seems<br />silly.<br /><br />Does
anyone
have any suggestions for 'formatting' this resource so that<br />it looks again like a clean un-partitioned disk?<br /><br />Thanks in advance.</blockquote><br />Simplest would be to write zeros to the device;<br /><br />dd if=/dev/zero of=/dev/drbd/by-res/<resource> bs=4M<br /><br />If you know that the LVM metadata is at the first or end of the drive, <br />you can limit the dd to count=X or use of offset to hit the end of the <br />resource.<br /></pre></blockquote></div><br>
-- <br>
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.<br>
-- <br>
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.</body></html>