LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Undo a RAID mirror (https://www.linuxquestions.org/questions/linux-general-1/undo-a-raid-mirror-343184/)

curlyroger 07-14-2005 01:47 PM

Undo a RAID mirror
 
I have a FC1 system with a RAID mirror that I want to undo. Basically, I want to remove the secondary disk and use the primary as a normal drive.

The way I think it should be done is:

1 - Remove secondary drive
2 - Boot off CD
3 - Edit /etc/fstab and change mdX to hdaX
4 - Run fdisk on /dev/hda and change the partition types from 'Linux raid autodetect' to Linux (and Linux swap)
5 - Boot up

Is this possible/correct? What about the MBR? Here's the config:

Code:

[root@host root]# cat /etc/raidtab
raiddev            /dev/md2
raid-level                  1
nr-raid-disks              2
chunk-size                  64
persistent-superblock      1
nr-spare-disks              0
    device          /dev/hda3
    raid-disk    0
    device          /dev/hdc3
    raid-disk    1
raiddev            /dev/md0
raid-level                  1
nr-raid-disks              2
chunk-size                  64
persistent-superblock      1
nr-spare-disks              0
    device          /dev/hda1
    raid-disk    0
    device          /dev/hdc1
    raid-disk    1
raiddev            /dev/md1
raid-level                  1
nr-raid-disks              2
chunk-size                  64
persistent-superblock      1
nr-spare-disks              0
    device          /dev/hda2
    raid-disk    0
    device          /dev/hdc2
    raid-disk    1

[root@host root]# cat /etc/fstab
/dev/md2        /      ext3    usrquota,grpquota,defaults      1      1
/dev/md0                /boot                  ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /proc                  proc    defaults        0 0
none                    /dev/shm                tmpfs  defaults        0 0
/dev/md1                swap                    swap    defaults        0 0

[root@host root]# fdisk -l

Disk /dev/hdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot    Start      End    Blocks  Id  System
/dev/hdc1  *        1        13    104391  fd  Linux raid autodetect
/dev/hdc2            14      241  1831410  fd  Linux raid autodetect
/dev/hdc3          242      9729  76212360  fd  Linux raid autodetect

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot    Start      End    Blocks  Id  System
/dev/hda1  *        1        13    104391  fd  Linux raid autodetect
/dev/hda2            14      241  1831410  fd  Linux raid autodetect
/dev/hda3          242      9729  76212360  fd  Linux raid autodetect

Thanks!

Matir 07-14-2005 03:12 PM

What you say makes sense, but there's no guarantee that it would get f'ed up in the process. :)

I would make sure things are thoroughly backed up before attempting this.

As a general FYI: why did you raid mirror swap? Just for the stability in case of a disk failure?

lacerto 09-18-2005 01:54 PM

I've did exactly the same thing - two 250gb sata drives mirrored.

I initially did it just to see it it worked..and it did. I then customised my system, and would rather not have to re-install. I now want the extra drives space back though.

How did you get on with this?

L

EDIT: I sould add that I'm using Linux raid, not hardware or BIOS raid.



All times are GMT -5. The time now is 05:19 AM.