Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Multi Disk array
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
Flarkis
Apprentice
Apprentice


Joined: 06 Aug 2008
Posts: 198
Location: Tallinn, Estonia

PostPosted: Mon Jul 27, 2009 5:43 am    Post subject: Multi Disk array Reply with quote

My problem is prety simple and probably a one word answer. I am setting up a server computer in my house to host music, photos, and videos. My means are rather limited for the time being and i only have an 80gb drive, a 40gb drive, and a 30gb drive. What i am trying to do is set them up so they will appear as a 150gb drive.

From the little bit of reading around ive done it seems as though using raid0 will only use the size of the smallest disk. So 20gb*3. But im not sure about the validity of what i read. And i dont think LVM is what im looing for.

Any insight?
_________________
Veni, Vidi, Vici
[I came, I saw, I conquered]
Back to top
View user's profile Send private message
Sysa
Apprentice
Apprentice


Joined: 16 Mar 2005
Posts: 161
Location: Europe

PostPosted: Mon Jul 27, 2009 6:16 am    Post subject: Re: Multi Disk array Reply with quote

RAID0 is not a perfect solution: if any of your HDDs will fail (BTW: it looks like your disks are old, so this event has a very high probability), - you'll lose all your data! I suggest to make a small (mine is 256Mb!) RAID1 (2 x mirror + 1 spare) root partition (ext3) and other space dedicatate to LVM. It lets you to utilize all your disks capacity and to simplify future HDD replacing and upgrading procedures. Do not forget to start SmartMon as well!
Flarkis wrote:
My problem is prety simple and probably a one word answer. I am setting up a server computer in my house to host music, photos, and videos. My means are rather limited for the time being and i only have an 80gb drive, a 40gb drive, and a 30gb drive. What i am trying to do is set them up so they will appear as a 150gb drive.

From the little bit of reading around ive done it seems as though using raid0 will only use the size of the smallest disk. So 20gb*3. But im not sure about the validity of what i read. And i dont think LVM is what im looing for.

Any insight?

_________________
RedHat -> SuSE -> Debian -> Gentoo
Back to top
View user's profile Send private message
Kollin
Veteran
Veteran


Joined: 25 Feb 2006
Posts: 1139
Location: Sofia/Bulgaria

PostPosted: Mon Jul 27, 2009 10:16 am    Post subject: Reply with quote

