Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Howto] Hald/Ivman in modalità async [INCOMPLETO]
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) Risorse italiane (documentazione e tools)
View previous topic :: View next topic  
Author Message
PioniereElfico
n00b
n00b


Joined: 03 Nov 2004
Posts: 58
Location: Brescia

PostPosted: Wed Jan 25, 2006 1:21 pm    Post subject: [Howto] Hald/Ivman in modalità async [INCOMPLETO] Reply with quote

Come risaputo da questo report https://bugs.gentoo.org/show_bug.cgi?id=99039 con i nuovi kernel viene messo in automatico il mount in modalità sync sulle periferiche usb (per ora riscontrato solo sulle pennine e lettori mp3) con file system fat*.

Sostanzialmente con async si mantengono i dati scritti in un buffer e si aggiorna la tabella FAT solo alla fine dell'operazione , mentre con sync si aggiorna ad ogni blocco scritto. Sync accorcia decisamente la vita delle memorie USB... l'unico vantaggio è che non ci sarebbe il rischio di creare dati corrotti in caso di cattivo unmount della memoria.

Per ovviare questo problema è sufficiente specificare:
Code:
mount -t vfat /dev/sda1 /media/usbdisk -o async


Se si usano programmi di automount come ivman o hald bisogna configurare le policy di mount.

Per Hald

Come mi ha suggerito Onip è importante creare una directory per i file di policy user-defined.
Code:
mkdir /usr/share/hal/fdi/policy/95userpolicy/

dopodiche si crea un file con le policy per usb
Code:
nano -w /usr/share/hal/fdi/policy/95userpolicy/usb.fdi

dove si specifica la policy:
Code:
<?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>


Per Ivman

***Se qualcuno ha ivman può gentilmente postare la soluzione o un link***
_________________
Gentoo è gentoo...

-PioniereElfico-
Members of the "LUG Crema"
lru 371348 - icq 67561979


Last edited by PioniereElfico on Thu Jan 26, 2006 7:29 pm; edited 3 times in total
Back to top
View user's profile Send private message
Cazzantonio
Bodhisattva
Bodhisattva


Joined: 20 Mar 2004
Posts: 4514
Location: Somewere around the world

PostPosted: Thu Jan 26, 2006 11:49 am    Post subject: Reply with quote

cosa cambia di preciso tra la modalità sync e async?
Ho dato una lettura veloce al bug report ma forse se lo spieghi nel thread è meglio :wink:

P.S.
la dir non dovrebbe essere
Code:
/usr/share/hal/fdi/95userpolicy/
invece di
Code:
/usr/share/hal/fdi/policy/95userpolicy/
?
_________________
Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne
Back to top
View user's profile Send private message
Onip
Advocate
Advocate


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

PostPosted: Thu Jan 26, 2006 1:18 pm    Post subject: Reply with quote

Code:
/usr/share/hal/fdi/95userpolicy/

_________________
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
CarloJekko
Veteran
Veteran


Joined: 31 Mar 2005
Posts: 1315
Location: Baia Domizia :-)

PostPosted: Thu Jan 26, 2006 2:19 pm    Post subject: Reply with quote

Sostanzialmente con async si mantengono i dati scritti in un buffer e si aggiorna la tabella FAT solo alla fine dell'operazione , mentre con sync si aggiorna ad ogni blocco scritto. Sync accorcia decisamente la vita delle memorie USB... l'unico vantaggio è che non ci sarebbe il rischio di creare dati corrotti in caso di cattivo unmount della memoria
_________________
C.
Back to top
View user's profile Send private message
bandreabis
Advocate
Advocate


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

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

A me succede anche per filesystem ext3.
_________________
Il numero di post non fa di me un esperto! Anzi!
Back to top
View user's profile Send private message
sometimes
n00b
n00b


Joined: 25 Jun 2005
Posts: 52

PostPosted: Sat Feb 10, 2007 1:05 pm    Post subject: Reply with quote

come faccio per sapere con quale modalità è montata la mia penna usb?
Back to top
View user's profile Send private message
bandreabis
Advocate
Advocate


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

PostPosted: Sat Feb 10, 2007 2:58 pm    Post subject: Reply with quote

sometimes wrote:
come faccio per sapere con quale modalità è montata la mia penna usb?

Code:
mount

_________________
Il numero di post non fa di me un esperto! Anzi!
Back to top
View user's profile Send private message
sometimes
n00b
n00b


Joined: 25 Jun 2005
Posts: 52

PostPosted: Sat Feb 10, 2007 3:23 pm    Post subject: Reply with quote

bandreabis wrote:
sometimes wrote:
come faccio per sapere con quale modalità è montata la mia penna usb?

Code:
mount


/dev/sdb1 on /media/USB type vfat (rw,noexec,nosuid,nodev,shortname=winnt,uid=1001)

non dice niente al rigurado di async o sync...
scusate la mia niubbosità.
Back to top
View user's profile Send private message
bandreabis
Advocate
Advocate


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

PostPosted: Sat Feb 10, 2007 3:33 pm    Post subject: Reply with quote

sometimes wrote:
bandreabis wrote:
sometimes wrote:
come faccio per sapere con quale modalità è montata la mia penna usb?

Code:
mount


/dev/sdb1 on /media/USB type vfat (rw,noexec,nosuid,nodev,shortname=winnt,uid=1001)

non dice niente al rigurado di async o sync...
scusate la mia niubbosità.


Allora è async.
_________________
Il numero di post non fa di me un esperto! Anzi!
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4787
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Sun Feb 11, 2007 1:05 pm    Post subject: Reply with quote

bandreabis wrote:

sometimes wrote:

/dev/sdb1 on /media/USB type vfat (rw,noexec,nosuid,nodev,shortname=winnt,uid=1001)

non dice niente al rigurado di async o sync...
scusate la mia niubbosità.


Allora è async.

:?:
se ho capito quanto è scritto nella guida sopra, il default è attualmente sync.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
bandreabis
Advocate
Advocate


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

PostPosted: Sun Feb 11, 2007 1:19 pm    Post subject: Reply with quote

cloc3 wrote:

:?:
se ho capito quanto è scritto nella guida sopra, il default è attualmente sync.

Sì. Ho dovuto scrivere una regola per hal per avere l'async.
_________________
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) Risorse italiane (documentazione e tools) 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