Archive forFebruary, 2009

Creating/Deleting Software RAID-1 using mdadm

`mdadm` – manage MD devices aka Linux Software Raid (directly from `man` pages)

1. Finding out the RAID arrays (md0, md1, etc..). In all the below examples I have taken `md0` as the RAID array.

[root@library-server ~]#fdisk -l

2. Querying the arrays to find the disks it holds,

[root@library-server ~]#mdadm – -detail /dev/md0

3. Shutting the desired array,

[root@library-server ~]# mdadm – -stop /dev/md0

4. Zeroing the superblock for each drive,

[root@library-server ~]# mdadm – -zero-superblock /dev/sdX (or hdX)

5. Creating the new array,

[root@library-server ~]#mdadm – -create /dev/md0 – -chunk=4 – -level=0 – -raid-devices=2 /dev/sda1 /dev/sdb1

where sda1 and sdb1 are the partitions. The above command will create a raid0 array /dev/md0 formed from /dev/sda1 and /dev/sdb1, with chunk size 4.

6. Create an ext3 filesystem on /dev/md0,

[root@library-server ~]#mkfs.ext3 /dev/md0

Mount this partition and you are ready to push in your data. This above method worked for me. Hope this helps.

Oops, forgot to include one line in /etc/mdadm/mdadm.conf,

ARRAY /dev/md0 devices=/dev/sda1,/dev/sdb1

where `md0` – array defined and `sda1`, `sdb1` are the hard disk partitions from where the array is created. Restart the `mdadm` service.

Comments (1)

How it changed …

Here I am sitting in my office @ night…
Thinking hard about life
How it changed from a maverick collage life to strict professional Life….

How tiny pocket money changed to huge monthly paychecks
But then why it gives less happiness….

How a few local denim jeans changed to new branded wardrobe
But then why there are less people to use them

How a single plate of samosa changed to a full Pizza or burger
But then why there is less hunger….

Here I am sitting in my office @ night….
Thinking hard about life
How it changed…..

How a bike always in reserve changed to bike/car always on
But then why there are less places to go on……

How a small coffee shop changed to cafe coffee day
But then why its feels like shop is far away…..

How a limited prepaid card changed to postpaid package
But then why there are less calls & more messages……

Here I am sitting in my office @ night…
Thinking hard about life
How it changed…..

How a general class journey changed to Flight journey
But then why there are less vacations for enjoyment….

How an old assembled desktop changed to new branded laptop
But then why there is less time to put it on……….

How a small bunch of friends changed to office mate
But then why after 8’o Clock it always feel like getting late….

Here I am sitting in my office @ night…
Thinking hard about life
How it changed….. how it changed………….

Comments (2)