Re: [Bacula-users] Bacula trying to write to device rather than mount point when using USB removable storage device

2007-01-19 Thread Arno Lehmann
Hi,

On 1/19/2007 12:13 PM, Marc Schiffbauer wrote:
 * Arno Lehmann schrieb am 19.01.07 um 01:27 Uhr:
 
Hello,

 
 
 Hi Arno,
 
 [...]
 
 
... because Requires Mount = Yes|No
 You must set this directive to yes for DVD-writers, and to no for 
all other devices (tapes/files). This directive indicates if the device 
requires to be mounted to be read, and if it must be written in a 
special way. 
 
 
 As I read this thread I found that this directives (the wording) are not very 
 chosen from a usability pov. There are many things that can/must be
 mounted.

Yes, that seems to be part of the problem.

Anyway, Kern explained how Bacula handles these directives, but I 
understand that he would rely on the OSes automountin mechanics.

 So I would suggest:
 
   * Rename this directive to DVD Writer = Yes|No

I doubt that this will happen - Kerns is *really* conservative 
concerning changes to Bacula that create incompatibility.

 The Term Requires Mount can be implied by setting the Mount
 Point and (Un)Mount Command directives. If those are set it should be 
 clear to the user that bacula tries to use them...

Correct, but see above.

Dropping a directive might be easier than changing it, though - Bacula 
could still parse and understand it but simply ignore it... 
AcceptAnyVolume, anyone? ;-)


 This way, setting DVD Writer to No and not specifying 
 Mount/Unmount Command bacula should write directly to a block
 device without using any filesystem.
 
 Then I could tell bacula which block device to use with the Archive
 Device directive.
 
 Would be a new Device Type Device Type = Block be useful/needed for that?

No, I don't think so...

 
 Another thing I was thinking of while looking at the Docs:
 
   Random access = Yes|No
 
 Does this setting have some sort auf Auto setting when not set? If
 not, wouldn't that make sense? Or in other words: Are there *any*
 disadvantages in setting this to Yes for devices that support it?
 If not it should be set to Yes automatically if its supported.
 Maybe this directive could even be deprecated then ...

Well, this directive is mainly to make Bacula work with devices where 
Random Accessibility can not be determined automatically. Which might be 
more than I think. Anyway, the device type configuration should make 
this one superfluous... I think it's a safe bet to say that File can be 
randomly accessed and Tape not and DVD needs special treatment.


 What do you think?

Personally, I wouldn't worry about these directives. As long as Bacula 
can be set up according to your hardware - and I hope this is much 
clearer now, regardind removable disks - I'm satisfied.

I mainly think the manual needs refinement.

Arno

 Cheers
 -Marc

-- 
IT-Service Lehmann[EMAIL PROTECTED]
Arno Lehmann  http://www.its-lehmann.de

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula trying to write to device rather than mount point when using USB removable storage device

2007-01-18 Thread Arno Lehmann
Hi,

On 1/18/2007 11:07 PM, Benjamin Chambers wrote:
 I'm doing some testing using v2.0.1 with a USB storage device.  In this case, 
 it 
 is an Iomega REV USB drive, but essentially, it could be any USB mass storage 
 device.
 
 Here is the configuration for the SD:
 
 Device {
Name = _REV-USB
MediaType = Iomega REV, USB
ArchiveDevice = /dev/scd0

This is a configuration error.

LabelMedia = yes
RandomAccess = yes
AutomaticMount = yes
RemovableMedia = yes
AlwaysOpen = yes
DeviceType = File
RequiresMount = yes

RequiresMount, MountPoint, unmountCommand are for DVDs only.

MountPoint = /var/bacula/mnt/rev/usb
MountCommand = /bin/mount %a %m
UnmountCommand = /bin/umount %m
MaximumVolumeSize = 70GB
 }
 
 Note, I put the DeviceType = File because otherwise Bacula thinks it is a 
 DVD 
 device and requires the Write Command directive.

Yes. Or rather, the directives above don't apply to file storage.

 I know you *could* put the 'ArchiveDevice' directive as the mountpoint (in 
 this 
 case /var/bacula/mnt/rev/usb/), however, then you would required the user to 
 mount/umount the device, or use the RunBefore/After scripts.  Using the 
 similarities to DVD and the additional directives when Requires Mount = yes 
 is 
 so much more elegant.

But it does not work.

 The problem is that Bacula is trying to write to the device (/dev/scd0), 
 rather 
 than the mount point.  The exact message when you try and label the volume is:
 
 *
Connecting to Storage daemon _REV-USB at 192.168.2.185:9103 ...
Sending label command for Volume Default-0001 Slot 0 ...
3910 Unable to open device _REV-USB (/dev/scd0): ERR=dev.c:482 Could not
  open: /dev/scd0/Default-0001, ERR=Not a directory
 
Label command failed for Volume Default-0001.
Do not forget to mount the drive!!!
 *
 
 Has anyone got a USB mass storage device to work in 2.0.1?

Not me, but I know of others. Well, I kind of have - I operate simple 
usb disks but without any special consideration regarding mounting etc. 
These are setups where the disks are not meant to be removed.

Josh Fishers Removable Disk Howto revised is probably interesting for 
you - you find it searching in the list archives.

 Can anyone tell me if this is:
 
a) Corrected by fixing my configuration

Yes. But probably diferent than what you intend.

b) Not an advised (or supported) method to mount USB mass storage devices

Yes.

c) An anomaly of the Iomega REV drive that is part File, part DVD in
   terms of how Bacula treats the device

Don't know.

d) A bug

No.

There's one other option, by the way: Try to understand how writing to 
DVD works for Bacula. Then, create a script similar to dvd-handler - 
basically, you could replace the invocations of growisofs with a cp, ge 
the available space using df, and so on.

My original idea was that dvd-handler could be used as a template for 
low performance storage systems like ftp, CD-RW and others, but 
currently Bacula reads directly, so whatever media you use, you must be 
able to mount it for reading. Writing can be done by a handler script.

Arno

 Thanks in advance.
 
 Ben
 

-- 
IT-Service Lehmann[EMAIL PROTECTED]
Arno Lehmann  http://www.its-lehmann.de

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula trying to write to device rather than mount point when using USB removable storage device

2007-01-18 Thread Benjamin Chambers

Thanks for the reply Arno.

The manual certainly seems to be converging on the idea that USB and DVD SD's 
are handled similarly:

http://www.bacula.org/rel-manual/Storage_Daemon_Configuratio.html#SECTION00175

OK...not in the 18pt font header, but certainly in the content of the 
documentation in the following sections...

Hmmm

Confused which direction to take.

B.

Benjamin Chambers, P.Eng.
ClarkConnect Account Manager
Point Clark Networks
1179 King Street West, Suite 211
Toronto, ON
Canada, M6K 3C5

Tel:  +1.416.977.0574 Ext. 111
Fax:  +1.416.946.1192
Email:  [EMAIL PROTECTED]

Arno Lehmann wrote:
 Hi,
 
 On 1/18/2007 11:07 PM, Benjamin Chambers wrote:
 I'm doing some testing using v2.0.1 with a USB storage device.  In this 
 case, it 
 is an Iomega REV USB drive, but essentially, it could be any USB mass 
 storage 
 device.

 Here is the configuration for the SD:

 Device {
Name = _REV-USB
MediaType = Iomega REV, USB
ArchiveDevice = /dev/scd0
 
 This is a configuration error.
 
LabelMedia = yes
RandomAccess = yes
AutomaticMount = yes
RemovableMedia = yes
AlwaysOpen = yes
DeviceType = File
RequiresMount = yes
 
 RequiresMount, MountPoint, unmountCommand are for DVDs only.
 
MountPoint = /var/bacula/mnt/rev/usb
MountCommand = /bin/mount %a %m
UnmountCommand = /bin/umount %m
MaximumVolumeSize = 70GB
 }

 Note, I put the DeviceType = File because otherwise Bacula thinks it is a 
 DVD 
 device and requires the Write Command directive.
 
 Yes. Or rather, the directives above don't apply to file storage.
 
 I know you *could* put the 'ArchiveDevice' directive as the mountpoint (in 
 this 
 case /var/bacula/mnt/rev/usb/), however, then you would required the user to 
 mount/umount the device, or use the RunBefore/After scripts.  Using the 
 similarities to DVD and the additional directives when Requires Mount = 
 yes is 
 so much more elegant.
 
 But it does not work.
 
 The problem is that Bacula is trying to write to the device (/dev/scd0), 
 rather 
 than the mount point.  The exact message when you try and label the volume 
 is:

 *
