[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: In-place migration to LVM?



Douglas A. Tutty schrieb:
On Wed, Nov 21, 2007 at 05:22:50PM +0100, Malte Forkel wrote:
I have a data file collection on three hard disks, each with just one partition. The 'primary' partition has the complete directory structure. The two 'secondary' partitions partially mirror that directory structure. There are some data files on the primary partition. For each data file on one of the secondary partitions, there is a soft link to it from the primary partition. Each partition has a couple of GB space left. Is it possible to migrate these partitions into one logical volume without loosing or backing up the data? If I had a backup storage large enough to hold all the data ...

Ouch.

First, ensure that you have exhausted all backup options.  Backup to
another machine?

How large are these disks?  You say each has a couple of GB spare; is
that free-space on the drive or that a partition with a filesystem that
has some free space?

You don't necessarily need backup storage large enough for all the data,
just do do one partition at a time.
Is the data already compressed?

The disks have 500, 400, and 160 GB. They are used by VDR to store digital video in an MPEG2 based format. I probably can't gain much by attempting to compress the data.

Having a backup would sure be nice, but its not what I attempting to achieve at the moment. I guess if I wanted to be on the safe side, I'd buy two 1 TB drives and build a RAID array. Right now, I was just hoping that I could migrate from three separate partitions (managed by VDR) to one LVM partition in order to ease mounting via NFS now and drive replacements later.
I've never tried resizing non-LVM partitions so I wouldn't attempt that
without a backup.  Hey, I don't attempt anything without a backup;
including doing a backup.

:-)

Your best bet may be to buy a fourth disk and make it the firs physical
volume of a volume group, make your LV and put a filesystem on it.
Transfer one drives data to it and do the shell-game from there.

The next disk I buy is going to be a 1000 GB model. Moving from regular partitions to LVM shoudn't be a problem then. But at the moment, 1 TB disks are still a little bit to expansive for me.

Or create an LV+filesystem and use it to hold a compressed tarball of
the first data partition.  It all depends on the size of the data set
and the size of these drives.

Doug.


Thanks for your help!

Malte



Reply to: