Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
RAID-1 for non-system partitions?
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
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 617

PostPosted: Fri Apr 19, 2013 5:11 pm    Post subject: RAID-1 for non-system partitions? Reply with quote

Hi, I have a question, I'm about to create a RAID-1 array for my data partitions only and not the system partitions (which are on a SSD). There are lots of tutorials on setting up a RAID-1 system but they all assume that it is the whole system being RAIDed. So there is lots of talk about setting up swap and grub and /boot etc. Is it even possible to just set-up RAID-1 for only a few non-system partitions? An opinion or some direction would be appreciated. Maybe this is a silly question once I actually get into it but I wanted to know up front if I need to re-think my strategy. Thank you.

dq
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Apr 19, 2013 6:29 pm    Post subject: Reply with quote

don quixada,

Just make raid1 for the filesystems you want on raid1 and add them to fstab in the normal way.
The raid set(s) will need to be started as part of the boot process, so you will need mdadm in the boot runlevel. You will also need a /etc/mdadm.conf to describe the raid sets to mdadm.

I'm assuming you don't want to assemble the raid sets in an initrd?
You can but its not needed and you will not use kernel auto assembly.

If you really want kernel raid autoassembly, you must use raid superblock version 0.90 and mark the partitions as type 0xfd.
Note that auto assembly has been depreciated for a long time now.
_________________
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
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 617

PostPosted: Sat Apr 20, 2013 5:31 pm    Post subject: Reply with quote

Nice! looks simple enough although clearly I need to read more on this because I'm not sure what some of the things you mention are... I will try some stuff and report my results...

dq
Back to top
View user's profile Send private message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 617

PostPosted: Mon Apr 22, 2013 6:15 pm    Post subject: Reply with quote

I received an error when I created the array:
Code:
# mdadm --create --verbose /dev/md1 --level=1 --raid-devices=2 /dev/sd[ab]1

/dev/md1 alignment is offset by 512 bytes


It did it for all the partitions I created.

How do I fix? Is this an issue for RAID-1? I noticed on sites that people said that for RAID-1 is doesn't matter but if there is any slowdown at all I may as well fix it from the start...

Also, I can't seem to mount an ext4 partition. Does ext4 work with RAID systems?

Thanks.

dq
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Apr 22, 2013 8:19 pm    Post subject: Reply with quote

don quixada,

It matters a great deal.

The system has detected that you have drives with 4kbyte physical sectors and that your partitions are not aligned on 4k boundaries.
It worlks but its very slow as the drive has to do read/modify/writes to cope with the misalignment.
Some suggestions show that there is a factor of 30x speed loss.

It sounds like you used a old version of fdisk, that put your first partition at sector 63, which while traditonal, is not what you want at all.

Remake your partitions, with either parted or an up to date fdisk, since they will get the alignment correct for you.
Check that the start sector is a multiple of 4k bytes. If you display the partition table in sectors, all the start sectors must be exactly divisible by 8.

Remake your partitions and your raid sets.
_________________
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
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 617

PostPosted: Tue Apr 23, 2013 1:55 am    Post subject: Reply with quote

I used cfdisk, is that no good? I've always used that one. Also, I used all primary partitions (four in total). Should I switch to logical?

dq
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Apr 23, 2013 4:54 pm    Post subject: Reply with quote

don quixada,

I don't knoow cfdisk.

What matters is the partition start sectors, not the tool you use. If your first partition starts at sector 63, you need to fix it somehow.

It doesn't matter if you use logical or primary partitions.
_________________
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
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 617

PostPosted: Tue Apr 23, 2013 9:00 pm    Post subject: Reply with quote

Ok, it seemed to work when I used fdisk although I'm not used to thinking in terms of sectors. I couldn't find anywhere in the Gentoo documentation on how to stop the array so I could re-partition but a quick search on the web showed me 'mdadm -S /dev/mdX' will stop the corresponding RAID-1 partition. I'll report any other strange happenings or problems.... Thank you for your help!

dq
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