How install a Linux Software-RAID 1 on Debian Squeeze using mdadm?

Discussion in 'Installation/Configuration' started by Loo, Dec 2, 2012.

  1. Loo

    Loo New Member

    Hello members, how can I install a Linux Software-RAID 1 on Debian Squeeze using mdadm (2 disks: sda sdb)? On google and a lot of linux sites I can find just old tutorials that do not work or destined for a LVM System.

    Can anybody help as so far, im not doing very well, appreciated if you can help. Louis
     
  2. Loo

    Loo New Member

    I didn't find the solution to this problem, I try many old tutorials and in a haphazard way.

    Did you think it's cool to install my Open Virtuozzo setup now and build the software RAID 1 when a tutorial is available in the World Wide Web for this? Works this or is that too risky?
     
  3. falko

    falko Super Moderator Howtoforge Staff

  4. Loo

    Loo New Member

    -.- phew


    I'm sorry, next time I don't use the google search to find tutorials on your site ("site:howtoforge.com debian 6 software raid"). Thanks.
     
  5. Loo

    Loo New Member

    Sorry for another posting today, but I got a problem. I get the following error:
    "You cannot change a partition into an extended one or vice versa. Delete it first." in 2008 you said this, I change it correctly (probably) but it's not work.

    Now I notice this on a fully fresh Debian 6 64 Bit System without any manual changes:

    Code:
    root@nl:~# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/mapper/nl-root   455G  736M  431G   1% /
    tmpfs                1007M     0 1007M   0% /lib/init/rw
    udev                 1001M  132K 1001M   1% /dev
    tmpfs                1007M     0 1007M   0% /dev/shm
    /dev/sda1             228M   16M  200M   8% /boot
    root@nl:~#
    Code:
    root@nl:~# fdisk -l
    
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00018c21
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1          32      248832   83  Linux
    Partition 1 does not end on cylinder boundary.
    /dev/sda2              32       60802   488134657    5  Extended
    /dev/sda5              32       60802   488134656   8e  Linux LVM
    
    Disk /dev/sdb: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *           1          32      248832   fd  Linux raid autodetect
    Partition 1 does not end on cylinder boundary.
    /dev/sdb2              32       60802   488134657    5  Extended
    /dev/sdb5              32       60802   488134656   fd  Linux raid autodetect
    
    Disk /dev/md0: 254 MB, 254791680 bytes
    2 heads, 4 sectors/track, 62205 cylinders
    Units = cylinders of 8 * 512 = 4096 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
    Disk /dev/md0 doesn't contain a valid partition table
    
    Disk /dev/dm-0: 495.7 GB, 495724789760 bytes
    255 heads, 63 sectors/track, 60268 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
    Disk /dev/dm-0 doesn't contain a valid partition table
    
    Disk /dev/dm-1: 4123 MB, 4123000832 bytes
    255 heads, 63 sectors/track, 501 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    Disk identifier: 0x00000000
    
    Disk /dev/dm-1 doesn't contain a valid partition table
    root@nl:~#
    Code:
    root@nl:~# cat /proc/mdstat
    Personalities : [raid1]
    md0 : active (auto-read-only) raid1 sdb1[1]
          248820 blocks super 1.2 [2/1] [_U]
    
    unused devices: <none>
    root@nl:~#
    
    mdadm was already installed, it's a pre-installed RAID 1 or? The support says explicitly that RAID software would not be automatically installed, so I ask you... :)
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Looks like your /boot partition is using RAID1, but it's a degraded array (it's only using /dev/sdb1, and /dev/sda1 is missing).

    BTW, your system is using LVM, so you must use the LVM tutorial.
     
  7. Loo

    Loo New Member

    Oh, o.k. seems a little bit complicated. I now try the LVM setup for many hours but it fails (even if I change or skipping steps, in any case). My hoster offers Debian unfortunately not without this, it is possible that I clean remove the /boot partition RAID1 or it is permanently? I think then would work your tutorial.
     

Share This Page