Saturday, July 10, 2010

Configuring raid from the command line in Centos

Well just coming back from a wonderful vacation and now im back in thinking mode. I'm a junkie when it comes to the command line in unix/linux so today im going to configure software raid on centos using the mdadm command. Now this is just a short tutorial on how to do that if you need any more information just do a man mdadm :). Here are the following steps that i took to setup software raid in centos linux:

Step 1. Check for all the hd drives on your box, using the following command dmesg | grep -i ^scsi (In this case its scsi since i love scsi)


dmesg | grep -i ^scsi
SCSI subsystem initialized
scsi0 : ioc0: LSI53C1030 B0, FwRev=01032920h, Ports=1, MaxQ=128, IRQ=67
SCSI device sda: 167772160 512-byte hdwr sectors (85899 MB)
SCSI device sda: 167772160 512-byte hdwr sectors (85899 MB)
SCSI device sdb: 167772160 512-byte hdwr sectors (85899 MB)
SCSI device sdb: 167772160 512-byte hdwr sectors (85899 MB)
SCSI device sdc: 167772160 512-byte hdwr sectors (85899 MB)
SCSI device sdc: 167772160 512-byte hdwr sectors (85899 MB)
SCSI device sdd: 167772160 512-byte hdwr sectors (85899 MB)
SCSI device sdd: 167772160 512-byte hdwr sectors (85899 MB)


Step 2. Setup the raid using the following command: mdadm --create /dev/md0 --level 1 --raid-devices 2 /dev/sdb /dev/sdc

Step 3. Check the status of the raid sync with cat /proc/mdstat and you should see the following output: cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdc[1] sdb[0]
83886016 blocks [2/2] [UU]
[===============>.....] resync = 75.4% (63301376/83886016) finish=1.7min speed=200001K/sec

keep checking this file until resync is at 100%.


Well This is all for now like i said earlier if you need more information do a man mdadm and you will find out all you need to know.

No comments:

Post a Comment

Cracking Kerberos Service Tickets (TGS) Using Kerberoasting

As of late I've been spending a lot of time researching and learning different techniques when it comes to attacking Active Directory En...