Docstoc

Setting Up RAID 1 Mirroring on a Running Remote Linux System Over Ssh Connection

Document Sample
Setting Up RAID 1 Mirroring on a Running Remote Linux System Over Ssh Connection Powered By Docstoc
					Setting Up RAID 1 Mirroring on a Running Remote Linux System Over Ssh
Connection
Howto: Setting up RAID 1 mirroring on a running remote Linux system over
ssh connection
Caution: Make sure you backup all-important data before using this
tutorial. I will be not responsible for data loss
But what is a RAID 1?
A single hard drive is mirrored i.e. an exact copy is made of the
original drive. Thus, it result into the increased fault tolerance and
easy data recovery option for single server.
Why I am setting a RAID-1 on running system?
Old sys admin did not setup RAID -1 at the time of installation. It is
true that the best and easy way to setup a RAID 1 is during installation.
Simply create RAID software partition and install the system.
Nevertheless, it wasn’t done during installation; so I was asked to do
so…
Procedure
Setting up RAID 1 mirroring is easy on running system. Recently we
ordered new dedicated hosting server. But they did not setup mirroring
for 2 hard disk. My setup 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:
Code:
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:
Code:
cat /proc/mdstat
Better uses watch command to refresh it automatically:
Code:
watch cat /proc/mdstat
Format /dev/md0 as ext3 fs:
Code:
mkfs.ext3 /dev/md0
Mount /dev/md0 at /data2 directory:
Code:
mkdir /data2
mount /dev/md0 /data2
Don't forget to add /dev/md0 to /etc/fstab:
Code:
vi /etc/fstab
Append following text:
Code:
/dev/md0 /data2 ext3 defaults 0 0
Paul Romanek
IT Admin Solution

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:11
posted:10/11/2010
language:English
pages:1