Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Raid, lvm or sth else? Need advice :)
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
Yatmai
Veteran
Veteran


Joined: 12 Nov 2005
Posts: 1501
Location: Kraków

PostPosted: Mon Jan 19, 2009 10:03 am    Post subject: [SOLVED]Raid, lvm or sth else? Need advice :) Reply with quote

I want to create one huge storage from 2 partitions - each of diffrent hdd. I know, I can use raid0, raid linear or lvm, but which method will allow me to recover any data from partition A, when part B fails?

I don't want to recover all - some data from that storage will be on disc A, and some on B. Then if ie. B fail (Tux bless out storages ;) ) I would like to recover data which was on disc A.

Is there any method, which allows that?
_________________
Desktop: [Ath64 X2 2GB DDR2 GF76GT] [amd64] [2.6.29-gentoo] [nVidia] [KDE 3.5.10]
Lapek: [HP nc6000] [i686] [2.6.29-ARCH] [ati-open] [KDE 3.5.10]


Last edited by Yatmai on Mon Jan 19, 2009 3:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
mgrela
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2008
Posts: 123
Location: Polska

PostPosted: Mon Jan 19, 2009 10:15 am    Post subject: Reply with quote

Neither LVM nor RAID won't help you achieve the result you want. LVM only combines block devices into larger ones so when one of your drives fails you will loose half of your filesystem. On the other hand, havin RAID with only two drives doesn't make much sense. Just create a filesystem on each hdd and mount them as subdirectories of a common mountpoint, ie. /mnt/storage/hdd0 and /mnt/storage/hdd1.

br,
_________________
Maciej Grela
You just keep on trying till you run out of cake.
Back to top
View user's profile Send private message
dirk_salewski
Apprentice
Apprentice


Joined: 04 Jun 2003
Posts: 216
Location: Germany

PostPosted: Mon Jan 19, 2009 10:44 am    Post subject: Re: Raid, lvm or sth else? Need advice :) Reply with quote

Yatmai wrote:
which method will allow me to recover any data from partition A, when part B fails?

A Raid1 (mirror) combining partitions A and B into one device would do that. You will obviously loose 50% of the combined space, since each file will be mirrored on each of the partitions. You would have a single device "/dev/mdX" afterwards. If your partitions are quite large (e.g. both 50G) then your single device will be large, too, so on top of this device you could then use lvm to make smaller and better manageable chunks of it.
_________________
Egal was Du kochst: Karl Marx.
Back to top
View user's profile Send private message
Yatmai
Veteran
Veteran


Joined: 12 Nov 2005
Posts: 1501
Location: Kraków

PostPosted: Mon Jan 19, 2009 10:54 am    Post subject: Reply with quote

I know, but I already have raid1 matrix for most important data :) The storage, I was talking about is about 400GB, so 50% lost from this would be too much.
_________________
Desktop: [Ath64 X2 2GB DDR2 GF76GT] [amd64] [2.6.29-gentoo] [nVidia] [KDE 3.5.10]
Lapek: [HP nc6000] [i686] [2.6.29-ARCH] [ati-open] [KDE 3.5.10]
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Mon Jan 19, 2009 1:10 pm    Post subject: Reply with quote

You have some options then

Easiest: as mgrela already wrote, mount them into subdirectories and do the splitting yourself.

or: buy another drive and do RAID5 (will loose you the capacity of the new drive only)

or: buy a drive big enough to hold all the data and do RAID0 (or LVM for that matter) with regular backups.

The backup is advisable anyway, regardless if you choose LVM, RAID0, RAID5 or two mountpoints. The best RAID can only protect you from failing hardware. Not from errouneous software, user-malfunction :twisted: or other possible reasons for lost data.
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
mgrela
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2008
Posts: 123
Location: Polska

PostPosted: Mon Jan 19, 2009 2:06 pm    Post subject: Reply with quote

Have you seen mhddfs ?
http://debaday.debian.net/2008/05/25/mhddfs-join-several-real-filesystems-together-to-form-a-single-larger-one/
_________________
Maciej Grela
You just keep on trying till you run out of cake.
Back to top
View user's profile Send private message
Yatmai
Veteran
Veteran


Joined: 12 Nov 2005
Posts: 1501
Location: Kraków

PostPosted: Mon Jan 19, 2009 3:58 pm    Post subject: Reply with quote

mgrela wrote:
Have you seen mhddfs ?
http://debaday.debian.net/2008/05/25/mhddfs-join-several-real-filesystems-together-to-form-a-single-larger-one/


Awesome :D
I've done some quick performance tests. 4 partitions ~250MB in raid linear array vs mhddfs - copy from another partition 800 files, 1MB each.
Matrix - 49s, 48s
Mhddfs - 50s, 51s, and after I set mlimit to 100Mb - 48s


Well, I was worring about delays from fuse, but results are very positive and migration to mhddfs will be much easier than to raid or lvm.

Thanks for sugestions,
Dzięki Maćku :)
_________________
Desktop: [Ath64 X2 2GB DDR2 GF76GT] [amd64] [2.6.29-gentoo] [nVidia] [KDE 3.5.10]
Lapek: [HP nc6000] [i686] [2.6.29-ARCH] [ati-open] [KDE 3.5.10]
Back to top
View user's profile Send private message
mgrela
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2008
Posts: 123
Location: Polska

PostPosted: Mon Jan 19, 2009 7:45 pm    Post subject: Reply with quote

Your benchmarks seem to be very promising :). I thought, that a fuse solution would be much slower. But then maybe it is time to move out all the filesystems from the kernel to userspace ;). Now I'm almost certain I will use mhddfs on my own storage box when I spare some time to build one.

br,
_________________
Maciej Grela
You just keep on trying till you run out of cake.
Back to top
View user's profile Send private message
szczerb
Veteran
Veteran


Joined: 24 Feb 2007
Posts: 1709
Location: Poland => Lodz

PostPosted: Mon Jan 19, 2009 8:04 pm    Post subject: Reply with quote

In case someone didn't find this already, here is a pretty fresh (3 days old) ebuild:
https://bugs.gentoo.org/show_bug.cgi?id=220451
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Tue Jan 20, 2009 12:23 am    Post subject: Reply with quote

Oh man, this is super awesome ... I can't wait to do some testing on this.

I've been looking for a solution to form one directory out of multiple USB drives. LVM/RAID obviously wouldn't be a solution, but I'm willing to bet this could take it to task.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
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