Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th October 2011, 15:55
mccyberix mccyberix is offline
Member
 
Join Date: Aug 2006
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default Software RAID1 on Debian(Squeeze) GRUB2 and GPT drives

hi folx,
I've tried to setup a sw RAID1 on a Debian(squeeze) box using two 2TB GPT drives following the corresponding tutorial but with no luck. I have to do some minor changes since the tutorial does not cover the use of GPT drives. Here is what I've done different as suggested:

"sgdisk --replicate=/dev/sdb /dev/sda" (I've used this to copy the partition tables)

"sgdisk --randomize-guids --move-second-header /dev/sdb" (and this to randomize the GUID)

and finally I renamed the mdraid module to mdraid1x in "09_swraid1_setup"

except this I have exactly followed the tutorial and all went fine until the step where I have to "mdadm --add /dev/md1 /dev/sda3". It always drops the error "cannot open /dev/sda3 device or resource is busy" md1 is my actual mounted "/" and sda3 was the "/" before I booted with md1. I am also able to skip that step and going to the end of the tutorial but when I do this my md1 has only one drive. I also checked what is occupying my sda3 device and saw that "jbd2" was running on that device. So I've really tried everything that was on my mind but no chance to release the sda3 and add it to the md1 array. I also have tried to recreate the sda3 partition and delete the data on it but then my system won't boot anymore, IMHO the system is still using the sda3 and not only md1 as it should.
I hope somebody can help me out I'm slowly getting mad with this since I'm sitting the whole week trying/failing and goggling without success.

thx in advance
Reply With Quote
Sponsored Links
  #2  
Old 12th October 2011, 11:11
mccyberix mccyberix is offline
Member
 
Join Date: Aug 2006
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default I have lost my patience...

I have to build up my system as soon as possible so I decided to make the RAID1 on a fresh install which is pretty straight forward. I'm not sure if the partman(standard partitioning tool invoked during debian setup) can create GPT, in my case it didn't, therefore I used gdisk or similar to create the GPT table on every disk which I want to use in the array (fdisk cannot handle the GPT). If you proceed building up your RAID1 based on MBR instead of GPT you won't be able to install GRUB2, this is really annoying since installing GRUB2 is almost the last step in the installation process. To be able to boot from any device of your array you just have to install GRUB2 on each of it using this command

grub-install /dev/sdb
grub-install /dev/sdc
grub-install /dev/sdd...

I know this is not an option for people who need to make RAID1 on a running system but in my case it was easier to build up the whole system on a fresh install then getting RAID1 on a running system.

have a nice day!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:43.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.