Solved sysutils/linux-crashplan does not "see" the whole file system

I am new to the Linux emulator of FreeBSD. I used it to set up the CrashPlan service on my headless FreeBSD home server. I followed this guide which worked well:
http://www.apartment5.com/doku.php?id=crashplan_on_freebsd_10

So now I am configuring the CrashPlan service of my FreeBSD server with my desktop client as intended.

The problem is when I try to select the directories which should be backed up the GUI does not show me all the files:
Bildschirmfoto 2014-11-24 um 16.18.51.png


Has this something to do with the Linux emulation placing the process in a chroot or something?

I use FreeBSD 10.1 x64 with ZFS (configured by the installer).
 
This is not exactly a chroot but a side effect of how Linux compatibility works. For Linux binaries, a path name is first looked up with /compat/linux prepended to it, only when there is no result, the original path name is looked up. Refer here for details.

Example:

Code:
> ls /var
account  authpf   crash    empty    lib      msgs     rwho     unbound
at       backups  cron     games    log      preserve spool    yp
audit    cache    db       heimdal  mail     run      tmp
> ls /compat/linux/var
cache    empty    lib      lock     nis      preserve yp
db       games    local    mail     opt      spool
The following command finds /compat/linux/var and lists it:

Code:
> /compat/linux/bin/ls /var
cache  db  empty  games  lib  local  lock  mail  nis  opt  preserve  spool  yp
/compat/linux/var/log is not there, so the real /var/log is listed here:

Code:
> /compat/linux/bin/ls /var/log
aculog           kdm.log         messages.1.bz2   setuid.today
auth.log         lpd-errs        messages.2.bz2   setuid.yesterday
bsdinstall_log   maillog         messages.3.bz2   userlog
[...]
 
Thank you, exactly what I was looking for. I renamed the folders in /compat/linux so the application can access the FreeBSD ones.
 
Hi athei, this is probably not the best idea, because these files are there to "shadow" the original files for a reason, so you could break other Linux binaries when you do this.

I think the system should really handle this (browsing through /usr/src a little, I found there is a special treatment for unionfs in opendir(3) -- something like this ...) but unfortunately it doesn't.

Maybe a better workaround would be to symlink entries like e.g. ln -s /var/log /compat/linux/var/log? For a Linux binary, this looks like a self-referencing symlink:
Code:
> /compat/linux/bin/readlink /var/log
/var/log
edit: Maybe this could lead to problems when packages/ports try to add Linux compatibility files to a path you symlinked, so take care...
 
Sadly crashplan won't follow symlinks. It backs up the link file itself.

Edit: okay, I did the following which worked: I mounted all the directories which I want to backup to /crashplan-backupdirs via nullfs. No need to touch /compat/linux anymore.
 
Back
Top