Common desktop hard drives behaved very badly on my raid 10, i was forced to replace them all with raid edition hdds (thanx god i`ve lost only my home partition). Did you consider NAS (with gigabit ports, there are even NASs with raid) for storage of your precious data? :idea:
_________________
"Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..."
Back to top
View user's profile Send private message
Flarkis
Apprentice
Apprentice


Joined: 06 Aug 2008
Posts: 198
Location: Tallinn, Estonia

PostPosted: Mon Jul 27, 2009 6:07 pm    Post subject: Reply with quote

This rig is more for convenience than anything else. I am not worried at the moment about data security/safety. Everything being stored on the computer will have a backup somewhere any ways. For example my mother would like a way to get her photos without having to grab her backup CDs all the time.

Just a little bit more information about the computer being turned into the server. Its an old dell with 1.8ghz centrino 2, 512gb ram, and room for 4 HDDs. Also we are only going to be using it for about a year, and hardly a heavy work load on it.

Reading about the NAS that seems like more or less what im setting up. But the computer will still have a keyboard mouse and screen.

@sysa
From what i understand your suggestion is to make my root partition on raid1 and use the rest of the disk space as LVM so i can utilize the disk to the fullest. This seems like an ideal situation. My only problem is i dont quite undertand what you mean about the root partition. RAID1 is mirror, so every disk would have a mirror of the root. I dont understand what you mean about "...+ 1 spare". Also what would be the advantages to mirroring the root partition. Other than theoretically faster load time of libraries, programs, etc.

Thanks for the help so far guys
_________________
Veni, Vidi, Vici
[I came, I saw, I conquered]
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Mon Jul 27, 2009 7:28 pm    Post subject: Reply with quote

respectfully, I think LVM is *precisely* what you're looking for.
It would accomplish this task perfectly.

RAID in this case would be more of a pain to set up than it's worth, for nominal benefit. Don't fuss with RAID, just set up your usual partitions, then one large LVM volume spanning the free space on each disk


Last edited by cach0rr0 on Mon Jul 27, 2009 7:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
Sysa
Apprentice
Apprentice


Joined: 16 Mar 2005
Posts: 161
Location: Europe

PostPosted: Mon Jul 27, 2009 7:29 pm    Post subject: Reply with quote

Flarkis wrote:
...
@sysa
From what i understand your suggestion is to make my root partition on raid1 and use the rest of the disk space as LVM so i can utilize the disk to the fullest. This seems like an ideal situation. My only problem is i dont quite undertand what you mean about the root partition. RAID1 is mirror, so every disk would have a mirror of the root. I dont understand what you mean about "...+ 1 spare". Also what would be the advantages to mirroring the root partition. Other than theoretically faster load time of libraries, programs, etc.
...

You have 3 HDDs (ref. to your 1st message: an 80gb drive, a 40gb drive, and a 30gb drive), so you should to dedicate 1 small (e.g. 256Mb partition) on every HDD for RAID1 (e.g. md0 with hda1, hdc1) with 1 spare (e.g. hdb1). You'll mount /dev/md0 as a root and create your VG with hda2, hdb2, hdc2 as PVs. Please look at one of my office PC (desktop) mount table (/dev/mapper/xxx - LVM LVs):
Code:
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/md0                253679    123394    117188  52% /
/dev/mapper/sys-opt     524268    287868    236400  55% /opt
/dev/mapper/sys-usr    4194172   2525328   1668844  61% /usr
/dev/mapper/sys-var    1048540    235964    812576  23% /var
/dev/mapper/sys-log    1048540    789084    259456  76% /var/log
/dev/mapper/aux-vartmp 8388348     32840   8355508   1% /var/tmp
/dev/mapper/aux-tmp    1048540     34320   1014220   4% /tmp
/dev/mapper/sys-home  72140640  70056376   2084264  98% /home
/dev/mapper/aux-portage 8388348   3463580   4924768  42% /usr/portage

The advantage is clear - reliability! Since it is the ROOT!
FYI: my LVM (see above) has 2 VG: sys (based on another RAID1 - md1) and aux (based on rest HDDs).
BTW: Never mount root on LVM! Also I recommend do not use cheap HW RAID (e.g. embedded) - software RAID is better! One more disadvantage of proprietary HW RAID is a possible problem to access your data in case of replacement of the HW RAID controller (due to HW failure, upgrade etc).
_________________
RedHat -> SuSE -> Debian -> Gentoo
Back to top
View user's profile Send private message
Sysa
Apprentice
Apprentice


Joined: 16 Mar 2005
Posts: 161
Location: Europe

PostPosted: Mon Jul 27, 2009 7:42 pm    Post subject: Reply with quote

cach0rr0 wrote:
respectfully, I think LVM is *precisely* what you're looking for.
It would accomplish this task perfectly.

RAID in this case would be more of a pain to set up than it's worth, for nominal benefit. Don't fuss with RAID, just set up your usual partitions, then one large LVM volume spanning the free space on each disk

What could be wrong with RAIDs?! It is simpler than the LVM is!
Easy to create, easy to maintain and keep you away from a headache in case of any HDD failure... In my solution it takes only 512Mb (2 x 256Mb) of total 150Gb.
_________________
RedHat -> SuSE -> Debian -> Gentoo
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Mon Jul 27, 2009 7:54 pm    Post subject: Reply with quote

Sysa wrote:
cach0rr0 wrote:
respectfully, I think LVM is *precisely* what you're looking for.
It would accomplish this task perfectly.

RAID in this case would be more of a pain to set up than it's worth, for nominal benefit. Don't fuss with RAID, just set up your usual partitions, then one large LVM volume spanning the free space on each disk

What could be wrong with RAIDs?! It is simpler than the LVM is!
Easy to create, easy to maintain and keep you away from a headache in case of any HDD failure... In my solution it takes only 512Mb (2 x 256Mb) of total 150Gb.



Can you resize a RAID volume without taking the file system offline?
Can you add a new drive to a RAID array without rebooting the box?
Back to top
View user's profile Send private message
Sysa
Apprentice
Apprentice


Joined: 16 Mar 2005
Posts: 161
Location: Europe

PostPosted: Mon Jul 27, 2009 7:56 pm    Post subject: Reply with quote

Kollin wrote:
Common desktop hard drives behaved very badly on my raid 10, i was forced to replace them all with raid edition hdds (thanx god i`ve lost only my home partition). Did you consider NAS (with gigabit ports, there are even NASs with raid) for storage of your precious data? :idea:

What was wrong with your RAID10? General purpose ("common desktop" you name it) HDDs work fine for one of my SOHO server (up to 10 users) during 2 years under heavy duty (VMware server with FireBird DB (30+ instances), terminal server and Samba file server, mail & DNS server):
Code:
Personalities : [raid1] [raid10] [raid6] [raid5] [raid4]
md1 : active raid5 sda2[0] sdd2[3] sdc2[2] sdb2[1]
      27868992 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]

md3 : active raid10 sdd3[3] sdc3[2] sdb3[1] sda3[0]
      59037440 blocks 64K chunks 2 near-copies [4/4] [UUUU]

md2 : active raid10 sdd4[3] sdc4[2] sdb4[1] sda4[0]
      234440704 blocks 256K chunks 2 far-copies [4/4] [UUUU]

md0 : active raid1 sdd1[2](S) sdc1[3](S) sdb1[1] sda1[0]
      261440 blocks [2/2] [UU]

Also do not forget that author asked for *budget* solution! ;)
_________________
RedHat -> SuSE -> Debian -> Gentoo
Back to top
View user's profile Send private message
Sysa
Apprentice
Apprentice


Joined: 16 Mar 2005
Posts: 161
Location: Europe

PostPosted: Mon Jul 27, 2009 8:08 pm    Post subject: Reply with quote

cach0rr0 wrote:
Sysa wrote:
cach0rr0 wrote:
respectfully, I think LVM is *precisely* what you're looking for.
It would accomplish this task perfectly.

RAID in this case would be more of a pain to set up than it's worth, for nominal benefit. Don't fuss with RAID, just set up your usual partitions, then one large LVM volume spanning the free space on each disk

What could be wrong with RAIDs?! It is simpler than the LVM is!
Easy to create, easy to maintain and keep you away from a headache in case of any HDD failure... In my solution it takes only 512Mb (2 x 256Mb) of total 150Gb.



Can you resize a RAID volume without taking the file system offline?
Can you add a new drive to a RAID array without rebooting the box?

Please read my message once more - I do NOT suggest to use the RAID technology INSTEAD of the LVM but TOGETHER with it! The RAID is needed to PROTECT the root data and YES, you CAN add your spare disk online to replace the broken one. Of course, today's LVM is able to make a mirror but it is not stable enough and I do not like recommend it for a production system. Especially for a novice.
_________________
RedHat -> SuSE -> Debian -> Gentoo
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Mon Jul 27, 2009 8:32 pm    Post subject: Reply with quote

Sysa wrote:

Please read my message once more - I do NOT suggest to use the RAID technology INSTEAD of the LVM but TOGETHER with it! The RAID is needed to PROTECT the root data and YES, you CAN add your spare disk online to replace the broken one. Of course, today's LVM is able to make a mirror but it is not stable enough and I do not like recommend it for a production system. Especially for a novice.



Understood and acknowledged, my statement was purely with regards to:

Quote:

What could be wrong with RAIDs?! It is simpler than the LVM is!


In his case I think introducing RAID may be overly complicated, and just overkill in general.
Redundancy is a great thing indeed, but for his purposes? I see very little potential gain, especially if you're only mirroring root.

Personal preference. I *do* see the benefit in having root mirrored; however I don't believe it's worth the extra trouble in his case.

