[mythtv-users] Adding a hard drive, LVM or RAID0
rbsteffes at gmail.com
Thu May 19 20:17:06 UTC 2005
On 5/19/05, Phill Wiggin <wigginp at mantech-wva.com> wrote:
> mark at onnow.net wrote:
> >There is no way to do it without destroying the data.
> >Drive 1 = data
> >Drive 2 = new drive
> >Make drive 2 an lvm single drive. Move the data that you want to save to the
> >LVM setup. Blow away the partition on Drive 1 that held the data and then add
> >it to the LVM. Grow the Volume and you have acheived your objective. I have
> >done this and had no problems.
> What? Why would the data need to be destroyed? So long as there's a
> partition that is _only_ for data on Drive 1 (hda3, for instance)
> everything should be workable. (If the whole 1st drive is one big
> partition, you're probably out of luck.)
> /dev/hda1 / <-- main linux
> /dev/hda2 swap <-- swap space
> /dev/hda3 /myth <-- Myth data
> Create lvm partition on Drive 2. (/dev/VGforTV/tv)
> Mount lvm.
> Move data from /myth to /dev/VGforTV/tv
> Unmount /dev/hda3
> mkdir /myth
> mount /dev/VGforTV/tv /myth/tv
> mv /myth/tv/* /myth
> edit fstab to mount /dev/VGforTV/tv /myth/tv
> prepare /dev/hda3 for lvm
> unmount /myth/tv
> extend VGforTV onto /dev/hda3
> extend VGforTV filesystem to the new limit
> mount /myth/tv
> Basically, make a new lvm drive, copy all the data on /dev/hda3 over to
> it, unmount /dev/hda3, make a /myth directory, mount the lvm (all
> previous /dev/hda3 files/directories) onto /myth/tv.
> The directory structure will look like:
> So, move all that stuff back one directory so you have
> At this point, /myth, /myth/video, and all the other files are back in
> /myth where they belong, and /myth/tv is a mount point for
> /dev/VGforTV/tv. This also gives you the freedom to mount a different
> lvm group onto /myth/video if you want.
> After that, unmount /myth/tv and prepare the /dev/hda3 to become part of
> the VG. Extend the volume group, then extend the file system. Remount,
> and voila!
> But, if your linux install is just:
> /dev/hda1 <-- install
> /dev/hda2 <--swap
> You'll most likely have to reinstall anway. But, you can still make the
> LVM on Drive 2 and back up your data! (Don't forget to get backups of
> your mysql database!)
> Anyway, hope this helps.
> --Phill W
Thanks for that, it's exactly the confirmation I was looking for.
I've currently got a disk with root, swap, usr and temp, and another
disk devoted to /home/ with my videos in /home/video. My plan is to
make a /mnt/home2 on a new disk and copy home to home2 and then grow
home2 to include the original home disk.
More information about the mythtv-users