[mythtv-users] Migrating LVM partition?

kim Gross kgross at jensalt.com
Wed Dec 5 17:46:34 UTC 2007


Craig Huff wrote:
> I have my BE running on one PATA harddrive and just took
> the plunge to get a second HD, this time a SATA2 HD so I
> can separate the video recording storage from the OS and
> mySQL storage.
>
> How do I go about moving the /video partition, which is currently
> in an LVM on the old drive onto the new drive in a normal ext3
> partition and convert the LVM partition into a normal ext3 partition
> for other file storage?
>
> My plan for the initial steps is to power down the system, connect
> the new drive, and reboot to a live-CD based distro, like knoppix.
> Then I use something like qtparted to format the new HD and make
> a single partition out of the whole disk for use as the new /video.
>
> How do I get from there to where I'm ready to add the new partition
> to /etc/fstab with /video as it's mountpoint and reboot into the
> normal operating environment?
>
> It seems that dd would be inappropriate since I want to move files,
> not a disk image, but should I use tar, dump, or something else?
>
> Also, how do I go about dismantling the LVM settings so I can
> redefine the partition as an ext3 partition?
>
> Craig.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>   
This should be very easy to do.  You should not even need to boot off of 
a live cd just boot normally, partition the new drive, with what ever 
partitioning tool you want to use, I just use fdisk.  Format the new 
partition.  Then you can just use cp to copy all of the files from the 
old lvm partition to the new partition.  Check to make sure the copy 
worked correctly.  Use fdisk to delete the lvm partition and create a 
normal partition on the old drive.  Format it.  Then change fstab to 
mount the new /video  and the old lvm partition where ever you want it.

Kim



More information about the mythtv-users mailing list