[prev in list] [next in list] [prev in thread] [next in thread] 

List:       drbd-user
Subject:    Re: [DRBD-user] Remove DRBD w/out Data Loss
From:       Trevor Hemsley <themsley () voiceflex ! com>
Date:       2020-09-02 2:01:36
Message-ID: 1c9b3a3f-780d-3175-e909-7cca216b7df5 () voiceflex ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On 01/09/2020 22:43, Eric Robinson wrote:
> 
> Yannis –
> 
> 
> 
> Here's what I don't understand.
> 
> 
> 
> The backing device is logical volume: /dev/vg1/lv1
> 
> 
> 
> The drbd volume is: drbd0
> 
> 
> 
> The filesystem is ext4 on /dev/drbd0
> 
> 
> 
> Since the filesystem is built on /dev/drbd0, not on /dev/vg1/lv1, if
> we remove drbd from the mix, can we then simply do:
> 
> 
> 
> # mount /dev/vg1/lv1 /mnt and find all the data there?   
> 

Ideally what you do is something like this lot (untested but looks
reasonable)

umount it
remove it from /etc/fstab
drbdadm down $resource
drbdadm wipe-md $resource
stop drbd
remove drbd config files
remove drbd from the system
decide whether to extend your filesystem into the extra space that was
previously used by DRBD at the end of /dev/vg1/lv1 or whether to reduce
the size of the LV (assuming internal metadata).
if extending then run resize2fs/xfs_growfs as applicable
if removing extra space then I'll leave it to you to work out how much
you can safely remove without destroying the filesystem!

DRBD metadata is kept at the end of the block device it occupies so
there is extra space on the end of /dev/vg1/lv1 that is not part of the
filesystem that's on that block device.

Trevor

Disclaimer

The information contained in this communication from the sender is confidential. It \
is intended solely for use by the recipient and others authorized to receive it. If \
you are not the recipient, you are hereby notified that any disclosure, copying, \
distribution or taking action in relation of the contents of this information is \
strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically \
archived by Mimecast Ltd, an innovator in Software as a Service (SaaS) for business. \
Providing a safer and more useful place for your human generated data. Specializing \
in; Security, archiving and compliance. To find out more visit the Mimecast website.


[Attachment #5 (text/html)]

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <style type="text/css">.style1 {font-family: "Times New \
Roman";}</style></head><body>  <div class="moz-cite-prefix">On 01/09/2020 22:43, Eric \
Robinson  wrote:<br>
    </div>
    <blockquote type="cite" \
cite="mid:MWHPR03MB260739BC100FCCD1C34E3CEBFA2E0@MWHPR03MB2607.namprd03.prod.outlook.com">
  
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Yannis –<o:p></o:p></p>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <p class="MsoNormal">Here's what I don't understand. <o:p></o:p></p>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <p class="MsoNormal">The backing device is logical volume:
          /dev/vg1/lv1<o:p></o:p></p>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <p class="MsoNormal">The drbd volume is: drbd0<o:p></o:p></p>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <p class="MsoNormal">The filesystem is ext4 on /dev/drbd0<o:p></o:p></p>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <p class="MsoNormal">Since the filesystem is built on
          /dev/drbd0, not on /dev/vg1/lv1, if we remove drbd from the
          mix, can we then simply do:<o:p></o:p></p>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <p class="MsoNormal"># mount /dev/vg1/lv1 /mnt and find all the
          data there? &nbsp; </p>
      </div>
    </blockquote>
    <br>
    Ideally what you do is something like this lot (untested but looks
    reasonable)<br>
    <br>
    umount it<br>
    remove it from /etc/fstab<br>
    drbdadm down $resource<br>
    drbdadm wipe-md $resource<br>
    stop drbd <br>
    remove drbd config files <br>
    remove drbd from the system<br>
    decide whether to extend your filesystem into the extra space that
    was previously used by DRBD at the end of /dev/vg1/lv1 or whether to
    reduce the size of the LV (assuming internal metadata).<br>
    if extending then run resize2fs/xfs_growfs as applicable<br>
    if removing extra space then I'll leave it to you to work out how
    much you can safely remove without destroying the filesystem!<br>
    <br>
    DRBD metadata is kept at the end of the block device it occupies so
    there is extra space on the end of /dev/vg1/lv1 that is not part of
    the filesystem that's on that block device.<br>
    <br>
    Trevor<br>
  

<br><br><p style="font-family: Verdana; font-size:10pt; \
color:#666666;"><b>Disclaimer</b></p><p style="font-family: Verdana; font-size:8pt; \
color:#666666;">The information contained in this communication from the sender is \
confidential. It is intended solely for use by the recipient and others authorized to \
receive it. If you are not the recipient, you are hereby notified that any \
disclosure, copying, distribution or taking action in relation of the contents of \
this information is strictly prohibited and may be unlawful.<br><br>This email has \
been scanned for viruses and malware, and may have been automatically archived by \
<b>Mimecast Ltd</b>, an innovator in Software as a Service (SaaS) for business.  \
Providing a <b>safer</b> and <b>more useful</b> place for your human generated data.  \
Specializing in; Security, archiving and compliance. To find out more <a \
href="http://www.mimecast.com/products/" target="_blank">Click \
Here</a>.</p></body></html>



_______________________________________________
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
drbd-user@lists.linbit.com
https://lists.linbit.com/mailman/listinfo/drbd-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic