FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-05-2011, 02:03 PM
Peter Beck
 
Default clone LVM disk to a larger disk

Hi guys,

I'm using two HP Microservers with a Heartbeat1 cluster, drbd and kvm.
On one of these servers the systemdisk is a 160GB disk with LVM
configured, on the other node it's a 1TB disk. I'd like to have both
nodes with the same disk sizes (easier to configure imo)


Now I've got a 1TB disk which I would like to use instead of the 160GB
disk. My question: Can I just clone the small disk to the new large disk
and then resize the LV on it ? Does that work ? I would say yes, but
I've never done that, so I am not sure...


Is there any advantage to use dd instead of Clonezilla[1], ReDo[2] or
whatever ? Maybe dd is slower than the other tools, but other than that

there shouldn't be any issues, correct ?

Thanks
Best Regards
Peter

[1] http://clonezilla.org
[2] http://redobackup.org


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4DEB8CB2.40601@datentraeger.li">http://lists.debian.org/4DEB8CB2.40601@datentraeger.li
 
Old 06-05-2011, 02:51 PM
Jochen Schulz
 
Default clone LVM disk to a larger disk

Peter Beck:
>
> Now I've got a 1TB disk which I would like to use instead of the
> 160GB disk. My question: Can I just clone the small disk to the new
> large disk and then resize the LV on it ? Does that work ? I would
> say yes, but I've never done that, so I am not sure...

What I would probably do is:

- install new disk alongside the old one
- put one big partition on the new disk and pvcreate the partition
- vgextend the existing VG with the new partition
- vgreduce the VG, removing the old disk's partitions

That should be just as fast as dd'ing the old filesystems and can be
done without downtime. You don't need to resize any existing partitions,
but you can of course grow the LVs and the filesystems afterwards, if
you want to take advantage of the additional space.

J.
--
All participation is a myth.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
 
Old 06-05-2011, 03:45 PM
Gilles Mocellin
 
Default clone LVM disk to a larger disk

On dim. 05 juin 2011 16:51:26 CEST, Jochen Schulz <ml@well-adjusted.de> wrote:

> Peter Beck:
> >
> > Now I've got a 1TB disk which I would like to use instead of the
> > 160GB disk. My question: Can I just clone the small disk to the new
> > large disk and then resize the LV on it ? Does that work ? I would
> > say yes, but I've never done that, so I am not sure...
>
> What I would probably do is:
>
> - install new disk alongside the old one
> - put one big partition on the new disk and pvcreate the partition
> - vgextend the existing VG with the new partition
> - vgreduce the VG, removing the old disk's partitions

You certainly forget a pvmove of the partitions between vgextend and vgreduce.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1307288712.32665.2.camel@n900">http://lists.debian.org/1307288712.32665.2.camel@n900
 
Old 06-05-2011, 04:31 PM
Jochen Schulz
 
Default clone LVM disk to a larger disk

Gilles Mocellin:
> On dim. 05 juin 2011 16:51:26 CEST, Jochen Schulz <ml@well-adjusted.de> wrote:
>>
>> What I would probably do is:
>>
>> - install new disk alongside the old one
>> - put one big partition on the new disk and pvcreate the partition
>> - vgextend the existing VG with the new partition
>> - vgreduce the VG, removing the old disk's partitions
>
> You certainly forget a pvmove of the partitions between vgextend and vgreduce.

Whoops! Leaving it out makes the process much faster, though. You
just don't get to keep your data. In my defence, vgreduce doesn't work
for PVs still in use.

J.
--
My clothes aren't just fashion. They're a lifestyle.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
 

Thread Tools




All times are GMT. The time now is 10:49 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org