Clonar discos en sistemas RAID1 Linux

  1. Para ver en que estado estoy podemos hacer un
    cat /proc/mdstat
  2. clonar la tabla de particiones:
    sfdisk -d /dev/sda | sfdisk /dev/sdb
  3. sincronizar el raid, haciendo esto para cada partición:
    mdadm  /dev/mdX  -a /dev/sdbX
  4. cotillea un poco:
    watch -n 1 cat /proc/mdstat
  5. grabar el grub con algo parecido a esto
    grub --no-floppy
    find /boot/grub/stage1
    device (hd0) /dev/sda
    root (hd0,0)
    setup (hd0)
    device (hd0) /dev/sdb
    root (hd0,0)
    setup (hd0)
  6. Que dara un resultado parecido a esto:
    [root@hn5 ~]# grub --no-floppy
    Probing devices to guess BIOS drives. This may take a long time.
    
        GNU GRUB  version 0.97  (640K lower / 3072K upper memory)
    
     [ Minimal BASH-like line editing is supported.  For the first word, TAB
       lists possible command completions.  Anywhere else TAB lists the possible
       completions of a device/filename.]
    grub> find /grub/stage1
    find /grub/stage1
     (hd0,0)
     (hd1,0)
    grub> device (hd0) /dev/sda
    device (hd0) /dev/sda
    grub> root (hd0,0)
    root (hd0,0)
     Filesystem type is ext2fs, partition type 0xfd
    grub> setup (hd0)
    setup (hd0)
     Checking if "/boot/grub/stage1" exists... no
     Checking if "/grub/stage1" exists... yes
     Checking if "/grub/stage2" exists... yes
     Checking if "/grub/e2fs_stage1_5" exists... yes
     Running "embed /grub/e2fs_stage1_5 (hd0)"...  15 sectors are embedded.
    succeeded
     Running "install /grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/grub/stage2 /grub/grub.conf"... succeeded
    Done.
    grub>  device (hd0) /dev/sdb
     device (hd0) /dev/sdb
    grub> root (hd0,0)
    root (hd0,0)
     Filesystem type is ext2fs, partition type 0xfd
    grub> setup (hd0)
    setup (hd0)
     Checking if "/boot/grub/stage1" exists... no
     Checking if "/grub/stage1" exists... yes
     Checking if "/grub/stage2" exists... yes
     Checking if "/grub/e2fs_stage1_5" exists... yes
     Running "embed /grub/e2fs_stage1_5 (hd0)"...  15 sectors are embedded.
    succeeded
     Running "install /grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/grub/stage2 /grub/grub.conf"... succeeded
    Done.
    grub>

Para más información: http://gentoo-wiki.com/HOWTO_Gentoo_Install_on_Software_RAID

This entry was posted in linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *