SDB:Automounting without the sync Option

Şuraya atla: kullan, ara


Version: 9.3 

Concern

You notice that the write speed on media like USB sticks or external USB hard disks is too slow. For this reason or to disable synchronous writing for selected media (e.g., USB sticks or flash media), you want to automount with submount/HAL without the sync option.

Procedure

As root, create a file with any name and the ending .fdi in /usr/share/hal/fdi/95userpolicy/, for example nosync.fdi. Edit the file with an editor of your choice:

<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <!-- disable sync for mount -->
    <match key="block.is_volume" bool="true">
      <match key="volume.fsusage" string="filesystem">
        <match key="volume.uuid" string="UUID">
          <merge key="volume.policy.mount_option.sync" type="bool">false</merge>
        </match>
      </match>
    </match>
  </device>
</deviceinfo>

Adapt the following line. The needed information can be obtained from the output of 'lshal' in the console or from the 'hal-device-manager' in KDE/GNOME (install hal-gnome.rpm if necessary).

<match key="volume.uuid" string="==UUID==">

Enter the value for "==UUID==" specified under volume.uuid. After adapting the file, run the following command as root:

rchal restart

submount should now mount the respective device without the sync option. Do not forget to explicitly unmount the device before you remove it, as the transferred data may not have been written yet. Failure to do this could result in loss of data. <keyword>subfs,submount,mount,sync,hal,usb</keyword>