USB drives

Scott Ruckh sruckh at gemneye.org
Tue Mar 25 23:25:32 UTC 2008


This is what you said Jeff Hogg
> Michael Scully wrote:
>> Krishnaprasad:
>>
>> 	Actually no, it fails because the mount point isn't there.  So I
>> assume the hotplug events do something to create the directory first, mount
>> to it, and delete it on umount.  I guess I'm wondering how to do the same,
>> for consistency.
>>
>> Scully
>>
>>
>> -----Original Message-----

> Hey Scully,
>
>
>    It sounds like you could write a pair of short bash scripts to handle
> this.  You could then place them in the start up and shutdown routines
> that are part of the runlevels.  You can see several examples of such
> scripts in the /etc/rc.d/init.d directory.  Just have the start up
> version create the directory and mount the drive, and the shutdown
> version umount and delete the directory.  Hope this helps.
>
> --
> Jeff Hogg

I asked a similar question a long time ago, but more convoluted, in that I was asking how to use a
script in the /usr/share/hal/fdi/95userpolicy/ to automatically mount and unmount drives in the same
way they are mounted to the /media directory.

I create a xxx-usb.fdi file in the above directory that looks like the following:

<?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="f96312f0-34dd-4615-abb7-497b44ac5dd7">
          <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>

I would have thought that this would mount the USB device with
UUID=f96312f0-34dd-4615-abb7-497b44ac5dd7 at the /BACKUPS mount point.

I tried variations of the above with no luck.  I resorted to adding stuff into a startup script, but
that is not really the desired effect.  I would like the system to recognize device by UUID and be able
to mount that device to a particular mount location.  Which is what I believe the OP is also trying to
duplicate.





More information about the redhat-list mailing list