Barry L. Bond wrote:

Greetings!
<SNIP>

    I want the Western Digital drive to be automounted to /media/wd, and
the SimpleTech drive to /media/simpletech.  And, I've created these
directory in /media, so they exist all the time, whether something is
currently mounted to them or not:
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.

    Now!  To my questions!  :-)

    I haven't been able to find exactly what to specify, in the XML file,
which I am placing in /etc/hal/fdi/policy, to have the system identify the
drive, when I turn one or the other USB drive on.  It will place the
drive on /media/usbdisk.

    I have been trying a large number of possibilities for the file,
which I'm calling storage-policy-usb-disks.fdi.  The *current* contents
are:

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

 <device>
   <match key="block.is_volume" bool="true">
     <match key="volume.fsusage" string="filesystem">
        <match key="volume.uuid" string="1058:0400">
            <merge key="volume.policy.desired_mount_point" 
type="string">/media/wd</merge>
        </match>
     </match>
   </match>
 </device>

</deviceinfo>
<<>>

    (I said current, because I have tried a variety of different things,
the vendor and product, through what I tried above.)

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.

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.

<?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="string">jumpdrive</merge>
 <merge key="volume.policy.mount_filesystem" type="string">vfat</merge>
 <merge key="volume.policy.should_mount" type="bool">true</merge>
<merge key="volume.policy.mount_option.fscontext=system_u:object_r:removable_t" type="bool">false<
/merge>
 </match>
 </match>
 </match>
 </match>
 </match>
</device>
</deviceinfo>

    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
 .
 .
 .
<<>>

    The last thing I've been trying to identify is by the ID number (on
the Bus line, for both.  This is 1058:0400 for the Western Digital, and
4971:a002 for the SimpleTech.

    I've been unsuccessful.  And, so, since I've never done this before,
I'm coming to people who know more about it, and asking for your
assistance.  I am open to whatever suggestions you may have, to have this
work.

    I will be *glad* to provide any information I've not provided in this
message.  (I wanted to keep it as short as possible, yet provide enough
information to allow you to know what I'm working with, and that I have
been trying to do it, by myself!)  :-)

    If anyone has any tips on what I'm missing, I'd appreciate hearing
it.  Thank you!

    Barry


-------------------------------------------------------
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


-------------------------------------------------------
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