Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DRBD: Users

DRBD on LVM-> Disk Upgrade

 

 

DRBD users RSS feed   Index | Next | Previous | View Threaded


Robert at saq

Aug 19, 2009, 6:49 AM

Post #1 of 7 (1272 views)
Permalink
DRBD on LVM-> Disk Upgrade

I need to upgrade some hot swap disks on DRBD setup (Need higher
capacity). The disks run LVM with a DRBD entry for each logical volume
(One Volume Group per disk, multiple Logical Volumes).

I was thinking I could make sure once system has all the volumes on one
disk in secondary, detach DRBD and remove the Disks. Put in new disks,
create a new logical volume group recreate logical volumes of the same
size and let DRBD synch back to the new disks.

Has anyone done this before? Do I need to worry about small potential
size differences in the new LVM volumes? (I usually specify size in LVM
eg. 50G) Any other possible stumbling points?

Thanks,

Rob
_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user


juergen at kernkraft400

Aug 19, 2009, 2:22 PM

Post #2 of 7 (1200 views)
Permalink
Re: DRBD on LVM-> Disk Upgrade [In reply to]

Hello!

> I was thinking I could make sure once system has all the volumes on
> one
> disk in secondary, detach DRBD and remove the Disks. Put in new disks,
> create a new logical volume group recreate logical volumes of the same
> size and let DRBD synch back to the new disks.
What you're suggesting would take a full resync. I suggest:
1. Let one machine be the secondary for all drbd resources. See that
it stays this way by disabling your CRM. Work on this machine.
2. Put in your new disks.
3. Make a raw copy of your old disk to the new one with dd.
4. Remove the old disk.
5. Extend your LVM partition.
6. pvextend your PV.
7. lvextend your LVs. (If you're using internal meta-data you'll have
to move that first. Perhaps somebody else can help determining the
necessary parameters for dd. I use externat metadata and never had
to deal with this.)
8. Do: drbdadm adjust all

9. Do the same for the other machine.

Drbd will then notice that the underlying blockdevice grew and a partial
sync will start.
I've done this a few times. It always worked. I hope I did not forget
anything. Please double check and test in a lab first!

@LINBIT: I've always wondered with how little consideration internal
metadata is recommended for new systems. I've read here for quite a
while
and it seems many people run into problems with internal metadata which
wouldn't exist with external md.
Addistionaly an external meta-data disk can be moved to another spindle
for performance reasons. This doesn't work with internal, or does it?

Maybe you could think about suggesting external meta-data for all
setups,
where the creation of a separate partition/LV is no problem.
- Even if you don't agree with me i would like to hear about why
internal
is recommended.

Thank you for reading!
cheers,
juergen
_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user


florian.haas at linbit

Aug 20, 2009, 12:41 AM

Post #3 of 7 (1191 views)
Permalink
Re: DRBD on LVM-> Disk Upgrade [In reply to]

On 2009-08-19 23:22, Jürgen Scholz wrote:
> Hello!
>
>> I was thinking I could make sure once system has all the volumes on one
>> disk in secondary, detach DRBD and remove the Disks. Put in new disks,
>> create a new logical volume group recreate logical volumes of the same
>> size and let DRBD synch back to the new disks.
> What you're suggesting would take a full resync. I suggest:
> 1. Let one machine be the secondary for all drbd resources. See that
> it stays this way by disabling your CRM. Work on this machine.
> 2. Put in your new disks.
> 3. Make a raw copy of your old disk to the new one with dd.
> 4. Remove the old disk.
> 5. Extend your LVM partition.
> 6. pvextend your PV.
> 7. lvextend your LVs. (If you're using internal meta-data you'll have
> to move that first. Perhaps somebody else can help determining the
> necessary parameters for dd. I use externat metadata and never had
> to deal with this.)
> 8. Do: drbdadm adjust all
>
> 9. Do the same for the other machine.
>
> Drbd will then notice that the underlying blockdevice grew and a partial
> sync will start.
> I've done this a few times. It always worked. I hope I did not forget
> anything. Please double check and test in a lab first!

If you have additional slots available in those boxes, then the approach
can be greatly simplified.

- Pop in new disks
- Initialize new disks as LVM PV (pvcreate)
- Add PV to existing volume group (vgextend)
- Move physical extents from old PV to new PV (pvmove)
- Remove old PV from group (vgreduce)
- (Optional) wipe PV signature from old disks (pvremove)
- Pop out old disks

No need to fiddle with DRBD or Pacemaker at all. The only thing you
might want to do is either move resources off the machine while you're
doing your pvmove, or put the node in standby mode altogether during
that time, as you may be suffering an I/O performance hit as the system
is busy shuffling data.

> @LINBIT: I've always wondered with how little consideration internal
> metadata is recommended for new systems. I've read here for quite a while
> and it seems many people run into problems with internal metadata which
> wouldn't exist with external md.
> Addistionaly an external meta-data disk can be moved to another spindle
> for performance reasons. This doesn't work with internal, or does it?

