F
F
faustoFF2014-01-05 00:31:21
Debian
faustoFF, 2014-01-05 00:31:21

How to configure software raid 1 on live Debian?

Hello!
There is a dedik (without hardware raid), in which 2 identical hard drives are installed. Debian 7 is pre-installed on the dedicator (on the first disk /dev/sda).
It is required to run the whole thing in software raid 1.
When trying to do this, I was guided by the article www.howtoforge.com/software-raid1-grub-boot-debian-etch
Difficulties and Issues arose during implementation

mdadm --create /dev/md0 --level=1 --raid-disks=2 missing /dev/sdb1

Actually from what partishen to glue raid? I already read in the answers that it is not necessary to stuff swap partitions into raid.
In fdisk -l, here is such a zoo:
Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048        4095        1024   83  Linux
/dev/sdb2   *        4096      198655       97280   83  Linux
/dev/sdb3          198656  1941524479   970662912   83  Linux
/dev/sdb4      1941526526  1953523711     5998593    5  Extended
/dev/sdb5      1941526528  1949523967     3998720   82  Linux swap / Solaris
/dev/sdb6      1949526016  1953523711     1998848   83  Linux

And here is /etc/fstab:
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda3 during installation
UUID=8031e714-90aa-4ce9-a7d7-88ac985138a4 /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda2 during installation
UUID=02300169-0c05-4e10-a41e-fcaef7b4d2b3 /boot           ext2    defaults        0       2
# /tmp was on /dev/sda6 during installation
UUID=262d9ce5-1c81-4553-9da1-7fd508df7524 /tmp            ext4    noexec,nosuid,nodev        0       2
# swap was on /dev/sda5 during installation
UUID=ba0821ff-033b-4f42-92cd-5d690e9384bb none            swap    sw              0       0

And here's df -T:
Filesystem                                             Type     1K-blocks     Used Available Use% Mounted on
rootfs                                                 rootfs   955431692 18534648 888363900   3% /
udev                                                   devtmpfs     10240        0     10240   0% /dev
tmpfs                                                  tmpfs       815488     1160    814328   1% /run
/dev/disk/by-uuid/8031e714-90aa-4ce9-a7d7-88ac985138a4 ext4     955431692 18534648 888363900   3% /
tmpfs                                                  tmpfs         5120        0      5120   0% /run/lock
tmpfs                                                  tmpfs      2430700        0   2430700   0% /run/shm
/dev/sda2                                              ext2         91159    48302     37993  56% /boot
/dev/sda6                                              ext4       1967440    36260   1831240   2% /tmp

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Evseev, 2014-01-05
@IlyaEvseev

1) You need to create a RAID partition for each sdaX.
2) When creating a RAID partition, it must include "missing" and sdbX.
3) All sdbX must be exactly the same type and size as sdaX.
4) Swap is also correctly placed on the RAID so that the system does not refuse to boot if it is on a broken disk.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question