Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
RAID and distros
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
raungst
n00b
n00b


Joined: 20 Mar 2006
Posts: 37
Location: Denver, CO

PostPosted: Tue Jul 24, 2007 12:42 am    Post subject: RAID and distros Reply with quote

My gentoo server currently runs a RAID 1 array. I have a separate hard drive that runs the system, and the array is simply storage for the server. I've contemplated changing to a different linux distro, but what impact would this have on the RAID? For some reason, I thought the initialization was tied to the distribution..ie, if I installed a new distro on the system hard drive, I would have to reinitialize the array for it to work correctly. Is this the case?

Or, if I setup the device nodes, fstab, mdadm, etc correctly, will a new distro just see the array like nothing happened?

I apologize if this is a stupid question.

Thanks!
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9890
Location: almost Mile High in the USA

PostPosted: Tue Jul 24, 2007 12:50 am    Post subject: Reply with quote

I'd venture to guess that most distributions will find the RAID and give up on what to do with it... It may install fine but then it will get the boot sector wrong.

otherwise it should be the same underlying code that handles the software RAID.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
raungst
n00b
n00b


Joined: 20 Mar 2006
Posts: 37
Location: Denver, CO

PostPosted: Tue Jul 24, 2007 12:54 am    Post subject: Reply with quote

I don't understand why the boot sector would be involved. My system's hard drive is separate from the RAID. The two hard drives connected to the RAID 1 just have one big ext3 partition.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9890
Location: almost Mile High in the USA

PostPosted: Tue Jul 24, 2007 5:26 am    Post subject: Reply with quote

Oh, if it's totally separate then likely you can just ignore the disks and install to the other disk, re-enabling it later. All linux if they use the same kernel and same version software RAID, the disksets are interchangeable.

I boot off of my RAID5 disk set, thought it was more common to actually boot off of your array. I'm fairly certain most linux distributions will get my RAID setup wrong.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
HeissFuss
Guru
Guru


Joined: 11 Jan 2005
Posts: 414

PostPosted: Tue Jul 24, 2007 5:28 am    Post subject: Reply with quote

You shouldn't have a problem with the raid array as long as you're careful to install on the correct drive. If you have it set up with md raid and partitions of type autodetect, the new distro will likely just detect and bring up the raid for you. A good way to test this is to boot into the new distro's livecd (since I assume you're probably going to Ubuntu or another distro with a livecd) and see if your array gets activated (simple test: cat /proc/mdstat.) If you have a non autodetect raid, you may need to save and import your /etc/raidtab or /etc/mdadm.conf or whatever config happens to have the array layout stored in it.
Back to top
View user's profile Send private message
Jkay
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 214
Location: thatched-roof cottages

PostPosted: Tue Jul 24, 2007 6:15 am    Post subject: Reply with quote

Curious .. I have attempted several times over the past ten years to get random Linux distros to boot from my raid5 array, but all install and then fail to boot on the first "live boot" ... what's the cause and the solution? I used RedHat for years and then moved to Gentoo and both have screwed up in this manner, so I always boot from SATA/IDE and then mount the scsi raid5.
Back to top
View user's profile Send private message
Rob1n
l33t
l33t


Joined: 29 Nov 2003
Posts: 714
Location: Cambridge, UK

PostPosted: Tue Jul 24, 2007 8:26 am    Post subject: Reply with quote

AFAIK, you can't boot directly from a software RAID-5 array. Neither LILO nor GRUB understand RAID arrays, so unless the /boot directory is on a single disk then it can't be accessed. RAID-1 can be booted from as the boot manager can treat them as separate devices (all the data is replicated so either drive has the full /boot directory) - you should install grub on both disks though for redundancy.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9890
Location: almost Mile High in the USA

PostPosted: Tue Jul 24, 2007 5:48 pm    Post subject: Reply with quote

Right, my setup is weird. You can't boot directly off a raid5 array. However the whole disk doesn't need to be RAID5.

I have a 4-disk RAID5, with a 4-way RAID1 boot partition on that array. This is where I install GRUB on. So basically if any one of the disks die, I still have a 3-way RAID1 to boot off of, and the 3 remaining RAID5 partitions. Just hope that the auto-failover of BIOS will try the other disks.

I'm not certain if any distro would auto-detect this setup or not...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Rob1n
l33t
l33t


Joined: 29 Nov 2003
Posts: 714
Location: Cambridge, UK

PostPosted: Tue Jul 24, 2007 6:03 pm    Post subject: Reply with quote

eccerr0r wrote:
I'm not certain if any distro would auto-detect this setup or not...

Should do - providing the partition types are set as 0xfd (and they're using default version 0.90 RAID superblocks) then the kernel's auto-assembly code ought to find them.
Back to top
View user's profile Send private message
obrut<-
Apprentice
Apprentice


Joined: 01 Apr 2005
Posts: 183
Location: near hamburg, germany

PostPosted: Wed Jul 25, 2007 11:45 am    Post subject: Reply with quote

i built a 3 disk set with raid1 and several raid5s using raidtools (i guess more than 2 years ago) on another gentoo box. a few month ago i put it into another pc also running gentoo. at first the array was not autodetected and the raidtab was on one of these arrays :twisted: i then compiled the necessary stuff as part of the kernel and not as modules and the arrays were correctly detected the next time i rebooted. i don't know if mdadm or raidttools (whatever tool you used for building the array(s)) need to be installed for just mounting the arrays, but they won't hurt i guess.
because the arrays' metadata, the raid superblock, (which partitons belong to the array, their order, raid level, etc) are stored on the partitions itself. when theses metadata are written to all partitions (i think i had to tell the raidtools to do so) the kernel should not have any problem to automatically detect and reassemble the array.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9890
Location: almost Mile High in the USA

PostPosted: Wed Jul 25, 2007 8:16 pm    Post subject: Reply with quote

I guess it's not the fact whether or not it can autodetect, since it's the same Linux. However whether or not a specific distribution is smart enough to install the bootloader on the RAID1 and not bother trying to either install on /dev/hda or the RAID5, remains unclear...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54821
Location: 56N 3W

PostPosted: Wed Jul 25, 2007 8:32 pm    Post subject: Reply with quote

eccerr0r,

What sort of raid1 ? Kernel raid or BIOS software raid or even real hardware raid ?

You can boot from BIOS software raid (all raid levels) real hardware raid if the BIOS sees the controller (all raid levels) as these sorts of raid hide the data layout on the drives from grub. As you are using dmraid or a kernel module for your raid card, its distro agnostic., If it works for one it will work for them all.

Kernel raid is a bit harder. Its the same kernel modules for everyone but theres a difference. The raid does not exist until the kernel is running and grub must work before that time. Thus /boot must be raid1 or unraided, as grub cannot read kernel raid at all.
root and everything else can be any level you like because the kernel forms the raid sets before it tries to mount root.
These rules apply to all distros too.

In short, if you follow the rules for your sort of raid, it doesn't matter what distro you use.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum