LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1396|回复: 11

SuSE 10.0 的大问题:移动设备写入数据速度极其缓慢!

[复制链接]
发表于 2005-10-21 13:47:43 | 显示全部楼层 |阅读模式
鉴于这个问题的严重性,SuSE Release Notes 提到关于取消移动设备的同步挂载模式:
1 Create a file with the name 90-storage-nosync.fdi and the following contents:
<?xml version="1.0" encoding="ISO-8859-1"?>
<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>

2 Adjust the line <match key="volume.uuid" string="==UUID=="> according to your hardware.
Run lshal to retrieve the volume.uuid and enter that ID instead of ==UUID==

3 Copy 90-storage-nosync.fdi into this directory:
cp 90-storage-nosync.fdi /usr/share/hal/fdi/policy/20thirdparty

4 Restart the HAL service with rchal restart.

其中第2点,要把 UUID 修改为实际的 volume.uuid,但是运行 lshal 出来一堆信息。
volume.uuid = "*" 的赋值就有两条。因此,这点说明不甚明朗。

谁能解释一下到底怎么做?谢谢。
 楼主| 发表于 2005-10-21 22:43:44 | 显示全部楼层
According to https://bugzilla.novell.com/show_bug.cgi?id=105871
You can change the fdi file to do this for all
USB-storage devices. You need only to replace this line (untested):

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

with

<match key="@info.parent:storage.bus" string="usb">
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-21 22:51:07 | 显示全部楼层
一个完整的建议,同样来自https://bugzilla.novell.com/show_bug.cgi?id=105871
One tip: if you looking for the right string for "volume.uuid, you can run
lshal with lshal > /root/lshal_out.txt within a console during the USB-Stick is
mounted and open the Textfile with kwrite /root/lshal_out.txt, Then you can
search within the textfile for the volume,uuid-string according to the
mountpoint of your USB-Stick. These are the outputs for my usb-stick.
>>>>>
volume.mount_point = '/media/usbdisk'  (string)
  volume.label = ''  (string)
  volume.uuid = 'E4DE-3250'  (string)
<<<<<

Another tip:
If you want to disable sync-option in every usb-device, you can change the
nosync.fdi-file to this:

<?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="@info.parent:storage.bus" string="usb">
          <merge key="volume.policy.mount_option.sync" type="bool">false</merge>   
        </match>   
      </match>   
    </match>   
  </device>   
</deviceinfo>

Copy the lines above to a texteditor and save the nosync.fdi file to
/usr/share/hal/fdi/policy/95userpolicy

After "rchal restart" the sync option is disabled for every usb-device.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-21 23:05:57 | 显示全部楼层
小结一个目前可以实行的办法。这不是根本的解决之道,但可以解决一些日常应用问题。
希望SuSE 开发团队早日解决这个大 bug。

1 创建90-storage-nosync.fdi,包含一下内容:

  1. <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
  2. <deviceinfo version="0.2">
  3.   <device>
  4.     <!-- disable sync for mount -->
  5.     <match key="block.is_volume" bool="true">
  6.       <match key="volume.fsusage" string="filesystem">
  7.         <match key="@info.parent:storage.bus" string="usb">
  8.           <merge key="volume.policy.mount_option.sync" type="bool">false</merge>
  9.         </match>
  10.       </match>
  11.     </match>
  12.   </device>
  13. </deviceinfo>
复制代码


2 复制到对应的目录

  1. cp 90-storage-nosync.fdi /usr/share/hal/fdi/policy/20thirdparty
复制代码


3 重启服务

  1. rchal restart
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-22 19:27:41 | 显示全部楼层
顶一下.
回复 支持 反对

使用道具 举报

发表于 2005-11-10 23:05:04 | 显示全部楼层

I tried the &quot;Another tip&quot;, it does not work

volume.mount_point = '/media/usbdisk'  (string)
  volume.label = ''  (string)
  volume.uuid = ''  (string)
回复 支持 反对

使用道具 举报

发表于 2005-11-11 12:17:33 | 显示全部楼层
good
回复 支持 反对

使用道具 举报

发表于 2005-11-11 19:46:33 | 显示全部楼层
up...
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-11-26 01:09:38 | 显示全部楼层
Post by robert_hoo
volume.mount_point = '/media/usbdisk'  (string)
  volume.label = ''  (string)
  volume.uuid = ''  (string)

Have you tried the "90-storage-nosync.fdi"?
回复 支持 反对

使用道具 举报

发表于 2005-11-27 01:41:58 | 显示全部楼层
这个是当时的设计选择,因为用sync来mount的话,初级用户就不去学umount这样的命令。
现在SUSE开发团队正在研究更合理的解决方案。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表