Saturday, January 19, 2008

secure add more space to server to store stuff

ok a standard process.

1 added 2 new drives and moved out old one
have now
mdo-md6 thus 7 raids = 8 sata drives + 1 pata drive
i used up all 8 places on the sata300 cards (4+4).

then when i put in new drives and booted up it did not find /dev/md5 (1 drive in place).
why not because it was now the device /dev/sdh1 while the
/etc/mdadm/mdadm.conf file did not have /dev/sdh1 in the first line.
so when i added it in to fix the line to say
DEVICES /dev/sd[abcdefgh]1
then we were ok and
all the old raids were found and created on bootup.


next we needed to create new raid /dev/md6.
so steps
fdisk -l
found the two new drives that did not have any formating

fdisk /dev/sde
and selected p 1 whole drive type fd
fdisk /dev/sdg
and selected p 1 whole drive type fd

then i did
mdadm -C /dev/md6 --level=1 --raid-devices=2 /dev/sd[eg]1

error device /dev/md6 not found
so i did
mknod b 9 6 /dev/md6

and then i did
mdadm -C /dev/md6 --level=1 --raid-devices=2 /dev/sd[eg]1
and it worked fine to start creating it
then
mkfs.ext3 /dev/md6
and
then we wait for the sync of the raid and the formating to happen

then we do the
creation of the new
/etc/mdadm/madm.conf
we need the new UUID for the raid...

so i did
cp /etc/mdadm/mdadm.conf /root/mdadm.conf

mdadm -E /dev/sde1 |grep UUI >>mdadm.conf

edit the mdadm.conf so that we now use the UUID to build the raid1 for /dev/md6
made sure that the devices line had /dev/sd[abcdefgh]1 so we can build all of them
then I edited the
/etc/init.d/raid_build_mount line to assemble and mount the new raid as
`mount /dev/md6 /home/big6 `
and then we are done.

No comments: