[SLUG] Want a 2nd opinion on this plan to upgrade hdd

2002-04-03 Thread Paul Robinson



Hi guys,
 Applogies for the mail client 
but once this question is answered I should be able to return to something Linux 
based :) ). I need to upgrade my hard disks in my main server from the 
2gig drives it currently has to a couple of 6 gig drives that I have spare (the 
2's are almost full).

What I was planning to do was install the new 
drives and mount them as /mnt/temp and /mnt/temp2 for example and then run cp -a 
/ /mnt/temp so as to copy everything form the root structure across.. but I got 
to thinking.. wouldn't it eventually try to copy the /mnt/temp content into 
itself and start a really bad loop? What is the best way to upgrade hard drives 
in a Linux box?

Is there any software which will just write out the 
contents of an actual partition to another? ie copy /dev/hda1 to /dev/hdc1 or 
something like that.. ignoring the mount points etc.

I also realise I'm going to need to make a boot 
disk and boot off that the first time to run lilo to write to the boot sector of 
the new hard disk when it is moved to /.

TIA (I can always rebuild it but there were alot of 
things like snort etc that were configured as well as demarc which requires a 
decent amount of config time and I'd rather avoid that if possible)

Paul


Re: [SLUG] Want a 2nd opinion on this plan to upgrade hdd

2002-04-03 Thread Anand Kumria

On Thu, Apr 04, 2002 at 12:46:23AM +1000, Paul Robinson wrote:
 Hi guys,
 
 What I was planning to do was install the new drives and mount them as 
 /mnt/temp and /mnt/temp2 for example and then run cp -a / /mnt/temp so 
 as to copy everything form the root structure across.. but I got to thinking.
 wouldn't it eventually try to copy the /mnt/temp content into itself and 
 start a really bad loop? What is the best way to upgrade hard drives in 
 a Linux box?

Try using;

# ( cd /src; tar lcpf - . ) | ( cd /dst; tar xf - )

instead which will preserve permissions, owners, device nodes
and won't cross filesystem boundarys. Actually you could probably
simply that to (after confirming 'l' did what I thought)

# ( tar -C /src lcpf - . ) | ( tar -C /dst xf  - )

but I've never tried that version.


 Is there any software which will just write out the contents of an actual 
 partition to another? ie copy /dev/hda1 to /dev/hdc1 or something like 
 that.. ignoring the mount points etc.

dump/restore, cpio and dd could all be used instead. I just happen
to like the tar version

 
 I also realise I'm going to need to make a boot disk and boot off that the 
 first time to run lilo to write to the boot sector of the new hard disk 
 when it is moved to /.
 

It has been a while since I've used lilo but I believe either

# lilo -M /new/device

or 

# lilo -b /new/device

ought to do the trick. I don't even have the manpages installed to
check so confirm with those.

Anand

-- 
 `` We are shaped by our thoughts, we become what we think.
 When the mind is pure, joy follows like a shadow that never
 leaves. '' -- Buddha, The Dhammapada
-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



Re: [SLUG] Want a 2nd opinion on this plan to upgrade hdd

2002-04-03 Thread Darrell Burkey

I used the info from this mini howto once to do exactly what you are asking
and it worked great.

http://www.linuxdocs.org/HOWTOs/mini/Hard-Disk-Upgrade/index.html

Cheers.

~~~
darrell@home

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug