View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 23 posts ] 
Go to page 1, 2  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Tue Oct 12, 2004 10:49 pm 
Offline
Joined: Thu Feb 19, 2004 6:52 pm
Posts: 117
ok bear with me for a second... sort of Linux + knoppmyth question...

i have a system, call it "A". it is an R4V5 installation, with a PVR350, on a 250GB disk. as you can imagine, /myth is Not Small. :)

Code:
root@mythtv:~ # df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             4.2G  1.7G  2.3G  43% /
/dev/root.old         2.2M  342K  1.8M  16% /initrd
/dev/hda3              16G   24K   16G   1% /cache
/dev/hda4             213G   22G  191G  11% /myth


i have another system, call it "B". it is the *exact* same HW configuration as "A" (same mobo, same PVR350, same everything), EXCEPT that it has a blank 80GB disk in it. i would like to duplicate the configuration of "A" on "B". if the disks were the same size, i would just install the 80GB "B" disk into the chassis of "A" and then put dd to work making a bit-for-bit copy of the "A" disk. but that's not possible with the different size disks.

so.... can anyone recommend a somewhat straightforward way for me to duplicate the disk of "A" wth the exception of resizing /myth to be suitable for the 80GB disk? as you can see, i can currently fit all of the /myth filesystem data from "A" onto the disk of "B". note that i have a place to put any filesystem images (all of "A" would fit on a third, non-myth system "C"). so i could use a knoppix CD and a utility to read the partitions from "A", store them as a big honkin files on "C", and then copy them over to "B" again using the knoppix CD. sound like it could work? what would do when you got to /myth? i would also like to resize /cache down to 4-6 GB or so, that would be a nice-to-have not a requirement. 16GB is a lot of cache for what that box will be doing (mostly recording, not live TV).

from a logistics standpoint, all boxes (A,B,C) are in front of me; i can move drives between machines but it would be preferred to make use of the local LAN at 100Mbps. file transfer time is not a problem. all machines have CDROMs but only the non-mythtv box "C" has a CD writer.

thanks for any tips or leads or whatever,

jim


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 12, 2004 11:10 pm 
Offline
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location: Fontana, Ca
1. mythbackup on A
2. Auto Upgrade on B (reboot once complete)
3. On A.
3a. cd /myth/backup
3b. tar cvjf backup.tar.bz2 *
3c. cd ../tv
3d. tar cvf tv.tar *
4. Copy these two tarballs to C
5. Once B has reboot don't do anything
6. Copy backup.tar.bz2 to /myth/backup on B and untar
7. Copy tv.tar to /myth/tv on B and untar
8. Continue "installation/upgrade" process on B
9. Done

Once you're happy, you can get rid of the tarballs.

_________________
cesman

When the source is open, the possibilities are endless!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 12, 2004 11:24 pm 
Offline
Joined: Thu Feb 19, 2004 6:52 pm
Posts: 117
cesman,
ok i see where you are going, but... maybe i should have explained things just a bit further. more importantly than the mythtv data (e.g. TV recordings as .nuv files), i want my local knoppmyth R4V5 "customizations". first and foremost, i spent quite some time baking things so that TV out is via the PVR-350. so there is a new ivtv, an added itvtvfb driver, a tweaked X11 config, modified apache/samba conf files, etc etc etc, all of which make my system tick over properly. these are the kinds of things i want to duplicate, in addition to the aforementioned TV data.

hence my want to "clone" the entire system and not just the recordings.

right now i'm thinking of applying
http://www.sysresccd.org/
or more specifically something like this util
http://www.partimage.org/
or similar.

thanks again,
jim


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 12, 2004 11:50 pm 
Offline
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location: Fontana, Ca
I suppose you can :
1. copy the hda1 from A to B drive
2. Create the swap (hda2), cache (hda3) and myth (hda4) on B. You'll want to create them due to the size difference between the two drives. You don't need a 16 gig cache (especially when you only have a 80 gig drive).
3. Create tv.tar and backup.tar.bz2 as before.
4. Copy tarballs to C.
5. Copy tarballs to B as before (after copying hda1 from A to B).
6. Untar in appropriate locations
7. mythrestore on B

_________________
cesman

When the source is open, the possibilities are endless!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 13, 2004 12:40 am 
Offline
Joined: Tue Feb 03, 2004 3:23 am
Posts: 159
Location: Friesland, The Netherlands
Check out Mondo Rescue: http://www.microwerks.net/~hugo/

It allows you to make bootable ISO images of your Linux config. During interactive restore you have the option to change the partition layout and filesystems if you wish.
There are debian packages available.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 13, 2004 12:02 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
I've had good luck cloning disks by the brute force expedient of :

1) partition/format the new disk as desired
2) mount the partitions you want to clone onto.
3) using the ( cd original; tar cf - . ) | ( cd clone ; tar xf -) trick to copy the directory tree and files. You may need to use the gnu tar --one-file-system switch
4) doing other fixups (bootability, lilo install, ...)

This is even easier when you boot from a rescue CD and mount both the original and clone destination so you don't have to play --one-file-system games to restrict things.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 13, 2004 6:25 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
I didn't catch the disks in two different machines bit earlier, and I'm not sure how much that changes my recommendation, since you really don't want to be writing over a live "/" partiton if you can help it. However if that is a risk you're willing to take... the magic work is "rsync".

1) boot both machines on the network

2) make sure you can ssh into the target

3) run
Code:
cd /
rsync -axve /usr/bin/ssh . DESTINATION_MACHINE:/

