Hi Josh (and others)!

     Thank you for your quick assistance!

On Tue, Dec 27, 2005 at 01:38:34PM -0500, Josh Fisher wrote:

> The problem with creating permanent directories under /media for the 
> drives is that should the drives not be mounted at those directories for 
> whatever reason, bacula will happily write to whatever filesystem is 
> mounted on /media (or more likely on /). The job of fstab-sync is to 
> create and remove these mountpoints on the fly in response to HAL 
> events. That way the SD won't be able to write at all should the drive 
> not be mounted. Ideally, bacula would recognize that the USB drive is 
> not mounted and issue a warning. However, bacula is not yet ready to 
> deal with hotplugging USB drives, so it will fail the job and change the 
> volume status to ERROR.

     So, are you saying that I don't need to make a (permanent) directory,
to which to mount the drives?

     I would actually prefer that.  I'll have to say that -- as of right
now -- I hadn't yet considered what you mentioned above (it is definitely
something to consider)!

     I was thinking I read something, somewhere, that said a directory had
to be already created.

     But, maybe not.  If I had gotten (or get) to the point where it
mounts the drive to one of them, I was going to see if it would still do
it if the directories were not already created.

> I believe your config is probably identifying the drive, though I have 
> not yet played with using volume.uuid. I currently use 
> @block.storage_device:storage.vendor and 
> @block.storage_device:storage.model strings to ID the drive. I think 
> your problem is the string specified for 
> volume.policy.desired_mount_point. It should be simply "wd" rather than 
> "/media/wd". I am fairly certain that your policy config will attempt to 
> mount at /media/media/wd, and since  the /media/media directory does not 
> exist, HAL ends up using the default string of 'usbdrive', which causes 
> the drive to be mounted at /media/usbdrive.

     Thank you!  I hadn't thought of that at all.

     It is still not currently working, but I did remove the "/media/" and
now have just "wd" (for the Western Digital drive).

     The reason I played with volume.uuid is, IF the storage.vendor and
storage.model strings match the idVendor and idProduct portions (below, I
left them in), I don't HAVE any strings for the SimpleTech drive, for
either!  I have a string in the idVendor, but nothing in the idProduct.

     Or, do those two (storage.vendor and storage.model) match the lines
labeled iManufacturer and iProduct, below?  I did have a vendor, but I
don't even have the string "model" in the output I got from lsusb -v.  So,
I guess I was using the line closest to the idVendor line, though perhaps
that's not what I should do?

     Here's the last file I tried, and I tried turning both on (one at a
time), and both wound up being mounted as /media/usbdisk:

<<>>
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- --> 

<deviceinfo version="0.2">

  <!-- Example: Match a volume from an USB Storage Based mp3 player
                by the file system UUID and assign a mount point.

                NB: When reformatting the volume a new UUID will be
                used and this rule will have to be altered -->
  <device>
    <match key="block.is_volume" bool="true">
      <match key="volume.fsusage" string="filesystem">
        <match key="@block.storage_device:storage.vendor" string="Prolific 
Technology Inc.">
          <match key="@block.storage_device:storage.model" string="ATAPI-6 
Bridge Controller">
            <merge key="volume.policy.desired_mount_point" 
type="string">simpletech</merge>
        </match>
      </match>
    </match>
  </device>

</deviceinfo>

<deviceinfo version="0.2">

  <!-- Example: Match a volume from an USB Storage Based mp3 player
                by the file system UUID and assign a mount point.

                NB: When reformatting the volume a new UUID will be
                used and this rule will have to be altered -->
  <device>
    <match key="block.is_volume" bool="true">
      <match key="volume.fsusage" string="filesystem">
        <match key="@block.storage_device:storage.vendor" string="Western 
Digital">
          <match key="@block.storage_device:storage.model" string="External 
HDD">
            <merge key="volume.policy.desired_mount_point" 
type="string">wd</merge>
        </match>
      </match>
    </match>
  </device>

</deviceinfo>
<<>>

     I tried what appeared in the iManufacturer and iProduct, below.

> For my Lexar Jumpdrive I created 
> /usr/share/hal/fdi/95userpolicy/jumpdrive.fdi (see below). This is for 
> FC3. For FC4 it would be stored in a subdirectory under 
> /etc/hal/fdi/policy/. I haven't yet tried it on FC4, but I believe you 
> would create the 95userpolicy directory under /etc/hal/fdi/policy and 
> put the jumpdrive.fdi file in /etc/hal/fdi/policy/95userpolicy. The FC4 
> way makes more sense because all user configs are under /etc/hal/fdi and 
> the /usr/share/hal/fdi files are always left alone.

     <SNIP>

     THANK YOU for this example!  I will play some more!  :-)

> >    I'll mention some lines that I consider important, when I "lsusb -v",
> >when the drives are turned on.
> >
> >    Here are some lines I consider important for when the Western Digital
> >drive is on:
> >
> ><<>>
> >Bus 001 Device 017: ID 1058:0400 Western Digital Technologies, Inc. 
> >Device Descriptor:
> > bLength                18
> > bDescriptorType         1
> > bcdUSB               2.00
> > bDeviceClass            0 (Defined at Interface level)
> > bDeviceSubClass         0 
> > bDeviceProtocol         0 
> > bMaxPacketSize0        64
> > idVendor           0x1058 Western Digital Technologies, Inc.
> > idProduct          0x0400 
> > bcdDevice            1.12
> > iManufacturer         138 Western Digital
> > iProduct              154 External HDD
> > .
> > .
> > .
> ><<>>
> >
> >    ...and here are the equivalent lines for the SimpleTech drive:
> >
> ><<>>
> >Bus 001 Device 016: ID 4971:a002  
> >Device Descriptor:
> > bLength                18
> > bDescriptorType         1
> > bcdUSB               2.00
> > bDeviceClass            0 (Defined at Interface level)
> > bDeviceSubClass         0 
> > bDeviceProtocol         0 
> > bMaxPacketSize0        64
> > idVendor           0x4971 
> > idProduct          0xa002 
> > bcdDevice            0.01
> > iManufacturer           1 Prolific Technology Inc.
> > iProduct                2 ATAPI-6 Bridge Controller
> > .
> > .
> > .
> ><<>>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to