As this idea is repeatedly being regurgitated here for apparently no
reason, I've created a blog post about it. You can get it from Planet HA
(http://www.planet-ha.org/#Internal+metadata%2C+and+why+we+recommend+it).

> Maybe you could think about suggesting external meta-data for all setups,
> where the creation of a separate partition/LV is no problem.
> - Even if you don't agree with me i would like to hear about why internal
> is recommended.

Read my blog. :)

Cheers,
Florian
Attachments: signature.asc (0.25 KB)


nine at detonation

Aug 20, 2009, 12:49 AM

Post #4 of 7 (1186 views)
Permalink
Re: DRBD on LVM-> Disk Upgrade [In reply to]

On Thursday, 20. August 2009, Florian Haas wrote:

> As this idea is repeatedly being regurgitated here for apparently no
> reason, I've created a blog post about it. You can get it from Planet HA
> (http://www.planet-ha.org/#Internal+metadata%2C+and+why+we+recommend+it).

But what about md RAID5? Does it hurt meta data performance even with a
battery backed controller? That would be the reason why I'm using external
meta data, so I can put it on a RAID1.

Regards,
Stefan
_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user


florian.haas at linbit

Aug 20, 2009, 12:54 AM

Post #5 of 7 (1187 views)
Permalink
Re: DRBD on LVM-> Disk Upgrade [In reply to]

On 2009-08-20 09:49, Stefan Seifert wrote:
> On Thursday, 20. August 2009, Florian Haas wrote:
>
>> As this idea is repeatedly being regurgitated here for apparently no
>> reason, I've created a blog post about it. You can get it from Planet HA
>> (http://www.planet-ha.org/#Internal+metadata%2C+and+why+we+recommend+it).
>
> But what about md RAID5? Does it hurt meta data performance even with a
> battery backed controller? That would be the reason why I'm using external
> meta data, so I can put it on a RAID1.

The underlying assumption is that if you're using a hardware RAID
controller with BBWC, you wouldn't be using md...

Florian
Attachments: signature.asc (0.25 KB)


juergen at kernkraft400

Aug 20, 2009, 4:21 PM

Post #6 of 7 (1169 views)
Permalink
Re: DRBD on LVM-> Disk Upgrade [In reply to]

Hello!

> - Pop in new disks
> - Initialize new disks as LVM PV (pvcreate)
> - Add PV to existing volume group (vgextend)
> - Move physical extents from old PV to new PV (pvmove)
> - Remove old PV from group (vgreduce)
> - (Optional) wipe PV signature from old disks (pvremove)
> - Pop out old disks
Perhaps this is a bit more elegant than that what i've suggested.


> As this idea is repeatedly being regurgitated here for apparently no
> reason, I've created a blog post about it. You can get it from
> Planet HA
> (http://www.planet-ha.org/#Internal+metadata%2C+and+why+we+recommend+it
> ).
Yes. I've read your explanation and it seems very reasonable. I didn't
think about your points.
Maybe a hint about your blog post would be nice. - Especially for those
who don't run professional systems without battery backed RAID
controllers,
like myself. I run a RAID1 and I did not see the point in buying a RAID
controller for RAID1 - back then.

> Read my blog. :)
I'm following the feed for quite a while now. You're not posting very
often,
but when you do it's usually good read. :-)

Thanks,
juergen
_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user


florian.haas at linbit

Aug 21, 2009, 12:22 AM

Post #7 of 7 (1165 views)
Permalink
Re: DRBD on LVM-> Disk Upgrade [In reply to]

On 2009-08-21 01:21, Jürgen Scholz wrote:
>> As this idea is repeatedly being regurgitated here for apparently no
>> reason, I've created a blog post about it. You can get it from Planet HA
>> (http://www.planet-ha.org/#Internal+metadata%2C+and+why+we+recommend+it).
> Yes. I've read your explanation and it seems very reasonable. I didn't
> think about your points.
> Maybe a hint about your blog post would be nice. - Especially for those
> who don't run professional systems without battery backed RAID controllers,
> like myself. I run a RAID1 and I did not see the point in buying a RAID
> controller for RAID1 - back then.

This is a discussion I had with lmb on #drbd yesterday. Please, "not
running professional systems" and high availability don't exactly go
together. With DRBD and Linux and Pacemaker your HA cluster will most
likely be way cheaper than with our proprietary, vendor-lock-in
counterparts, so please try to convince your boss to put some of those
savings in good hardware. He or she will thank you afterwards for having
made a better investment and still have saved a ton of cash in total.

Now for those who pull this discussion from the list archives, here's
the permalink to that post:

http://blogs.linbit.com/florian/2009/08/20/internal-metadata-and-why-we-recommend-it/

>> Read my blog. :)
> I'm following the feed for quite a while now. You're not posting very
> often,
> but when you do it's usually good read. :-)

Well thank you. :)

Cheers,
Florian

--
When replying, there is no need to CC my personal address.
I monitor the list on a daily basis. Thank you.

LINBIT® and DRBD® are registered trademarks of LINBIT.
_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user

DRBD users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.