EL4 -- HAL -- fstab-sync -- 95userpolicy -- USB
Scott Ruckh
sruckh at gemneye.org
Fri Jun 9 06:33:57 UTC 2006
I am trying to automount an external USB hard drive. From everything I
have come across it looks like HAL (haldaemon) is what I need to use.
Without HAL in the picture I do the following:
mount /dev/sdb1 /BACKUPS
(drwxrwxr-x 9 root bacula 4096 Apr 22 10:37 BACKUPS)
/dev/sdb1 is formated with ext3 and everything works as expected when
manually mounting the drive.
In order to try and get automounting working via HAL I have attempted the
following:
I created the following file:
/usr/share/hal/fdi/95userpolicy/WD-5000KS-USB.fdi
with the contents:
<?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="21694bc7-5393-4329-90f0-d29cc5b3336d">
<merge key="volume.policy.desired_mount_point"
type="string">BACKUPS</merge>
<merge key="storage.policy.default.mount_option.noauto"
type="bool">false</merge>
</match>
</match>
</match>
</device>
</deviceinfo>
When I plug this device in the directory /media/BACKUPS is created.
(drwxr-xr-x 2 root root 4096 Jun 8 22:05 BACKUPS)
As you can see it is owned by root with group also being root (different
from my /BACKUPS directory).
Also, fstab-sync put the following in /etc/fstab
/dev/sdb1 /media/BACKUPS ext3
pamconsole,exec,noauto,managed 0 0
I do not know why the noauto is used when I set
storage.policy.default.mount_option.noauto to false in the .fdi file.
More importantly I do not know how to change the mountpoint to just
/BACKUPS and not to /media/BACKUPS.
Also the drive does not automount eventhough the directory is created and
fstab-synch adds content to the /etc/fstab file.
Another question, is it possible to override
storage.policy.default.mount_root to something other then /media for a
single device? Can this device be mounted on a branch off the "/"
directory (ie., /BACKUPS)?
My basic question: Is there away to utilize HAL to accomplish the same
thing as I do with the manual mount command?
Thanks.
Scott
--
More information about the redhat-list
mailing list