Repeat that for each partition of interest. Note that the destination is the directory that you're copying into so except in this case it's NOT the same as the directory your copying. For / you'll probably need to use a --temp-dir=DIR that's on another partition like /myth or play games with --exclude patterns. DO NOT follow these instructions on blind faith! PLEASE read the man page first and understand what you're doing.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 13, 2004 7:12 pm 
Offline
Joined: Thu Feb 19, 2004 6:52 pm
Posts: 117
tjc wrote:
1) boot both machines on the network
2) make sure you can ssh into the target


there is no OS on the target "B". blank 80GB disk.

jim


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 13, 2004 7:36 pm 
Offline
Joined: Fri May 21, 2004 11:55 pm
Posts: 1206
Location: Silicon Valley, CA
tjc wrote:
4) doing other fixups (bootability, lilo install, ...)

This is even easier when you boot from a rescue CD and mount both the original and clone destination so you don't have to play --one-file-system games to restrict things.


Can you elaborate on the lilo step? I tried moving from a smaller to a larger disk and got hung up here. I could copy the partitions using Acronis True Image (boots from CD and handles Linux paritions types), but couldn't make lilo boot. I realized it was because lilo writes information into the boot sector, and that info is different for different sized disks.

I think I have to run lilo again, but I'm not sure how I get it to write the correct boot sector when my old disk is /dev/hda, my new disk is /dev/hdb, and I'm booted off the KnoppMyth cd.

Answer my question without making me look too stupid and I'll make you famous on KnoppMythWiki...

Joe

_________________
Do you code to live, or live to code?
Search LinHES forum through Google


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 13, 2004 10:07 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
wrooster wrote:
tjc wrote:
1) boot both machines on the network
2) make sure you can ssh into the target


there is no OS on the target "B". blank 80GB disk.

Sorry the presumption was that you did a minimal install on B so you could boot it and bring up the network. You can probably even do that by booting the KnoppMyth CD in standalone frontend mode.

Given what you've said it's probably faster and easier to go with my first suggestion. Plug the 80Gb drive into the box with the 250, format it, mount it, and then copy the image across. BTW - rsync will work for this too.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 13, 2004 10:28 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Liv2Cod wrote:
tjc wrote:
4) doing other fixups (bootability, lilo install, ...)


Can you elaborate on the lilo step? I tried moving from a smaller to a larger disk and got hung up here. I could copy the partitions using Acronis True Image (boots from CD and handles Linux paritions types), but couldn't make lilo boot. I realized it was because lilo writes information into the boot sector, and that info is different for different sized disks.

I think I have to run lilo again, but I'm not sure how I get it to write the correct boot sector when my old disk is /dev/hda, my new disk is /dev/hdb, and I'm booted off the KnoppMyth cd.

Answer my question without making me look too stupid and I'll make you famous on KnoppMythWiki...


Famous I can live without. How about I answer the question and you answer it for the next guy. Pay it forward. ;-)

Secret number one - read the man pages for lilo and lio.conf. They're actually pretty well written if in ocasionally fractured English.

The -b switch lets you specify the boot device. Here you probably want to say "/dev/hdb". The -M switch may also be relevant depending on what your ultimate intent is. The -r switch lets you work off the mounted drive like it's / which you'll need too. You can also specify these from the /etc/lilo.conf file.

Do you want to keep disk as hdb and boot of of it like that? Or do you want to swap them? Or is the new disk going to become the master in another machine? If it's either of the later you're probably better off installing the cloned rive in it's new home as /dev/hda before booting from a rescue CD (or the KnoppMyth CD in standalone mode) and starting the fiddling.


Top
 Profile  
 
PostPosted: Fri Oct 22, 2004 10:52 am 
Offline
Joined: Wed Feb 18, 2004 9:07 pm
Posts: 89
I'm new to the thread, and it's gotten kind of convoluted, but it appears that the 'dd' solution should work:

1. Install blank 80GB drive in "A" (this is now hdb)
2. Boot "A" using an alternative bootdisk (like a KnoppMyth CD)
3. Ensure that /dev/hda1 isn't mounted (important!)
4. Partition hdb (ensure that hdb1 has the same parameters as hda1)
5. Use 'dd' to bitcopy hda1 to hdb1

In other words, it doesn't matter that the physical disks have different geometries - the partitions will be functionally equivalent, so dd will work.

It's important that /dev/hda1 isn't mounted as a live filesystem when you use it as an infile in 'dd' - you can get nasty errors in your backup otherwise.

This isn't quite a complete solution, as there will be no MBR copied to hdb. If you start by "auto installing" KnoppMyth to hdb, you'll get partitioning and MBR all in one fell swoop.

Have I overlooked something?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 22, 2004 1:23 pm 
Offline
Joined: Wed Mar 10, 2004 6:40 pm
Posts: 54
Any chance this thread can be made sticky...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 24, 2004 4:30 pm 
Offline
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location: Fontana, Ca
There is a change. But why? wrooster hasn't even posted if he followed any of the suggestions. So, we don't know if any of them worked for him...

_________________
cesman

When the source is open, the possibilities are endless!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 24, 2004 6:02 pm 
Offline
Joined: Wed Apr 28, 2004 10:42 pm
Posts: 405
Location: Bendigo, Victoria, Australia
I want to do something similar to wrooster, except that I'm just upgrading my original drive to something less noisy.

What I plan on doing is this:
1: Disconnect the original drive "A"
2: Connect new drive "B"
3: Use the Knoppmyth CD auto installer to partition the new drive (B) and setup lilo, etc.
4: Reconnect Drive A, and set the BIOS to boot off it.
5: Copy everything from Drive A to Drive B
6: Remove Drive A
7: Enjoy the much quieter drive B.

My problem is that I dont know how to do step 5, can anyone let me know what I need to do here?

Thanks

_________________
Paul Turpie
-------------
<--Is your location in your profile? Why not?


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ] 
Go to page 1, 2  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu