Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing to raid0+1 and swap?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Thu Oct 04, 2012 9:08 am    Post subject: Installing to raid0+1 and swap? Reply with quote

Finally have the time to change file server from Windows to Gentoo but have a few questions about raid and swap.

This is the layout I have come up with, nice and simple

100m /boot

Code:
mdadm --create --verbose /dev/md0 --level=1 --raid-devices=4 /dev/sd[abcd]1



???? /swap - see below


Code:
mdadm --create --verbose /dev/md1 --level=0 --raid-devices=4 /dev/sd[abcd]2



15G /


Code:
mdadm --create --verbose /dev/md2 --level=01 --raid-devices=4 /dev/sd[abcd]3



rest of the drives for /home


Code:
mdadm --create --verbose /dev/md3 --level=01 --raid-devices=4 /dev/sd[abcd]4



Is that the right way to make Raid0+1 arrays? I have looked at the Gentoo docs but they just tend to give Raid 0 1 5 examples.

As for swap how much do you need for swap? I normally use the 1.5 X ram method, but is this still the way to do it ? There is 4G of ram in there atm so i would normally put the swap file at 6G
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Oct 04, 2012 6:11 pm    Post subject: Reply with quote

Dark Foo,

If you need more than 512Mb swap on a desktop, you are doing something wrong. Your only excuse is hibernate to swap when you need swap>=RAM.

Why would you make a rais0 swap?
The kernel does something similar if you give it four swap partitions at the same priority. Losing swap is the same as giiving some of your applications a lobotomy. You will noyt like the result.
If you will use raid levels that provide redundency, whu skipm on swap.

If you will use grub1 on /boot, you must use version 0.90 raid metadata
If you want raid auto assembly you must use version 0.90 raid metadata too.

I think the level you want is 10 rather than 01.
Code:
man mdadm
talks about RAID10.

Why raid 10 and not raid5?
_________________
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
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Thu Oct 04, 2012 6:18 pm    Post subject: Reply with quote

after a lot of research it seems raid10 gives better performance and redundancy over raid5.

So other than the swap amount my approach is good?

I went for raid0 on swap for performance and seeing that swap is wiped on boot (or so i believe) what is the point in having it as raid10, I could make all of them raid10, i will be using grub2 as i mainly use amd64, to be honest i could make 2 raids one for boot and the other for everything else ,just needed a bit of information to be Forewarned is to be forearmed :D
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Oct 04, 2012 7:04 pm    Post subject: Reply with quote

Dark Foo,

Raid10 protects against the loss of a single drive and the loss of some combinations of two drives.
Raid0 on swap will kill any process using a spindle that fails. Don't expect your system to stay up with a failed in use swap partition.
_________________
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
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Thu Oct 04, 2012 7:06 pm    Post subject: Reply with quote

so use raid10 on all drives then ?
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Oct 04, 2012 7:19 pm    Post subject: Reply with quote

Dark Foo,

except /boot
_________________
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
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Thu Oct 04, 2012 7:28 pm    Post subject: Reply with quote

raid1 for boot?
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Oct 04, 2012 7:31 pm    Post subject: Reply with quote

Dark Foo,

Yes and pay attention to your metadata version.
_________________
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
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Thu Oct 04, 2012 7:33 pm    Post subject: Reply with quote

0.90 for boot - the others should be safe on the newer version i take it?

should i put the put the partitions as raid auto detect or leave them as linux native?

once i know this is should be good to go :)
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Oct 04, 2012 8:05 pm    Post subject: Reply with quote

Dark Foo,

If you want raid auto assembly you must use ver 0.90 metadata and flag the partitions as type 0xfd

If you use later metadata, raid autoassembly will not work and for root on raid, you will need an inirrd/initramfs to assemble root before it can be mounted.
In this case, the partition type is not important.
_________________
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
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Thu Oct 04, 2012 9:09 pm    Post subject: Reply with quote

guess i have enough information to get things going, guess i wont need a big swap on that machine as it will be on near all the time without it going to sleep, good to know i was right about swap for laptop :)

thanks neddy
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Sun Oct 07, 2012 9:13 am    Post subject: Reply with quote

Well here goes nothing!!!!! :lol:

is 512K chunk size too much, seems that the default it wants to go for
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Oct 07, 2012 11:10 am    Post subject: Reply with quote

Dark Foo,

If you don't know and reading the man page does not help, go with the default.
The reality is that thee is no single chunk size that suits all hardware and file system content.
_________________
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
FizzyWidget
Veteran
Veteran


Joined: 21 Nov 2008
Posts: 1133
Location: 127.0.0.1

PostPosted: Sun Oct 07, 2012 11:12 am    Post subject: Reply with quote

doesnt help googling it as every suggests a different size for the same sort of raid, have gone with 512 and will see how the system performs, if it's not as good as i think i can always try something else :)

Thanks for the help Neddy much appropriated
_________________
I know 43 ways to kill with a SKITTLE, so taste my rainbow bitch.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing 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