You are not logged in.

#1 2013-11-03 18:43:18

gonX
Member
From: Denmark
Registered: 2009-08-16
Posts: 112

Union directories/mount on stock Arch

Hi guys,

I have a seedbox with tons of disk space on it. Basically I want my torrent client (transmission) to be able to distribute each file to the folder (file system) with the most free space.

I kind of want the system put in place to be flexible enough to that I can switch torrent client without having to do extensive configuration changes, which is why I originally looked at AUFS to begin with, but it appears to no longer be compiled in the Arch kernel tree.

My wishes for it are:
- Low overhead
- Simple configuration (similar to aufs hopefully)

Ideally I do not want to use out-of-repo packages to deal with this, but otherwise I'll probably be using the linux-aufs_friendly kernel from AUR.

Originally I had a default download folder on one FS where I manually moved files around to the other file systems with symlinks, but it seems like a lot of wasted time for something that could be done more intelligently by my computer.

Changing torrent client could be an option (I think rtorrent has the capability to do this), but again I want the configuration to be flexible enough that I don't have to do client-specific changes.

*EDIT*

Also extensive file-system changes aren't a possibility. I have 4 TB of data that I can't temporarily store elsewhere, otherwise I would probably have made an intelligent JBOD setup - but then again I might end up with wasted space if I needed data on some drives that I didn't with others.

RAID-0 is not a possibility since I'd like to minimize the extent to which file system corruption happens.

Last edited by gonX (2013-11-03 18:46:36)


since 2009

Offline

#2 2013-11-03 20:04:43

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Union directories/mount on stock Arch

AUFS3 is a kernel patch (mot mainlined), and if you have read the Arch policy on patching, you will understand why this is not included.  But if you want a kernel that you don't have to build that includes the AUFS3 patchset, there is the linux-pf user repo.  I am not a pf user, but I am fairly certain that it does include the aufs3 patchset.

Keep in mind though that the AUFS3 patchset will likely never be mainlined.  There has been talk of mainlining the overlayfs patchset, which has been in wide use by OpenWRT for quite some time, so has enjoyed mass amounts of testing.  If anything, I would probably venture in that direction so that you will have a system that is set up to use a standard Arch kernel whenever that does get mainlined.

It sounds though like what you are trying to do here might not be best solved by a unionfs.  Why not just use LVM2 over your disks, so that you can create filesystems that can be expanded across those disks as necessary (or a number of filesystems if that is necessary). LVM2 already enjoys mainline support, as it is a device-mapper feature.  The packages are also already installed on your system, as they are part of the base package group.

Offline

#3 2013-11-03 20:51:51

gonX
Member
From: Denmark
Registered: 2009-08-16
Posts: 112

Re: Union directories/mount on stock Arch

LVM would definitely be the best choice if it was an option. My current partition table looks like this:

gonx@l ~ $ df -h | grep /dev/sd
/dev/sdb1       2.7T  2.5T  134G  95% /
/dev/sdc1        92M   24M   61M  29% /boot
/dev/sda        190G  100G   83G  55% /mnt/videos
/dev/sdc2       1.9T  1.3T  512G  72% /opt/torrent

Essentially a large amount of data on / (which is currently in a single folder, /opt/torrents) needs to be "merged" with the /opt/torrent folder - however this is obviously not an option since there's not room for the torrents folder on /opt/torrent.
It also doesn't solve the issue of it not being automatic and easy to extend with drives if it became necessary - if I used LVM, I'd still need to manually resize my system (or rather, set up a cronjob) once in a while when it becomes necessary - and if I suddenly decide to delete a couple of gigs, I can't be sure that it can be reclaimed in favor of the other space on my root.

And I wasn't questioning the exclusion of aufs from the kernel, that's what happens. I don't have as much an issue to build my own kernel, I'd just like to go with an as stock system as possible on my server.

I'm just curious if there are any intelligent union file systems available in mainline. Or something similar. The reason why I picked out Aufs was:
- Drop-in "merging" of folders
- Low overhead
- Simple configuration (basically just an fstab entry from what I can gather)

The first point obviously being the most important one.

Thanks for the help so far, though smile

Last edited by gonX (2013-11-03 20:53:00)


since 2009

