Hello, To begin with an apology, the question I am going to ask is one which I would normally prefer to work out for myself, but I am a little nervous about the loss of much hard work and do not have much time at my disposal at the moment to do the research. I have spent the last year learning and building my present linux installation on a 40GB HDD which has the following structure and which I will call the source drive: /dev/hda1 /windows/C vfat rw,uid=500,gid=100 0 0 /dev/hda5 /boot ext2 defaults 1 2 /dev/hda6 swap swap defaults 0 2 /dev/hda7 / ext2 defaults 1 1 I am sorry about the Windows partiton, which is very little used but, for reasons I won't bore you with, it simply has to be there. My objective is the simple one of keeping a clone of this HDD (lilo, Windows partition and all), such that if the source drive fails I can simply replace it with the clone, and restart. I am quite happy to invest in an identical drive for the purpose. I do not care if the cloning process takes some time to execute and may involve re-writing the clone in full each time I backup. There are obviously no space constraints because the drives will be identical. I would like locate the clone as the second drive in a spare machine on my home network and I assume that I would begin by partitioning the clone so as to be identical to the source drive and mounting it under NTFS. If that is right, can anyone suggest the sequence of commands that should follow? If that is wrong, can anyone suggest a better approach? Many thanks, Geoff _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
On Wed, 19 Sep 2001, quintaq@yahoo.co.uk wrote:
I would like locate the clone as the second drive in a spare machine
{ ~ make a new swap partition, as you prefer } 1) partition, and make file-system, for your clone-target disk, as you chose 2) go to top or root directory of source disk 3) mount target partition, on, say, /mnt then , execute :- tar clf - . | ( umask 0; cd /mnt; tar xvf - ) then , umount the target partition, and , next, mount the following partition . . . keep going until you've finished M$ DOS/Windows stuff works just the same The whole cloning operation will prolly take all of 5 minutes :) best wishes ____________ sent on Linux ____________
On Wed, 19 Sep 2001 08:36:53 +0000
tabanna
{ ~ make a new swap partition, as you prefer }
1) partition, and make file-system, for your clone-target disk, as you chose 2) go to top or root directory of source disk 3) mount target partition, on, say, /mnt
then , execute :-
tar clf - . | ( umask 0; cd /mnt; tar xvf - )
then , umount the target partition, and , next, mount the following partition . . . keep going until you've finished
M$ DOS/Windows stuff works just the same
Hi Tabana Thank you very much for the quick response. I should be able to install the clone sometime in the coming week, and will sleep better when it is working. Regards, Geoff _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
1) partition, and make file-system, for your clone-target disk, as you chose 2) go to top or root directory of source disk 3) mount target partition, on, say, /mnt
then , execute :-
tar clf - . | ( umask 0; cd /mnt; tar xvf - )
No, don't do that. IIRC tar is unable to archive named pipes (fifos) (Just try to tar up your /dev/ tree and unpack it and check the difference). Furthermore, your file timestamps will be messed up. The dd if=/dev/hdx of=/dev/hdy bs=16k solution should work much better copying even your partition table, lilo boot config, etc., thus really cloning your hd info. Wolly
quintaq@yahoo.co.uk wrote:
Hello,
To begin with an apology, the question I am going to ask is one which I would normally prefer to work out for myself, but I am a little nervous about the loss of much hard work and do not have much time at my disposal at the moment to do the research.
I have spent the last year learning and building my present linux installation on a 40GB HDD which has the following structure and which I will call the source drive:
/dev/hda1 /windows/C vfat rw,uid=500,gid=100 0 0 /dev/hda5 /boot ext2 defaults 1 2 /dev/hda6 swap swap defaults 0 2 /dev/hda7 / ext2 defaults 1 1
I am sorry about the Windows partiton, which is very little used but, for reasons I won't bore you with, it simply has to be there.
My objective is the simple one of keeping a clone of this HDD (lilo, Windows partition and all), such that if the source drive fails I can simply replace it with the clone, and restart. I am quite happy to invest in an identical drive for the purpose. I do not care if the cloning process takes some time to execute and may involve re-writing the clone in full each time I backup. There are obviously no space constraints because the drives will be identical.
I would like locate the clone as the second drive in a spare machine on my home network and I assume that I would begin by partitioning the clone so as to be identical to the source drive and mounting it under NTFS. If that is right, can anyone suggest the sequence of commands that should follow? If that is wrong, can anyone suggest a better approach?
Many thanks,
Yes you would need to partition the backup drive exactly the same as the master. Personally, (this is what I do) I would go out and get 2 removable cases for your drives so that I could easily move it in and out of where ever you might want. Then install it in your machine (master) as hdb and use dd to copy your partitions over. Like this: dd if=/dev/hda1 of=/dev/hdb1 bs=16k Do that for every partition but the swap partition. The swap partition should just be created once then you can leave that one alone. After you dd all the partitions, reconfig hdb to hda and plug it in. The VERY FIRST time you will need to boot from the install CD and choose boot installed system. Once it is up run lilo. You will only have to do this the first time and then only if you change your kernels or anything lilo related. Works like a charm for me and it doesn't matter if your using reiser/ext or what ever. Regards Mark -- Mark Hounschell dmarkh@cfl.rr.com
On Wed, 19 Sep 2001 06:35:26 -0400 dmarkh@cfl.rr.com wrote:
Yes you would need to partition the backup drive exactly the same as the master. Personally, (this is what I do) I would go out and get 2 removable cases for your drives so that I could easily move it in and out of where ever you might want. Then install it in your machine (master) as hdb and use dd to copy your partitions over. Like this:
dd if=/dev/hda1 of=/dev/hdb1 bs=16k
Do that for every partition but the swap partition. The swap partition should just be created once then you can leave that one alone. After you dd all the partitions, reconfig hdb to hda and plug it in. The VERY FIRST time you will need to boot from the install CD and choose boot installed system. Once it is up run lilo. You will only have to do this the first time and then only if you change your kernels or anything lilo related.
Works like a charm for me and it doesn't matter if your using reiser/ext or what ever.
Hi Mark, Thanks for that. I appreciate that it is simpler to keep everything in one box, but my plan to have the clone located in a networked machine was, however, motivated by two desires : (a) not to have a second drive in my main box whirring away a few inches from my ear whilst I sit here working all day, (b) to ensure that there would be as few hours uptime as possible on the clone so as to get maximum life out of it if and when it is needed (the networked machine is powered down most of the time). I have never experimented with power management under linux, however, and I suppose that it would be possible to power down the /hdb clone whenever a backup was not in progress. I would be very interested to know if this is what you do, or if you have any other thoughts on the subject. Thanks, Geof _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
quintaq@yahoo.co.uk wrote:
On Wed, 19 Sep 2001 06:35:26 -0400 dmarkh@cfl.rr.com wrote:
Yes you would need to partition the backup drive exactly the same as the master. Personally, (this is what I do) I would go out and get 2 removable cases for your drives so that I could easily move it in and out of where ever you might want. Then install it in your machine (master) as hdb and use dd to copy your partitions over. Like this:
dd if=/dev/hda1 of=/dev/hdb1 bs=16k
Do that for every partition but the swap partition. The swap partition should just be created once then you can leave that one alone. After you dd all the partitions, reconfig hdb to hda and plug it in. The VERY FIRST time you will need to boot from the install CD and choose boot installed system. Once it is up run lilo. You will only have to do this the first time and then only if you change your kernels or anything lilo related.
Works like a charm for me and it doesn't matter if your using reiser/ext or what ever.
Hi Mark,
Thanks for that. I appreciate that it is simpler to keep everything in one box, but my plan to have the clone located in a networked machine was, however, motivated by two desires : (a) not to have a second drive in my main box whirring away a few inches from my ear whilst I sit here working all day, (b) to ensure that there would be as few hours uptime as possible on the clone so as to get maximum life out of it if and when it is needed (the networked machine is powered down most of the time). I have never experimented with power management under linux, however, and I suppose that it would be possible to power down the /hdb clone whenever a backup was not in progress. I would be very interested to know if this is what you do, or if you have any other thoughts on the subject.
Thanks,
When your done with the backup simply remove the drive and put in a drawer. Mark
On Wed, 19 Sep 2001 07:04:39 -0400
Mark Hounschell
When your done with the backup simply remove the drive and put in a drawer.
Yes, I see that - but I am planning very frequent backups and the way the machines have to be located in my crowded little home office would make that a big chore. Thanks anyway though - I will look into the power management position. Regards, Geoff _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
On Wed, 19 Sep 2001 12:16:18 +0100 quintaq@yahoo.co.uk wrote:
On Wed, 19 Sep 2001 07:04:39 -0400 Mark Hounschell
wrote: When your done with the backup simply remove the drive and put in a drawer.
Yes, I see that - but I am planning very frequent backups and the way the machines have to be located in my crowded little home office would make that a big chore. Thanks anyway though - I will look into the power management position.
Just to take it a little further - it looks as if I will be able to shut down /hdb by using hdparm without needing to enable power management. Geoff _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
I attacked this problem a slightly different way. I bought a Promise RAID controller and three (not one) spare HDD. The two-element RAID mirrored RAID array has one drive fixed and one removable. Every so often I take out the removable drive and put in one of the others. Then I reboot - the hardware BIOS complains that the RAID array has a critical failure and offers to fix it. I allow it to do so (it clones the drive again) and off we go. Then the RAID keeps the two drives in sync. If one fails nothing much happens - you don't know about it till next boot time. IB
Hi You could also use 5+1 mode with all 3 HD connected. Then 2 of them would receive striping (fast) write/read, and the third one would have calculated checksum. If any one of the disk fails, it can be rebuild from the 2 others. This way You could utilise the extra speed and capasity as well. Jaska. Viestissä Keskiviikko 19. Syyskuuta 2001 21:40, Ian Boag kirjoitti:
I attacked this problem a slightly different way. I bought a Promise RAID controller and three (not one) spare HDD. The two-element RAID mirrored RAID array has one drive fixed and one removable. Every so often I take out the removable drive and put in one of the others. Then I reboot - the hardware BIOS complains that the RAID array has a critical failure and offers to fix it. I allow it to do so (it clones the drive again) and off we go. Then the RAID keeps the two drives in sync. If one fails nothing much happens - you don't know about it till next boot time.
IB
On Wed, 19 Sep 2001 21:49:21 +0300
Jaakko Tamminen
You could also use 5+1 mode with all 3 HD connected.
Then 2 of them would receive striping (fast) write/read, and the third one would have calculated checksum.
If any one of the disk fails, it can be rebuild from the 2 others.
This way You could utilise the extra speed and capasity as well.
Thanks to both Ian and Jaska. I had given a little thought to RAID, but did not have time to investigate properly. Now this paranoia about the possible consequences of failure of my present HDD has set in I am going to get one spare immediately and go with dd solution (plus power down of /dev/hdb1 with hdparm), which will only take an hour. I will then probably go for RAID when I have time to understand and do that job properly. Its a funny thing you know - I could do most of my vital work on a simple Win98 machine - but after almost a year full-time on linux the thought of falling back on any aspect of Windows seems utterly intolerable. Regards, Geoff _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
Thanks to both Ian and Jaska. I had given a little thought to RAID, but did not have time to investigate properly. Now this paranoia about the possible consequences of failure of my present HDD has set in I am going to
I understand absolutely. Mirrored IDE RAID is dead simple to install. Once you have set up the second HD in a caddy the way you are talking about, all you do is plug in the RAID controller card and connect both HDDs to it. The system sees it as one drive of the same size as each of the two (ie if they are 20GB drive, the system sees them as one 20GB drive and keeps them in sync) .... Jaska's solution is an elegant way to get more speed etc, but I sense what you want is security (full HDD copy outside the machine) like me :)
On Wednesday 19 September 2001 7:04 pm, quintaq@yahoo.co.uk wrote:
Its a funny thing you know - I could do most of my vital work on a simple Win98 machine - but after almost a year full-time on linux the thought of falling back on any aspect of Windows seems utterly intolerable.
That's exactly how I feel after using Linux for 6 months. Windows is like having second best; I intensely dislike using Windows 2000 at work these days. M
participants (8)
-
dmarkh@cfl.rr.com
-
Ian Boag
-
Jaakko Tamminen
-
Mark Hounschell
-
Martin Webster
-
quintaq@yahoo.co.uk
-
tabanna
-
Wolly Wicyrek