You are not logged in.

#1 2010-04-04 22:48:21

idonthack
Member
Registered: 2010-04-04
Posts: 7

using aufs and writable branch balancing

so, i have a media player that has an sd card slot. i like to use amarok to push files onto my media player. the problem is, the sd card and the media player's internal flash appear as separate filesystems, so amarok sees them as separate media players. so when i want to fill my media player with music, i have to make two lists of files to push, make sure they fit into each part of the system, &c.

so i thought, why not combine the relavant directories with unionfs, and let software handle it.

after a quick pacman -Ss it appeared that unionfs was not in the repository, but aufs was, so that's what i installed. after a bit of manpage reading, i came up with this command to mount them together:

mount -t aufs br:/media/Sansa\ e260/MUSIC:/media/sansasdcard none ~/Sansa/

however, it doesn't seem to work. mount just throws me its standard "--help" response. i tried adding a "-o" befure the "br" part as i have seen in some examples, but that just gives me a cryptic message: "mount: Numerical argument out of domain"

i have been playing around with this for a while, but i can't seem to figure out a mount command that works. and i'm reluctant to experiment more, because within a few minutes of any failed aufs mount command, my computer will freeze and require a hard reset.

does anyone have experience with unionfs or aufs? any advice? suggestions to seek help someplace else?

Offline

#2 2010-04-04 22:57:38

some-guy94
Member
Registered: 2009-08-15
Posts: 360

Re: using aufs and writable branch balancing

Try

mount -t aufs -o br:/media/Sansa\ e260/MUSIC=rw:/media/sansasdcard=rw,defaults none ~/Sansa/

Offline

#3 2010-04-04 23:50:05

idonthack
Member
Registered: 2010-04-04
Posts: 7

Re: using aufs and writable branch balancing

that command gave me the same "Numerical argument out of domain" error. and then my computer froze.

Offline

#4 2010-04-05 00:42:12

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: using aufs and writable branch balancing

"br" is an option with arguments. It needs to be of the format br=branch1=rX:branch2=rX.... defaults isn't a valid option (that i'm aware of) for aufs, nor would I trust it for an FS that's proven (to me) to be mildly finicky at times.

Try this:

mount -t aufs none ~/Sansa -o udba=reval,br=/media/Sansa\ e260/MUSIC=rw:/media/sansasdcard=rw

Keep in mind that this won't "balance" anything. Aufs will write to the first rw branch it finds with free space. I rely on this for a backup strategy I've written.

If you have problems with the mount crashing/hanging or otherwise behaving strangely, you're probably running Ext4 on the branches. Mount that partition (not the union) with the 'nobarrier' option and it should resolve itself.

Last edited by falconindy (2010-04-05 00:44:59)

Offline

#5 2010-04-05 01:46:05

idonthack
Member
Registered: 2010-04-04
Posts: 7

Re: using aufs and writable branch balancing

your command also gave me the "Numerical argument out of domain" error, and my system froze shortly after.

>Keep in mind that this won't "balance" anything. Aufs will write to the first rw branch it finds with free space. I rely on this for a backup strategy I've written.

Balancing really doesn't matter to me, as long as both halves are filled eventually, and contents are legible when their respective half is mounted individually.

>If you have problems with the mount crashing/hanging or otherwise behaving strangely, you're probably running Ext4 on the branches. Mount that partition (not the union) with the 'nobarrier' option and it should resolve itself.

I'm not running ext4 on either branch. They are both vfat, because that is all the player firmware understands. Does vfat cause problems? The mount point is on an ext4 system, does that matter?

Offline

#6 2010-04-05 02:45:48

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: using aufs and writable branch balancing

The error message you're getting is not one I'm familiar with. Google doesn't really help, as it doesn't seem to be specific to aufs.

I'm going to go out on a limb and suggest that aufs isn't going to play nicely with vfat or ntfs, but I have no evidence to suggest that this is true (or false for that matter). What happens if you make a simple union between two linux FS directories?

Offline

#7 2010-04-05 18:53:01

idonthack
Member
Registered: 2010-04-04
Posts: 7

Re: using aufs and writable branch balancing

i think aufs is capable of using vfat, there are a few threads around the internet complaining of case insensitivity issues that arise from that.
http://www.slax.org/forum.php?action=vi … ntID=21234

i think unionfs is also capable, there are a few examples of people using unionfs with vfat
http://www.mail-archive.com/unionfs@mai … 02095.html

i used this command to union two directories on an ext2 filesystem:

mount -t aufs none ./testmnt -o udba=reval,br=./test1=rw:./test2=rw

it worked fine.

# ls *
test1:
test1.txt

test2:
test2.txt

testmnt:
test1.txt  test2.txt

i tested the same setup on an ntfs system, it worked fine.

i tested the same setup on my sd card (vfat) via my card reader, and recieved a "Numerical argument out of domain" error. my computer froze shortly after.

i rebooted and tried again on the Sansa's internal flash (vfat), recieved another "Numerical argument out of domain" error, my computer froze again.

so maybe vfat is the problem. however, aufs shouldn't freeze the system when it encounters a vfat partition.

Offline

Board footer

Powered by FluxBB