Offline

#4 2013-11-03 20:56:58

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Union directories/mount on stock Arch

Oh, I see, so the system is already in place and cannot be moved around to to make these adjustments.  Is that right?

If that is the case, then I'm not sure how you are going to implement some kind of unionfs either without moving some stuff around.  I think that if you have enough free space, maybe you can chunk them off and then add them to an LVM2 volume group little bits at a time.  Then you could move some of the data to the LVM2, free up more space and add it, and continue that way.  But that might be a pain in the ass.

Offline

#5 2013-11-03 21:07:53

gonX
Member
From: Denmark
Registered: 2009-08-16
Posts: 112

Re: Union directories/mount on stock Arch

Well, I can somehow move it around if it becomes necessary, but I'd prefer not to.
From what I can understand, Aufs has the possibility of "binding" to certain folders, so it basically reads all the contents of each folder and shows it as one. That could be done with just a single line. More throughout config might take some longer time, but it'd be a system that could be fully put in place in a few minutes, while the LVM project could take hours to set up.


since 2009

Offline

#6 2013-11-03 22:15:04

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Union directories/mount on stock Arch

There is a fused base unionfs in the official repos.  I'm not sure to what degree performance is a factor if this is primarily a seedbox, but anything fuse will see limitations simply because it is a userspace filesystem.  I imagine though that unless you have some wickedly fast interwebs, it would likely be fast enough.

Offline

#7 2013-11-03 23:16:16

gonX
Member
From: Denmark
Registered: 2009-08-16
Posts: 112

Re: Union directories/mount on stock Arch

Yep, although it defies the "low overhead" requirement

Right now it's a raffle between adding in an external repo and using another kernel with AUFS built-in, or using unionfs for FUSE. I think I'll have to do some benchmarks to see what fits the bill. For all I know AUFS could have terrible performance as well.


since 2009

Offline

#8 2013-11-03 23:45:51

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Union directories/mount on stock Arch

There is a thread about the linux-pf kernel, and from there it seems that use of the unofficial repo is actually quite popular.  So maybe you want to post there with any questions about the reliability of the kernels and whatnot.  FWIW, in the past I have used the linux-ck kernel from graysky's repo, but that might be a different situation since he is an extremely consistent presence within this community.  So I was inclined to trust him a bit more than someone who I didn't really know.  Now I use bohoomil's user repo for my font configuration, but that is also because I trust bohoomil (he has been helping me with font configuration for quite some time now).

Offline

#9 2013-11-04 00:01:08

gonX
Member
From: Denmark
Registered: 2009-08-16
Posts: 112

Re: Union directories/mount on stock Arch

I don't really have an issue with external repos. I use plenty of them on my desktop computer. It still requires rebooting which I'd like to avoid tongue

However, I found a solution, which is unfortunately also FUSE, but it's called mhddfs. It's like unionfs, except it handles free space balancing like I'd expect aufs to. I'm going to run some bonnie++ benchmarks on it and see how well it does.


since 2009

Offline

#10 2013-11-04 00:14:00

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: Union directories/mount on stock Arch

gonX wrote:

It still requires rebooting which I'd like to avoid tongue

One reboot for improved performance doesn't strike me as much. When the official kernel is updated again, you'll have to reboot anyway.

Last edited by progandy (2013-11-04 00:16:36)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Online

#11 2013-11-04 00:28:48

gonX
Member
From: Denmark
Registered: 2009-08-16
Posts: 112

Re: Union directories/mount on stock Arch

progandy wrote:
gonX wrote:

It still requires rebooting which I'd like to avoid tongue

One reboot for improved performance doesn't strike me as much. When the official kernel is updated again, you'll have to reboot anyway.

You are right, and that why I think I might eventually end up using aufs anyway. The whole idea of FUSE as a permanent solution seems like a bad solution to me... I'm doing the benchmarks now and will edit this post to reflect the status on my system.

*EDIT*

Here's the benchmarks:
http://gonx.dk/pommi-bonnie2gchart-7aa0c2d/

Looks okay from what I can gather. CPU usage being a little bit high doesn't bother me much

Last edited by gonX (2013-11-04 01:02:58)


since 2009

Offline

Board footer

Powered by FluxBB