Linux - Setting up RAID 1 on running system.
Config was as follows:
/dev/hdb (/dev/hdb1 40 GB)
/dev/hdc (/dev/hdc1 40 GB)
Each partition has been 40 GB size ext3 formatted (make sure partition id is set to Linux raid auto).
RAID tools and software was installed. It is called mdadm.
Remember first software device will be /dev/md0, second will be /dev/md1 and so on
You need to type following command to setup /dev/md0:
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hdb1 /dev/hdc1
You can see status, health of /dev/md0 at /proc/mdstat. Type the following command:
cat /proc/mdstat
Better uses watch command to refresh it automatically:
watch cat /proc/mdstat
Format /dev/md0 as ext3 fs:
mkfs.ext3 /dev/md0
Mount /dev/md0 at /data2 directory:
mkdir /data2
mount /dev/md0 /data2
Don't forget to add /dev/md0 to /etc/fstab:
vi /etc/fstab
Append following text:
/dev/md0 /data2 ext3 defaults 0 0
/dev/hdb (/dev/hdb1 40 GB)
/dev/hdc (/dev/hdc1 40 GB)
Each partition has been 40 GB size ext3 formatted (make sure partition id is set to Linux raid auto).
RAID tools and software was installed. It is called mdadm.
Remember first software device will be /dev/md0, second will be /dev/md1 and so on
You need to type following command to setup /dev/md0:
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hdb1 /dev/hdc1
You can see status, health of /dev/md0 at /proc/mdstat. Type the following command:
cat /proc/mdstat
Better uses watch command to refresh it automatically:
watch cat /proc/mdstat
Format /dev/md0 as ext3 fs:
mkfs.ext3 /dev/md0
Mount /dev/md0 at /data2 directory:
mkdir /data2
mount /dev/md0 /data2
Don't forget to add /dev/md0 to /etc/fstab:
vi /etc/fstab
Append following text:
/dev/md0 /data2 ext3 defaults 0 0
Comments
Post a Comment