Connecting to Storage daemon _REV-USB at 192.168.2.185:9103 ...
Sending label command for Volume Default-0001 Slot 0 ...
3910 Unable to open device _REV-USB (/dev/scd0): ERR=dev.c:482 Could not
  open: /dev/scd0/Default-0001, ERR=Not a directory

Label command failed for Volume Default-0001.
Do not forget to mount the drive!!!
 *

 Has anyone got a USB mass storage device to work in 2.0.1?
 
 Not me, but I know of others. Well, I kind of have - I operate simple 
 usb disks but without any special consideration regarding mounting etc. 
 These are setups where the disks are not meant to be removed.
 
 Josh Fishers Removable Disk Howto revised is probably interesting for 
 you - you find it searching in the list archives.
 
 Can anyone tell me if this is:

a) Corrected by fixing my configuration
 
 Yes. But probably diferent than what you intend.
 
b) Not an advised (or supported) method to mount USB mass storage devices
 
 Yes.
 
c) An anomaly of the Iomega REV drive that is part File, part DVD in
   terms of how Bacula treats the device
 
 Don't know.
 
d) A bug
 
 No.
 
 There's one other option, by the way: Try to understand how writing to 
 DVD works for Bacula. Then, create a script similar to dvd-handler - 
 basically, you could replace the invocations of growisofs with a cp, ge 
 the available space using df, and so on.
 
 My original idea was that dvd-handler could be used as a template for 
 low performance storage systems like ftp, CD-RW and others, but 
 currently Bacula reads directly, so whatever media you use, you must be 
 able to mount it for reading. Writing can be done by a handler script.
 
 Arno
 
 Thanks in advance.

 Ben

 

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula trying to write to device rather than mount point when using USB removable storage device

2007-01-18 Thread Arno Lehmann
Hello,

On 1/19/2007 12:19 AM, Benjamin Chambers wrote:
 Thanks for the reply Arno.
 
 The manual certainly seems to be converging on the idea that USB and DVD SD's 
 are handled similarly:
 
 http://www.bacula.org/rel-manual/Storage_Daemon_Configuratio.html#SECTION00175

Right, but I guess the manual needs some work there. Or I'll have to 
look up Kerns mails regarding how he implemented better removable disk 
handling :-)

 OK...not in the 18pt font header, but certainly in the content of the 
 documentation in the following sections...

... because Requires Mount = Yes|No
 You must set this directive to yes for DVD-writers, and to no for 
all other devices (tapes/files). This directive indicates if the device 
requires to be mounted to be read, and if it must be written in a 
special way. If it set, Mount Point, Mount Command, Unmount Command and 
Write Part Command directives must also be defined. does not make 
sense. Unless, of course, you take the path I mentioned - use a special 
handler script to copy part files (which is more or less nonsense).

Anyway, the above snippet states that when you set RequiresMount, the 
device must be written in a special way. Which is not why you use 
removable USB devices... Also, it states that it must be set to no for 
files. Which contradicts the lines under the heading which you probably 
referred to.

 Hmmm
 
 Confused which direction to take.

I'm quite sure Kern presented his way of using removable USB storage 
devices, and I suppose Joshs HowTo might be interesting.

Arno

 B.
 
 Benjamin Chambers, P.Eng.
 ClarkConnect Account Manager
 Point Clark Networks
 1179 King Street West, Suite 211
 Toronto, ON
 Canada, M6K 3C5
 
 Tel:  +1.416.977.0574 Ext. 111
 Fax:  +1.416.946.1192
 Email:  [EMAIL PROTECTED]
 
 Arno Lehmann wrote:
 
Hi,

On 1/18/2007 11:07 PM, Benjamin Chambers wrote:

I'm doing some testing using v2.0.1 with a USB storage device.  In this 
case, it 
is an Iomega REV USB drive, but essentially, it could be any USB mass 
storage 
device.

Here is the configuration for the SD:

Device {
   Name = _REV-USB
   MediaType = Iomega REV, USB
   ArchiveDevice = /dev/scd0

This is a configuration error.


   LabelMedia = yes
   RandomAccess = yes
   AutomaticMount = yes
   RemovableMedia = yes
   AlwaysOpen = yes
   DeviceType = File
   RequiresMount = yes

RequiresMount, MountPoint, unmountCommand are for DVDs only.


   MountPoint = /var/bacula/mnt/rev/usb
   MountCommand = /bin/mount %a %m
   UnmountCommand = /bin/umount %m
   MaximumVolumeSize = 70GB
}

Note, I put the DeviceType = File because otherwise Bacula thinks it is a 
DVD 
device and requires the Write Command directive.

Yes. Or rather, the directives above don't apply to file storage.


I know you *could* put the 'ArchiveDevice' directive as the mountpoint (in 
this 
case /var/bacula/mnt/rev/usb/), however, then you would required the user to 
mount/umount the device, or use the RunBefore/After scripts.  Using the 
similarities to DVD and the additional directives when Requires Mount = 
yes is 
so much more elegant.

But it does not work.


The problem is that Bacula is trying to write to the device (/dev/scd0), 
rather 
than the mount point.  The exact message when you try and label the volume 
is:

*
   Connecting to Storage daemon _REV-USB at 192.168.2.185:9103 ...
   Sending label command for Volume Default-0001 Slot 0 ...
   3910 Unable to open device _REV-USB (/dev/scd0): ERR=dev.c:482 Could not
 open: /dev/scd0/Default-0001, ERR=Not a directory

   Label command failed for Volume Default-0001.
   Do not forget to mount the drive!!!
*

Has anyone got a USB mass storage device to work in 2.0.1?

Not me, but I know of others. Well, I kind of have - I operate simple 
usb disks but without any special consideration regarding mounting etc. 
These are setups where the disks are not meant to be removed.

Josh Fishers Removable Disk Howto revised is probably interesting for 
you - you find it searching in the list archives.


Can anyone tell me if this is:

   a) Corrected by fixing my configuration

Yes. But probably diferent than what you intend.


   b) Not an advised (or supported) method to mount USB mass storage devices

Yes.


   c) An anomaly of the Iomega REV drive that is part File, part DVD in
  terms of how Bacula treats the device

Don't know.


   d) A bug

No.

There's one other option, by the way: Try to understand how writing to 
DVD works for Bacula. Then, create a script similar to dvd-handler - 
basically, you could replace the invocations of growisofs with a cp, ge 
the available space using df, and so on.

My original idea was that dvd-handler could be used as a template for 
low performance storage systems like ftp, CD-RW and others, but 
currently Bacula reads directly, so whatever media you use, you must be 
able to mount it for reading. Writing can be done by a handler script.

Arno


Thanks in advance.

Ben


 
 

Re: [Bacula-users] Bacula trying to write to device rather than mount point when using USB removable storage device

2007-01-18 Thread Kern Sibbald
On Friday 19 January 2007 01:27, Arno Lehmann wrote:
 Hello,
 
 On 1/19/2007 12:19 AM, Benjamin Chambers wrote:
  Thanks for the reply Arno.
  
  The manual certainly seems to be converging on the idea that USB and DVD 
SD's 
  are handled similarly:
  
  
http://www.bacula.org/rel-manual/Storage_Daemon_Configuratio.html#SECTION00175
 
 Right, but I guess the manual needs some work there. Or I'll have to 
 look up Kerns mails regarding how he implemented better removable disk 
 handling :-)
 
  OK...not in the 18pt font header, but certainly in the content of the 
  documentation in the following sections...
 
 ... because Requires Mount = Yes|No
  You must set this directive to yes for DVD-writers, and to no for 
 all other devices (tapes/files). This directive indicates if the device 
 requires to be mounted to be read, and if it must be written in a 
 special way. If it set, Mount Point, Mount Command, Unmount Command and 
 Write Part Command directives must also be defined. does not make 
 sense. Unless, of course, you take the path I mentioned - use a special 
 handler script to copy part files (which is more or less nonsense).
 
 Anyway, the above snippet states that when you set RequiresMount, the 
 device must be written in a special way. Which is not why you use 
 removable USB devices... Also, it states that it must be set to no for 
 files. Which contradicts the lines under the heading which you probably 
 referred to.
 
  Hmmm
  
  Confused which direction to take.
 
 I'm quite sure Kern presented his way of using removable USB storage 
 devices, and I suppose Joshs HowTo might be interesting.

Use the OS udev feature, tell Bacula the USB is a file, point it at the mount 
point, and tell Bacula that it is removable, and things should more or less 
work out OK.  Tha is the OS will automatically mount it when it is plugged 
in, and Bacula will ask you to mount it when it is not there, you plug it in 
and the OS will mount it, then you enter mount in bconsole, and Bacula 
should be happy.  

If a different USB is mounted on the specified device (mount point), Bacula 
will scan it to see if there are any appendable volumes (essentially 
identical to the case of having a different tape in the drive). If there are 
appendable volumes on the currently mounted USB device, Bacula will use them, 
otherwise (provided you set it as removable), Bacula will request you to 
mount the proper volume.  



 
 Arno
 
  B.
  
  Benjamin Chambers, P.Eng.
  ClarkConnect Account Manager
  Point Clark Networks
  1179 King Street West, Suite 211
  Toronto, ON
  Canada, M6K 3C5
  
  Tel:  +1.416.977.0574 Ext. 111
  Fax:  +1.416.946.1192
  Email:  [EMAIL PROTECTED]
  
  Arno Lehmann wrote:
  
 Hi,
 
 On 1/18/2007 11:07 PM, Benjamin Chambers wrote:
 
 I'm doing some testing using v2.0.1 with a USB storage device.  In this 
case, it 
 is an Iomega REV USB drive, but essentially, it could be any USB mass 
storage 
 device.
 
 Here is the configuration for the SD:
 
 Device {
Name = _REV-USB
MediaType = Iomega REV, USB
ArchiveDevice = /dev/scd0
 
 This is a configuration error.
 
 
LabelMedia = yes
RandomAccess = yes
AutomaticMount = yes
RemovableMedia = yes
AlwaysOpen = yes
DeviceType = File
RequiresMount = yes
 
 RequiresMount, MountPoint, unmountCommand are for DVDs only.
 
 
MountPoint = /var/bacula/mnt/rev/usb
MountCommand = /bin/mount %a %m
UnmountCommand = /bin/umount %m
MaximumVolumeSize = 70GB
 }
 
 Note, I put the DeviceType = File because otherwise Bacula thinks it is 
a DVD 
 device and requires the Write Command directive.
 
 Yes. Or rather, the directives above don't apply to file storage.
 
 
 I know you *could* put the 'ArchiveDevice' directive as the mountpoint 
(in this 
 case /var/bacula/mnt/rev/usb/), however, then you would required the user 
to 
 mount/umount the device, or use the RunBefore/After scripts.  Using the 
 similarities to DVD and the additional directives when Requires Mount = 
yes is 
 so much more elegant.
 
 But it does not work.
 
 
 The problem is that Bacula is trying to write to the device (/dev/scd0), 
rather 
 than the mount point.  The exact message when you try and label the 
volume is:
 
 *
Connecting to Storage daemon _REV-USB at 192.168.2.185:9103 ...
Sending label command for Volume Default-0001 Slot 0 ...
3910 Unable to open device _REV-USB (/dev/scd0): ERR=dev.c:482 Could 
not
  open: /dev/scd0/Default-0001, ERR=Not a directory
 
Label command failed for Volume Default-0001.
Do not forget to mount the drive!!!
 *
 
 Has anyone got a USB mass storage device to work in 2.0.1?
 
 Not me, but I know of others. Well, I kind of have - I operate simple 
 usb disks but without any special consideration regarding mounting etc. 
 These are setups where the disks are not meant to be removed.
 
 Josh Fishers Removable Disk Howto revised is probably interesting for