Make two disks appear as one big share on LAN

8

I bought 2 x 2TB disks for a NAS server, (linux debian). I want to make both drives appear as one big 4TB disk on the LAN. This can be done with software RAID (JBOD) or LVM I suppose.

There are other options?. One big plus would be knowing what happens when one drive fails in each option (I lose all the data or I still can access those on the working drive? Even for JBOD and LVM I still don't know what happens if a drive fails).

Diego

Posted 2013-03-10T01:51:57.920

Reputation: 245

Answers

4

Finally settled for this option:

Pooling only software option: http://romanrm.ru/en/mhddfs

It allows you to have two disks with separate (and complete) filesystems, and make those appear as a single tree from the LAN. Directories with the same name will be merged when listed. You start with one drive and when its full, it will create the file on the other drive (if it has free space). If you disconnect a drive, it stops showing it's content.

Other options where:

Alternatives to LVM and JBOD (check "OS/software"):

http://blog.superuser.com/2011/09/14/building-a-nas-server-2/

EDIT: Other software option: http://snapraid.sourceforge.net/

JBOD and LVM volumes fail completely in case of a disk failure:

http://forum.elitebastards.com/viewtopic.php?f=6&t=16838

https://serverfault.com/questions/338517/what-happens-when-a-disk-fails-in-lvm

EDIT2:

As suggested by @lelouch, mergerfs sounds like a better mantained and updated option to mhddfs. On defense of mhddfs, I have been using it with no mayor issues for the last 4 years (apart that one or two times where it dropped the mountpoint for no reason, but after rebooting everything was in place again).

Diego

Posted 2013-03-10T01:51:57.920

Reputation: 245

+1 To counter the downvotes after your clarifications. – Alberto – 2014-09-25T05:39:17.443

1Note, as of 2017, it's strongly recommended that you use mergerfs rather than mhddfs, which is buggy and outdated. – Amir – 2017-10-21T11:31:50.490

Somebody can explain the downvotes? – Diego – 2013-03-13T21:46:27.147

2Well, I didn't downvoted, but I guess I can help you: this is not an answer--even if you are the OP!--. This is just a list of links. At least, summarize what you are linking to, just in case the links are not available anymore in a few months. Even better, actually answer your own questions here and explain the answers. – Alberto – 2013-03-15T23:03:11.733

2

If not the slightest amount of reliability is required, RAID0 or JBOD get the job done.

Please be advised to not pick one of those if reliability is a concern. As you already found out, one drive failing would suffice to kill your entire array, doubling the chance of hardware failure when compared to a single drive.

Instead, you should look into RAID1 or RAID5 instead and buy one or two additional HDDs. Be warned though, RAID5 becomes more error-prone with harddrives as big as the ones you're using.

Nils Werner

Posted 2013-03-10T01:51:57.920

Reputation: 290

Thanks for the advice. I really wanted some redundancy on the data (the idea originally was to set the two drives in RAID1 with mdraid) but then I noticed that the "important" (i.e. non-replaceable data: personal photos, projects, etc) is about 300 gb, and the rest can be recovered (although with a lot of time and bandwidth). So I settled up for a smaller drive (1 TB) for weekly backups of the important data, and the two big drives for storage. The issue is that I want to use them as a big drive without losing all if one drive fails. I settled for mhddfs, as it does exactly what I want. – Diego – 2013-03-12T16:20:19.523