Bacula-users

[Bacula-users] using curlftpfs as storage-device

2008-04-18 12:46:34
Subject: [Bacula-users] using curlftpfs as storage-device
From: "Michael Patzer" <michael.patzer AT netviewer DOT com>
To: <bacula-users AT lists.sourceforge DOT net>
Date: Fri, 18 Apr 2008 18:22:47 +0200
hi all,

after a lot of debugwork on curlftpfs, i've got bacula to use ftp
as an storagedevice.

the first challenge was, that curlftpfs puts every data into memory,
before start writing it to the ftp. so if maxvolsize is bigger than
your available physical memmory, curlftpfs will fail.

and the second challenge is, that while curlftpfs writes the data
from the mem to the ftpserver, every process will freeze until the
write is finished. (this takes the most time of debugging, becouse
it always looks like a bug for me, why i was testing nearly every
libcurl/curlftpfs version out there, always with the same result.)

this freeze while ftptransfer causes bacula-fd also to hang, waiting
for feedback from the device. for example an ls on the share will
also freeze until the ftp_write has finshed (no crtl-c).
i fixed that with enabling heartbeats (2min) on dir, fd and sd.

now a single backup job runs without problems.

but now i've two issues:

if i start a new job, after a finished one, i alwas get a message like
this:

Error: Bacula cannot write on disk Volume "LUPO0033" because:
The sizes do not match! Volume=511967416 Catalog=284928228
Marking Volume "LUPO0033" in Error in Catalog.

if i connect to the ftpserver via a common ftpclient, the filesize
is realy 511967416. so that's no caching issue.

after that i've tried a restore, and it also fails becouse filesize
mismatch. 

-------

the second issue is, if i want bacula to mount the share via curlftpfs
the mount works, but bacula never does the unmount...

lupo-sd: dev.c:1992-0 do_mount: cmd=/usr/bin/curlftpfs ... mounted=0
lupo-sd: dev.c:2004-0 do_mount run_prog=/usr/bin/curlftpfs ...
lupo-sd: dev.c:485-0 open disk: mode=OPEN_READ_WRITE 
open(/var/backup/LUPO0035, 0x2, 0640)
...
lupo-sd: askdir.c:205-0 do_reqest_vol_info return true slot=0
Volume=LUPO0035
lupo-sd: dev.c:1836-0 close_dev "FileStorage" (/var/backup)
lupo-sd: dev.c:1826-0 Clear volhdr vol=LUPO0035
lupo-sd: acquire.c:581-0 JobId=60 broadcast wait_device_release
lupo-sd: reserve.c:493-0 jid=60 free_volume LUPO0035 dev="FileStorage" 
(/var/backup)
lupo-sd: acquire.c:596-0 ===== Device "FileStorage" (/var/backup) released
by JobId=60
lupo-sd: append.c:339-0 return from do_append_data() ok=1
lupo-sd: jcr.c:603-0 OnEntry JobStatus=T set=T
lupo-sd: jcr.c:623-0 OnExit JobStatus=T set=T

i've found a part in the code (dev.c) that's looking for "is already mounted
on", and fuse doesn't reply this string, if the share is already mounted. 
maybe that's a reason. but also writing a wraper in bash around curlftps to 
reply this message doesn't fix the issue.

so could anybody tell me why bacula doens't unmount? it's not a must have,
but it would be nice :-)
----


bacula version 2.2.8
newest libcurl
newest curlftpfs

bacula-sd.conf:
----------------
Storage {
  ...
  Heartbeat Interval = 120
}

Device {
  Name = FileStorage
  Media Type = File
  Archive Device = /var/backup
  LabelMedia = yes;

  Random Access = yes;
  Maximum Volume Size = 512000000;

  RemovableMedia = no
  Maximum Open Wait = 600;

  AutomaticMount = yes;

  Requires Mount = yes
  Mount Point = /var/backup
  Mount Command = "/usr/bin/curlftpfs -s -o 
user=userxy:geheim,allow_other,sync_read,direct_io,auto_cache 
ftp://192.168.0.10 %m"
  Unmount Command = "/bin/umount %m"
}


regards,
michael

Attachment: smime.p7s
Description: S/MIME cryptographic signature

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>
  • [Bacula-users] using curlftpfs as storage-device, Michael Patzer <=