Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Hald automount in async [Risolto]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
PioniereElfico
n00b
n00b


Joined: 03 Nov 2004
Posts: 58
Location: Brescia

PostPosted: Tue Jan 24, 2006 9:04 pm    Post subject: Hald automount in async [Risolto] Reply with quote

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
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30965
Location: here

PostPosted: Wed Jan 25, 2006 8:04 am    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic-t-362569-highlight-hald+automount+async.html
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
PioniereElfico
n00b
n00b


Joined: 03 Nov 2004
Posts: 58
Location: Brescia

PostPosted: Wed Jan 25, 2006 8:21 am    Post subject: Reply with quote

grazie mille, mi metto subito al lavoro.
_________________
Gentoo è gentoo...

-PioniereElfico-
Members of the "LUG Crema"
lru 371348 - icq 67561979
Back to top
View user's profile Send private message
PioniereElfico
n00b
n00b


Joined: 03 Nov 2004
Posts: 58
Location: Brescia

PostPosted: Wed Jan 25, 2006 8:31 am    Post subject: Reply with quote

Con
Code:
hal-0.5.5.1-r3


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
Code:
</deviceinfo>

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 :D
_________________
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
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30965
Location: here

PostPosted: Wed Jan 25, 2006 8:35 am    Post subject: Reply with quote

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
View user's profile Send private message
Kernel78
Moderator
Moderator


Joined: 24 Jun 2005
Posts: 3654

PostPosted: Wed Jan 25, 2006 8:38 am    Post subject: Reply with quote

PioniereElfico wrote:

In questo modo le periferiche usb funzioneranno in modalità async, e non ci metteranno anni a scrivere un file da pochi mega :D

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
View user's profile Send private message
PioniereElfico
n00b
n00b


Joined: 03 Nov 2004
Posts: 58
Location: Brescia

PostPosted: Wed Jan 25, 2006 8:46 am    Post subject: Reply with quote

Da:
Code:
man mount

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 :D

Bye
_________________
Gentoo è gentoo...

-PioniereElfico-
Members of the "LUG Crema"
lru 371348 - icq 67561979
Back to top
View user's profile Send private message
Onip
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2912
Location: Parma (Italy)

PostPosted: Wed Jan 25, 2006 9:01 am    Post subject: Reply with quote

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
View user's profile Send private message
bandreabis
Advocate
Advocate


Joined: 18 Feb 2005
Posts: 2490
Location: イタリアのロディで

PostPosted: Sat Feb 10, 2007 12:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum