Re: [Bacula-users] mount USB disk

2005-08-23 Thread Alan Brown

On Thu, 18 Aug 2005, Daniel Bloemer wrote:


Hello,

Alan Brown wrote:
Each usb mass stoarge device has a unique serial number - this can be 
mapped to a fixed mount point.


Not every usb-device has this. Some Chips just return vendor- and productID 
. :-(


Anything which does this is arguably not a USB device. It is a 
_requirement_ of the USB spec that every USB device is identifiable by 
VendorID:ProductID


If it's carrying a USB logo it is violating trademarks and should be 
returned to the vendor immediately.




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] mount USB disk

2005-08-19 Thread Daniel Bloemer

Hello,

Josh Fisher wrote:
A RunBeforeJob script could mount the device with a simple mount 
command. It could also tell if the drive was inserted by testing whether 
or not the mountpoint existed. A RunAfterJob could unmount the device 
just as easily. Of course, if multiple drives were being used it would 
be neccessary to always insert the devices in the correct order so that 
the device with a particular bacula volume label was at the correct 
device node and mountpoint.


A better approach would be for the RunBeforeJob script to read the 
bacula volume label from all inserted devices, find the mountpoint of 
the device containing the desired label, mount it, and then create a 
symlink to the mountpoint. The bacula job would use the symlink as its 
ArchiveDevice. I have not tried this, and I'm not sure if the 
RunAfterJob script could then figure out which  device to unmount.



Unfortunately there is no RunStorageBeforeJob-Command.
Since Director and Storage are not on the same maschine here, a 
RunBeforeJob-script has to do this stuff remote on another maschine.


Regards Daniel
--
Daniel Bloemer - BusinessCoDe GmbH
Systemadministration and Support
Phone: +49 (0)228 / 28925-43
http://www.business-code.de


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] mount USB disk

2005-08-17 Thread Alan Brown

On Thu, 11 Aug 2005, Daniel Bloemer wrote:

Assuming you're using a linux system, why not allow hotplug and subfs to do 
this for you automagically?


I am working on a similiar solution here. The problem is, that the 
hotplug-agent doesnt mount the USB-Harddisc on a fixed mountpoint.


I tried to define a fixed mountpoint myself, but the hotplug-agent has 
avoided all my attempts until now.


Each usb mass stoarge device has a unique serial number - this can be 
mapped to a fixed mount point.


If the formatted volume on the device has been named, it should be mounted 
to /mountpoint/name - that's my experience on Suse 9.2 and 9.3 in any case.


AB


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] mount USB disk

2005-08-15 Thread Daniel Bloemer

Hi,

Alan Brown wrote:

On Sun, 7 Aug 2005, Mick wrote:


I use an USB disk as backup target for Bacula. It works fine. But there
is one issue: I want to mount it immediatly before the backup and
unmount it afterwards. There is even a mount option for the config file
(sd.config I think), but this option is not allowed for a harddisk.


Assuming you're using a linux system, why not allow hotplug and subfs to 
do this for you automagically?


I am working on a similiar solution here. The problem is, that the 
hotplug-agent doesnt mount the USB-Harddisc on a fixed mountpoint.


I tried to define a fixed mountpoint myself, but the hotplug-agent has 
avoided all my attempts until now.


Regards Daniel
--
Daniel Bloemer - BusinessCoDe GmbH
Systemadministration and Support
Phone: +49 (0)228 / 28925-43
http://www.business-code.de


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] mount USB disk

2005-08-15 Thread Josh Fisher
This can be done with UDEV. On Fedora Core 3 I created a file under 
/etc/udev/rules.d named 20-jumpdrive.rules with the following line:


KERNEL=sd?1*, SYSFS{vendor}=LEXAR, SYSFS{model}=JUMPDRIVE SECURE, 
NAME=%k, SYMLINK=jumpdrive%e


This causes my Lexar JumpDrive (USB thumbdrive device) to be mapped as a 
block device at /dev/jumpdrive  when it is inserted.  When it is 
unplugged the /dev/jumpdrive entry is removed. The %e in the SYMLINK 
entry causes additional JumpDrives to be mapped to /dev/jumpdrive1, 
/dev/jumnpdrive2, etc.


FC3 also uses HAL and has an entry in /etc/hal/device.d to run 
/usr/sbin/fstab-sync. fstab-sync adds and removes mountpoints under 
/media, as well as entries to /etc/fstab, according to HAL policies 
stored under /usr/share/hal/fdi. By default, the volume label of the 
device will be used to name the mountpoint. I configured HAL to name my 
mountpoint /mount/jumpdrive by creating an XML file named 
jumpdrive.fdi under /usr/share/hal/fdi/95userpolicy. Here is my 
jumpdrive.fdi file:


?xml version=1.0 encoding=ISO-8859-1? !-- -*- SGML -*- --
deviceinfo version=0.2
device
 match key=volume.is_partition bool=true
   match key=volume.fsusage string=filesystem
 match key=volume.fstype string=vfat
   match key=@block.storage_device:storage.vendor string=LEXAR
 match key=@block.storage_device:storage.model 
string=JUMPDRIVE SECURE
   merge key=volume.policy.desired_mount_point 
type=stringjumpdrive/merge
   merge key=volume.policy.mount_filesystem 
type=stringvfat/merge

   merge key=volume.policy.should_mount type=booltrue/merge
   merge 
key=volume.policy.mount_option.fscontext=system_u:object_r:removable_t 
type=boolfalse/merge

 /match
   /match
 /match
   /match
 /match
/device
/deviceinfo

I obtained the values to use for the match tags from the output of the 
lshal command.


So, when I insert the JumpDrive its device node is /dev/jumpdrive, its 
mountpoint is /mount/jumpdrive, and an entry is added to /etc/fstab so 
that I mount it with the command /bin/mount /mount/jumpdrive.


A RunBeforeJob script could mount the device with a simple mount 
command. It could also tell if the drive was inserted by testing whether 
or not the mountpoint existed. A RunAfterJob could unmount the device 
just as easily. Of course, if multiple drives were being used it would 
be neccessary to always insert the devices in the correct order so that 
the device with a particular bacula volume label was at the correct 
device node and mountpoint.


A better approach would be for the RunBeforeJob script to read the 
bacula volume label from all inserted devices, find the mountpoint of 
the device containing the desired label, mount it, and then create a 
symlink to the mountpoint. The bacula job would use the symlink as its 
ArchiveDevice. I have not tried this, and I'm not sure if the 
RunAfterJob script could then figure out which  device to unmount.


Josh Fisher
[EMAIL PROTECTED]

Daniel Bloemer wrote:


Hi,

Alan Brown wrote:


On Sun, 7 Aug 2005, Mick wrote:


I use an USB disk as backup target for Bacula. It works fine. But there
is one issue: I want to mount it immediatly before the backup and
unmount it afterwards. There is even a mount option for the config file
(sd.config I think), but this option is not allowed for a harddisk.



Assuming you're using a linux system, why not allow hotplug and subfs 
to do this for you automagically?



I am working on a similiar solution here. The problem is, that the 
hotplug-agent doesnt mount the USB-Harddisc on a fixed mountpoint.


I tried to define a fixed mountpoint myself, but the hotplug-agent has 
avoided all my attempts until now.


Regards Daniel





---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] mount USB disk

2005-08-15 Thread Joshua Kugler
On Thursday 11 August 2005 02:13, Daniel Bloemer wrote:
 Hi,

 Alan Brown wrote:
  On Sun, 7 Aug 2005, Mick wrote:
  I use an USB disk as backup target for Bacula. It works fine. But there
  is one issue: I want to mount it immediatly before the backup and
  unmount it afterwards. There is even a mount option for the config file
  (sd.config I think), but this option is not allowed for a harddisk.
 
  Assuming you're using a linux system, why not allow hotplug and subfs to
  do this for you automagically?

 I am working on a similiar solution here. The problem is, that the
 hotplug-agent doesnt mount the USB-Harddisc on a fixed mountpoint.

 I tried to define a fixed mountpoint myself, but the hotplug-agent has
 avoided all my attempts until now.

If you label the disk (using the filesystem's label commands: e2label for 
ext2, xfs_admin -L label for xfs, etc), then when the drive is detected, it 
should have a mount point created in /mnt/LABEL.  At least that is the way 
it works on my Mandrake 10.2 system.  I have an XFS formatted drive in my USB 
enclosure with the label BackupDrive.  When I turn it on, a mount point is 
created at /mnt/BackupDrive and an entry is added in /etc/fstab.

Of course, you could always mount the drive manually at a known location:

mount /dev/sda1 /mnt/MyKnownLocation

j- k-

-- 
Joshua Kugler
CDE System Administrator
http://distance.uaf.edu/


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] mount USB disk

2005-08-08 Thread Mick
Hi,

I use an USB disk as backup target for Bacula. It works fine. But there
is one issue: I want to mount it immediatly before the backup and
unmount it afterwards. There is even a mount option for the config file
(sd.config I think), but this option is not allowed for a harddisk.

I place the mount  umount in the beforejob and afterjob. But than I
have the problem that sd does not recognize the mounted disk unless it
is restarted after the mount. If I want to restart it in the beforejob
then I have to run director as root because otherwise there would be an
access violation for the pid files of sd.

Do you know a better solution for this?

Regards,
Mick



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] mount USB disk

2005-08-08 Thread Alan Brown

On Sun, 7 Aug 2005, Mick wrote:


I use an USB disk as backup target for Bacula. It works fine. But there
is one issue: I want to mount it immediatly before the backup and
unmount it afterwards. There is even a mount option for the config file
(sd.config I think), but this option is not allowed for a harddisk.


Assuming you're using a linux system, why not allow hotplug and subfs to 
do this for you automagically?




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users