View previous topic :: View next topic |
Author |
Message |
PioniereElfico n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/1851569925457097199dec9.jpg)
Joined: 03 Nov 2004 Posts: 58 Location: Brescia
|
Posted: Tue Jan 24, 2006 9:04 pm Post subject: Hald automount in async [Risolto] |
|
|
Ciao a tutti, qualcuno di voi sa come modificare hald.conf per far in modo che le periferiche usb vengano montate in async e non in sync? _________________ Gentoo è gentoo...
-PioniereElfico-
Members of the "LUG Crema"
lru 371348 - icq 67561979
Last edited by PioniereElfico on Wed Jan 25, 2006 8:40 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fedeliallalinea Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/161653968057192eb39329f.jpg)
Joined: 08 Mar 2003 Posts: 31474 Location: here
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
PioniereElfico n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/1851569925457097199dec9.jpg)
Joined: 03 Nov 2004 Posts: 58 Location: Brescia
|
Posted: Wed Jan 25, 2006 8:21 am Post subject: |
|
|
grazie mille, mi metto subito al lavoro. _________________ Gentoo è gentoo...
-PioniereElfico-
Members of the "LUG Crema"
lru 371348 - icq 67561979 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
PioniereElfico n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/1851569925457097199dec9.jpg)
Joined: 03 Nov 2004 Posts: 58 Location: Brescia
|
Posted: Wed Jan 25, 2006 8:31 am Post subject: |
|
|
Con
bisogna modificare il file
Vedi post più sotto
Quote: | Code: | /usr/share/hal/fdi/policy/10osvendor/10-storage-policy.fdi |
E aggiungere in coda prima di
La seguente policy:
Code: |
<device>
<!-- stop Hal from mounting fat/vfat with sync -->
<match key="volume.fstype" string="vfat">
<merge key="volume.policy.mount_option.sync" type="bool">false</merge>
</match>
<match key="volume.fstype" string="fat">
<merge key="volume.policy.mount_option.sync" type="bool">false</merge>
</match>
</device> |
|
In questo modo le periferiche usb funzioneranno in modalità async, e non ci metteranno anni a scrivere un file da pochi mega ![Very Happy :D](images/smiles/icon_biggrin.gif) _________________ Gentoo è gentoo...
-PioniereElfico-
Members of the "LUG Crema"
lru 371348 - icq 67561979
Last edited by PioniereElfico on Wed Jan 25, 2006 9:18 am; edited 3 times in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fedeliallalinea Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/161653968057192eb39329f.jpg)
Joined: 08 Mar 2003 Posts: 31474 Location: here
|
Posted: Wed Jan 25, 2006 8:35 am Post subject: |
|
|
Io direi che potresti aprire un nuovo post in documentazione e mettere quello che hai scritto qua cosi' abbiamo un bel tips _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Kernel78 Moderator
![Moderator Moderator](/images/ranks/rank-mod.gif)
Joined: 24 Jun 2005 Posts: 3654
|
Posted: Wed Jan 25, 2006 8:38 am Post subject: |
|
|
PioniereElfico wrote: |
In questo modo le periferiche usb funzioneranno in modalità async, e non ci metteranno anni a scrivere un file da pochi mega
|
Non è mica vero ... la modalità async non velocizza il trasferimento dati ma "manda in background" la trasmissione (passtatemi il termine, sono ancora addormentato).
I tempi di trasferimento non cambiano, cambia la percezione ... _________________ Le tre grandi virtù di un programmatore: pigrizia, impazienza e arroganza. (Larry Wall).
Prima di postare un file togli i commenti con Code: | grep -vE '(^[[:space:]]*($|(#|!|;|//)))' |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
PioniereElfico n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/1851569925457097199dec9.jpg)
Joined: 03 Nov 2004 Posts: 58 Location: Brescia
|
Posted: Wed Jan 25, 2006 8:46 am Post subject: |
|
|
Da:
Code: | sync All I/O to the file system should be done synchronously. |
Questo non comporta che il kernel scriva il blocco poi salvi subito le modifiche al file system senza attendere che finisca il trasferimento? A me han detto così poi non vado a mettermi contro uno che si chiama kernel
Bye _________________ Gentoo è gentoo...
-PioniereElfico-
Members of the "LUG Crema"
lru 371348 - icq 67561979 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Onip Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/14414636074b138f3ed54ce.png)
Joined: 02 Sep 2004 Posts: 2912 Location: Parma (Italy)
|
Posted: Wed Jan 25, 2006 9:01 am Post subject: |
|
|
Piccolo appunto.
Non conviene modificare quel file, in quanto a un aggiornamento di hal verrebbe sovrascritto e quindi la modifica andrebbe persa. Molto meglio andare ad aggiungere un file personale nella dir 95userpolicy. Io, ad esempio, ho fatto questo.
Code: | Hal9000 ~ # cat /usr/share/hal/fdi/95userpolicy/usb.fdi
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
<device>
<match key="@block.storage_device:storage.hotpluggable" bool="true">
<merge key="volume.policy.mount_option.sync" type="bool">false</merge>
</match>
<match key="@block.storage_device:storage.removable" bool="true">
<merge key="volume.policy.mount_option.sync" type="bool">false</merge>
</match>
</device>
</deviceinfo>
|
In questo modo la modifica è permanente.
Byez _________________ Linux Registered User n. 373835
Titus Lucretius Carus, De Rerum Natura - Tantum religio potuit suadere malorum |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bandreabis Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/188011968046698f5684c86.jpg)
Joined: 18 Feb 2005 Posts: 2495 Location: イタリアのロディで
|
Posted: Sat Feb 10, 2007 12:29 pm Post subject: |
|
|
A me quella regola non funziona.
Per renderla attiva basta /etc/init.d/hald restart?
Per avere async il mount della penna ho dovuto modificare Quote: | /usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi |
EDIT: prendendo spunto dal file suddetto (che ho riportato all'originale) ho creato il file Quote: | cat /usr/share/hal/fdi/95userpolicy/usb.fdi
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="storage.media_check_enabled" bool="false">
<match key="storage.no_partitions_hint" bool="true">
<append key="volume.mount.valid_options" type="strlist">async</append>
</match>
</match>
</device>
</deviceinfo>
|
e ora la penna si monta async.
Solo che credo che questa sia una regola (troppo) generale che non influenza solo le USB.
EDIT2: ora forse va meglio?
Quote: | <?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="@block.storage_device:storage.hotpluggable" bool="true">
<append key="volume.mount.valid_options" type="strlist">async</append>
</match>
</device>
</deviceinfo>
|
_________________ Il numero di post non fa di me un esperto! Anzi! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|