Find the answer to your Linux question:
Results 1 to 8 of 8
I recently bought a new 250 GB HD. With my old configuration, I had two 80GB drives; /dev/hda1 (80GB) contained my MBR and GRUB, and the rest was devoted to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2005
    Posts
    7

    Mirroring a drive


    I recently bought a new 250 GB HD. With my old configuration, I had two 80GB drives; /dev/hda1 (80GB) contained my MBR and GRUB, and the rest was devoted to data; /dev/hdb2 (100mb) contained /boot, /dev/hdb3 was swap, and /dev/hdb4 (~37GB) had /. /dev/hdb1 (40GB) did not have a valid partition on it, so it doesn't matter. I've partitioned the 250GB drive as follows: 1: 40GB ext2 , 2: 2GB swap, 3: remainder ext3.

    A quick recap:

    HD1 (80GB, currently /dev/hda)
    1 partition, 80GB. Contains MBR and GRUB

    HD2 (80GB, currently /dev/hdb)
    4 partitions
    1st invalid (40GB)
    2nd /boot (100MB)
    3rd swap
    4th / (~37GB)

    HD3 (250GB, currently not connected)
    3 partitions
    1st ext2 (40GB)
    2nd swap (2GB)
    3rd ext3 (remainder)

    I only have room in my system for two hard drives. What I really want to do is leave HD1 (/dev/hda1) as it is, since it is the more reliable of the two 80GB drives. I can modify menu.lst of course; I just don't want to format or remove the drive. I would like to copy / and /boot from HD2 (/dev/hdb4 and /dev/hdb2) to the 40GB partition of HD3 and modify etc/fstab and menu.lst (on /dev/hda1) in such a way that I'll be able to boot off the 250GB drive in place of HD2.

    I tried connecting HD2 and HD3 and booting from a live CD and then using cp -r --preserve to copy everything, but that failed miserably - GRUB can't find the kernel image when I reconnect HD1 and HD3 (as master and slave) and try to boot, even after changing menu.lst to reflect the new config. At any given time, I can have two hard drives and my CD drives connected, allowing me to boot from a LiveCD and do things from there, or I can disconnect the CD drives and connect all three hard drives at once. Is there a way to do what I'm attempting?

    Sorry for the long post, and thank you in advance.

  2. #2
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790
    i assume after the cp -r u also edited menu.lst?

    Another thing... 2GB SWAP?! That's insame! I know they say ~2x RAM, but that's older machines! stuff more like 32MB ram etc. 2GB is (IMO, and others i believe) over the top.

    and finally.... long post?! tsch, yours is nothing, i have seen MUCH MUCH longer posts than that!
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  3. #3
    Just Joined!
    Join Date
    Jul 2005
    Posts
    7
    I tried editing the grub command from within grub when booting instead of editting menu.lst (e,e,edit, enter, b), but yeah, I definitely changed it, and I tried a lot of different combinations (lots that shouldn't work and the one that should), and I had no luck.

    2GB swap ... well, why not? I have the space on my hard drive. My system normally doesn't even touch the swap, but as far as I know, it doesn't hurt to have it there.

  4. #4
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    Ok, im assuming all the boot/os stuff is stored on 1 drive (primary) and you have a second drive that acts as storage (slave). In my mind the best be would be to attach drive 3 to one of the ide cables used by the cdrom (since I'm assuming its not needed to boot) mirror the data from drive 2 to drive 3, repalce 2 with 3 then boot again, and continue the migration of data, the best bet would be to continue to boot from the same drive.
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

  5. #5
    Just Joined!
    Join Date
    Jul 2005
    Posts
    7
    Quote Originally Posted by qub333
    Ok, im assuming all the boot/os stuff is stored on 1 drive (primary) and you have a second drive that acts as storage (slave). In my mind the best be would be to attach drive 3 to one of the ide cables used by the cdrom (since I'm assuming its not needed to boot) mirror the data from drive 2 to drive 3, repalce 2 with 3 then boot again, and continue the migration of data, the best bet would be to continue to boot from the same drive.
    Did you even read my post?

  6. #6
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790
    confuted, what distro is this on?
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  7. #7
    Just Joined!
    Join Date
    Jul 2005
    Posts
    7
    Quote Originally Posted by sdousley
    confuted, what distro is this on?
    SuSE Pro 9.0 with a 2.4.21 kernel.

  8. #8
    Just Joined! adamdaughterson's Avatar
    Join Date
    Mar 2003
    Location
    Denver, Colorado, USA
    Posts
    78
    I have made this sort of thing work with dd. Boot to tom's rtbt or something and (with 250GB HDD plugged in somewhere...)
    Code:
    dd if=/dev/hdb of=/dev/hdc
    (or whatever it winds up being) then
    Code:
    lilo -r /dev/hdc
    As for the big swap, have you ever heard of thrashing? It's when the system is trying sooooo hard to use the swap instead of the RAM (which is many many orders of magnitude faster!!) and performance goeth into the toilet! 2X amount of RAM up to 256MB is what I was taught.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •