Server Administration & Management

Software RAID issue after reboot of OS

After successful installation of OS, if there are some problem to boot os in one Hard-drive, as grub issue like kernel panic or grub error 17 or other issue

1. Reboot the machine in Rescue mode

Boot: linux rescue

# chroot /mnt/sysimages
# mkdir /a
# mount /dev/sdaX /a
# cd /a

# cat /proc/mdstat (UU means both disk are live)

2. Run the following commands to hotadd and rebuild the array

# mdadm /dev/md0 –add /dev/sda1
# mdadm /dev/md1 –add /dev/sda2
# mdadm /dev/md2 –add /dev/sda3

# grub-install /dev/md0    OR

# grub (GRUB shell type above command to reinstall the boot loader on both drives & reboot.)

grub> device (hd0) /dev/sda
grub> root (hd0,0)
grub> setup (hd0)

grub> device (hd1) /dev/sdb
grub> root (hd1,0)
grub> setup (hd1)

grub> quit

This is show on /boot/grub/device.map

grub> find /grub/stage1 (Find out which are the hard disks on which you can install grub)

This file show in /boot/grub/device.map

grub> device (hd0) /dev/sda
grub> root (hd0,0)
grub> setup (hd0)

January 20, 2014 Posted by | RAID, Tips & Tricks, Unix/Linux | , , , | Leave a comment

How to Check or Monitoring Software RAID in Linux

# mdadm

# cat /proc/mdstat

# mdadm –detail /dev/md0 OR /dev/md1

# mdadm -E /dev/md0 (Spare rebuilding means sync & recovery data to each drive to other)

# mdadm -R /dev/md1 (Recovery & transfer in speed 20-40 Mbps depend on CPU & Hard-drive)

# mdadm /dev/md0 -add /dev/sdb1 [Add partition (RAID Device) /dev/sdb1 into /dev/md0]

January 10, 2014 Posted by | RAID, Tips & Tricks, Unix/Linux | , , , | Leave a comment

How to Create Software RAID-1 Mirroring

# yum install mdadm

# fdisk /dev/sdb     (Create Software RAID Type)

# fdisk /dev/sdc     (Create Software RAID Type)

# mdadm –zero-superblock /dev/sdb /dev/sdc     (If device contains a valid md superblock, the block is overwritten with zeroes)

# mdadm –create /dev/md0 –level=1 –raid–devices=2 /dev/sdb1 /dev/sdc1     (Create RAID-1 using /dev/sdb1 & /dev/sdc1)

# mkfs.ext3 /dev/md0     (format /dev/md0 as ext3 file system)

# mkdir /raid1

# mount /dev/md0 /raid1

# df -hT

# vim /etc/fstab     (For automatically mount after reboot)

/dev/md0    /raid1    ext3    noatime,rw    0    0

# cat /proc/mdstat OR

# watch -n 2 cat /proc/mdstat (For RAID Status)

December 30, 2013 Posted by | RAID, Tips & Tricks, Unix/Linux | , , , | Leave a comment

Difference between RAID and LVM

 1.  RAID is used for redundancy.  LVM is a way in which you partition the hard disk logically and it contains its own advantages.
 2.  A RAID device is a physical grouping of disk devices in order to create a logical presentation of one device to an Operating System for redundancy or performance or a combination of the two.  LVM is a logical layer that that can be anipulated in order to create and, or expand a logical presentation of a disk device to an Operating System.
 3.  RAID is a way to create a redundant or striped block device with redundancy using other physical block devices.  LVM usually sits on top of RAID blocks or even standard block devices to accomplish the same result as a partitioning, however it is much more flexible than partitions. You can create multiple volumes crossing multiple physical devices, remove physical devices without loosing data, resize the volumes, create snapshots, etc
 4.  RAID is either a software or a hardware technique to create data storage redundancy across multiple block devices based on required RAID levels.  LVM is a software tool to manage large pool of storage devices making them appear as a single manageable pool of storage resource. LVM can be used to manage a large pool of what we call Just-a-bunch-of-Disk (JBOD) presenting them as a single logical volume and thereby create various partitions for software RAID.
 5.  RAID is NOT any kind of Data backup solution. Its a solution to prevent one of the SPOFs (Single Point of Failure) i.e. DISK failure. By configuring RAID you are just providing an emergency substitute for the Primary disk. It NEVER means that you have configured DATA backup.  LVM is a disk management approach that allows us to create, extend, reduce, delete or resize the volume groups or logical volumes.

October 20, 2013 Posted by | LVM, RAID, Tips & Tricks, Unix/Linux | , , , | Leave a comment

RAID Levels


May 12, 2013 Posted by | RAID, Tips & Tricks | , | Leave a comment

RAID Disk Space Calculator

Raid 0 (Stripe)

Raid 1 (Mirror) — 2 Drives

Raid 5 (Drives with Parity) — Minimum 3 Drives

Raid 6 (Drives with Double Parity) — Minimum 4 Drives

Raid 10 (Mirror+Stripe) or 0+1 (Stripe+Mirror) — Minimum 4 Drives

Raid 50 (Parity+Stripe) — Minimum 6 Drives

Raid 60 (Double Parity+Stripe) — Minimum 8 Drives

May 7, 2013 Posted by | RAID, Tips & Tricks | , | 2 Comments

Protected: RAID Types – 0, 1, 5, 6, 0+1, 10, 50, 60

This content is password protected. To view it please enter your password below:

May 2, 2013 Posted by | RAID, Tips & Tricks | , | Enter your password to view comments.