Monday, August 15, 2016

RAID Levels- Part-2

Add new disks for RAID Creation

Create partitions using disks, partition type should be Linux raid AutoDetect (fd)

Creating RAID Device
# mdadm --create /dev/md0 --level=5 --raid-disk=3 /dev/sdb1 /dev/sdb2 /dev/sdb3
 

# mkfs.ext3 /dev/md0         - to make file system in RAID device
 

Mounting and using raid device
 

# mdadm –detail     /dev/md0        - to see the raid device details

# mdadm /dev/md0 --fail /dev/sdb3          - to do manual failure of disk
  
To see the detail of raid device and any failed disks
  

# mdadm /dev/md0 --remove /dev/sdb3               - Removing failed drive from RAID
  
# mdadm /dev/md0 --add /dev/sdb4         - Adding New disk to RAID Device
  
To Destroy RAID Device and its related disk completely wipe
# umount /raid         - to un mount the file system
# mdadm –stop /dev/md0   - Stopping RAID Device
# mdadm –remove /dev/md0         - to remove RAID Device
# fdisk /dev/sdb        use d to delete all the disks from OS
  

No comments:

Post a Comment