Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
RAID switch Gentoo->FreeBSD, gurus needed: how to convert
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
MrUlterior
Guru
Guru


Joined: 22 Mar 2005
Posts: 511
Location: Switzerland

PostPosted: Thu Jun 23, 2005 11:16 am    Post subject: RAID switch Gentoo->FreeBSD, gurus needed: how to convert Reply with quote

Scenario:

I need to convert my Gentoo 2005.0 file server to FreeBSD 5.4 -- the reasons are simple:

1. On the technical end of things since Kernel 2.6.x and Samba > 2.2.x -- various appliances that use my network are no longer able to access my Samba shares on the file-server, which is extremely irritating. Two months of troubleshooting & downgrading Gentoo's kernel and samba versions hasn't helped. BSD works in the same config more or less out of the box, I won't even speculate why.
2. its just a file server; it doesn't need to be cutting edge but it does need to be secure (linked to 3)
3. I don't like having emerge break my fileserver when I need to apply security updates (kernel, samba, other daemons)

So the fact is: I need BSD.

Problem:

My file server has 16 hard disks; a mix of 120, 200 and 250gb drives paired with equal sized drives in a software RAID1 configuration using MDADM, so I have /dev/md0 through /dev/md8. On each of these devices I have a single EXT3 file system, these are on average 98% full. I have no spare disks and can't presently afford to go out and buy any.

I'm intending to:

1. dd the boot disk and system partitions (8gb) across the network and back them up so in the worst scenario I may revert to the current semi working state of affairs with MDADM & Gentoo.

2. Remove 1 disk from each array leaving the 8 arrays 1/2 degraded.

3. Install BSD repartition and create an FS on each of the removed disks

4. Mount the linux RAID as EXT2 (as BSD doesn't support EXT3 but I understand EXT2 is indentical to EXT3 minus the journaling part .. ) and copy across the data from the old linux raid to my new bsd partitions

5. Gmirror the new BSD volumes into my new BSD RAID1

6. Drink several excessively alcoholic beverages in celebration of my success.

However the REAL problem for me is:

I can't find out ANYWHERE whether or not FreeBSD supports mounting EXT2 off of linux MD* partitions/volumes. If it doesn't -- that's my entire plan out the window along with many hours of work wasted, not to mention perfectly good alcohol left undrunk.

Let's be clear, I'm still a Gentoo user :D I have two laptops, and my desktops running it for good reason. I've just decided it's not what I need for a server; so no flames please -- I need your help not your insults. If you've any idea whether this will work, a better way to achieve the same thing, or anything constructive in general - say it LOUD, before I nuke my fileserver! :wink:

Hopefully this has been comprehensible.
_________________

Misanthropy 2.0 - enough hate to go around
Back to top
View user's profile Send private message
ansient
Guru
Guru


Joined: 22 Jan 2005
Posts: 445
Location: Argentina

PostPosted: Thu Jun 23, 2005 11:52 am    Post subject: Re: RAID switch Gentoo->FreeBSD, gurus needed: how to con Reply with quote

MrUlterior wrote:
I can't find out ANYWHERE whether or not FreeBSD supports mounting EXT2 off of linux MD* partitions/volumes. If it doesn't -- that's my entire plan out the window along with many hours of work wasted, not to mention perfectly good alcohol left undrunk.

Linux RAID1 volumes are an exact mirror of each other that can be mounted individually without md.

Just boot a BSD livecd and try mounting them.
Back to top
View user's profile Send private message
MrUlterior
Guru
Guru


Joined: 22 Mar 2005
Posts: 511
Location: Switzerland

PostPosted: Thu Jun 23, 2005 11:55 am    Post subject: Reply with quote

I'm intending to try that when downtime is convenient, however the partition type/id is "linux raid" not "linux", will this not prevent their recognition? I guess I'll find out, but being prepared in advance has never hurt.
_________________

Misanthropy 2.0 - enough hate to go around
Back to top
View user's profile Send private message
MrUlterior
Guru
Guru


Joined: 22 Mar 2005
Posts: 511
Location: Switzerland

PostPosted: Mon Jun 27, 2005 8:23 am    Post subject: Reply with quote

For anyone else who might be attempting this;

I've just spent the weekend rebuilding this server & installing FreeBSD 5.4 -- I proceded pretty much I described above. FreeBSD does indeed support "linux raid autodetect" partitions and is able to mount an ext3 partition that was part of an mdadm array.

1. Backed up my root partition using tar/bzip2 and -l (one filesystem option) and burnt it to dvd-r and took a partimage of my /boot partition and MBR for worst-case recovery

2. Removed 1 drive from the linux / (root) RAID array, used fdisk in linux to remove all its partitions

3. Installed FreeBSD on this disk (ad0)

4. Mounted all ad1s1 thru ad15s1 ("linux raid autodetect" partition types with ext3 filesystems on them) using mount_ext2fs. At this point 2 drives failed to mount, so I booted back into linux determined that the drives were NOT from the same array, nuked all the partitions from the remaining 7 disks that were 2nd in my RAID

5. Booted into FreeBSD, used sysinstall to create a single slice w/ ufs2 label on each of the 7 free disks, mounted them & rsync'd all data from the linux ext3 drives to them.

This evening I shall be nuking the linux partitions and creating a gmirror array with them. Hopefully by the end of tonight I will have a completely viable redundant FreeBSD file server.

As a final note I didn't find much information on dual booting FreeBSD/Gentoo with FreeBSD, everything I could find indicated that no version of grub supported ufs2. When I attempted to add my new BSD install (made no changes to Mbr & installed no boot loader) grub 0.94 did not recognize the ufs2 partitions. I had to rebuild grub 0.97 in order to get dual boot working.
_________________

Misanthropy 2.0 - enough hate to go around
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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