GOAL: combine three smaller disks so they're viewed as one larger disk
EASIEST SOLUTION: do a standard install, using LVM (per Daniel Robbins' HOWTO page)

RAID is just an additional step above and beyond this, that isn't strictly needed to reach his goal. He can accomplish all of this without any RAID setup whatsoever.
Back to top
View user's profile Send private message
Flarkis
Apprentice
Apprentice


Joined: 06 Aug 2008
Posts: 198
Location: Tallinn, Estonia

PostPosted: Mon Jul 27, 2009 8:39 pm    Post subject: Reply with quote

Ok well thanks for all the help everyone. I have decided what setup i am going to use. Being that this is also a learning experiment for me i figure i will try and set up both a RAID0 and LVM.

@ Sysa
Thanks for all the great advice.

BTW for the rest of you. This being a server that will only be turned on when i need it, rebooting is hardly a problem. I also mentioned earlier that there would not be a heavy load on this. Nor will there ever be.

Never the less thanks to all
_________________
Veni, Vidi, Vici
[I came, I saw, I conquered]
Back to top
View user's profile Send private message
hielvc
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2805
Location: Oceanside, Ca

PostPosted: Tue Jul 28, 2009 12:52 am    Post subject: Reply with quote

Flarkis you cant use raid0 for your boot partition. Grub doesn't understand raid0. So on your 80gig mske 30 to 50meg partition for /boot. ALso I assume that these are IDE ? If so do you also have a CDRW or DVD ? This can really slow down your down your raid.
_________________
An A-Z Index of the Linux BASH command line
Back to top
View user's profile Send private message
Flarkis
Apprentice
Apprentice


Joined: 06 Aug 2008
Posts: 198
Location: Tallinn, Estonia

PostPosted: Tue Jul 28, 2009 12:57 am    Post subject: Reply with quote

I always made a unique /boot. But thanks anyways. As for the CDRW i dont understand exactly what you mean about how this could slow things down.
_________________
Veni, Vidi, Vici
[I came, I saw, I conquered]
Back to top
View user's profile Send private message
hielvc
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2805
Location: Oceanside, Ca

PostPosted: Tue Jul 28, 2009 1:12 am    Post subject: Reply with quote

IDE runs at the fastest speed of the slowest device. CD's and DVD drives are slow slow slow, usually ata33. Your HDs are probably ATA 66, 100 or 133. You can still do raid0 but it wont be as fast as if there wasn't CD drive on the same IDE as one of the HDDs. I would put the slowest drive on the same IDE as the CD drive.
_________________
An A-Z Index of the Linux BASH command line
Back to top
View user's profile Send private message
Flarkis
Apprentice
Apprentice


Joined: 06 Aug 2008
Posts: 198
Location: Tallinn, Estonia

PostPosted: Tue Jul 28, 2009 3:20 am    Post subject: Reply with quote

ahhh. Ok thank you. Guess that makes sense. Well the current CD drive is broken and i was just scavenging one from a computer laying around the house for the soul purpose of booting the live cd. Ill keep your thought in consideration.
_________________
Veni, Vidi, Vici
[I came, I saw, I conquered]
Back to top
View user's profile Send private message
Sysa
Apprentice
Apprentice


Joined: 16 Mar 2005
Posts: 161
Location: Europe

PostPosted: Tue Jul 28, 2009 8:03 am    Post subject: Reply with quote

Flarkis wrote:
I always made a unique /boot. But thanks anyways. As for the CDRW i dont understand exactly what you mean about how this could slow things down.

Of course, you have to use RAID1 only for the /root.
IMHO: it is not worth to have a separate /boot - it perfect fits (BTW: with few kernels) in a small (256Mb) /root I talked about... Please find below my partition tables:
Code:
Disk /dev/hda: 120.0 GB, 120034123776 bytes
21 heads, 48 sectors/track, 232581 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x642e701f

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *          48      524159      262056   fd  Linux raid autodetect
/dev/hda2          524160    80293247    39884544   fd  Linux raid autodetect
/dev/hda3        80293248   158449503    39078128   fd  Linux raid autodetect
/dev/hda4       158449504   234441647    37996072   8e  Linux LVM

Disk /dev/hdb: 41.1 GB, 41110142976 bytes
21 heads, 48 sectors/track, 79656 cylinders, total 80293248 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0xc6e6c6e6

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1   *          48      524159      262056   fd  Linux raid autodetect
/dev/hdb2          524160    80293247    39884544   fd  Linux raid autodetect

FYI: The /dev/hdc is damaged at the time being :( and not shown here (it should be a member of md0 and md2 - see below):
Code:
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md2 : active raid1 hda3[1]
      39078016 blocks [2/1] [_U]

md1 : active raid1 hdb2[1] hda2[0]
      39884480 blocks [2/2] [UU]

md0 : active raid1 hdb1[0] hda1[1]
      261952 blocks [2/2] [UU]

PS: Also do not worry regarding the slow HDD access - your HDDs are old and slow itself ;).
_________________
RedHat -> SuSE -> Debian -> Gentoo
Back to top
View user's profile Send private message
Flarkis
Apprentice
Apprentice


Joined: 06 Aug 2008
Posts: 198
Location: Tallinn, Estonia

PostPosted: Tue Jul 28, 2009 4:49 pm    Post subject: Reply with quote

haha thanks...well i was able to find a 4th drive laying around the house to it now looks like my system will have around 310gb. And again doesn't really matter if these things are slow. Im now putting the computer together from 3 old ones laying around and anything that friends i have dont need.
_________________
Veni, Vidi, Vici
[I came, I saw, I conquered]
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