May 052011
 

tuxLe partizioni ext3 ed ext4 contengono di default uno spazio speciale, ovvero riservano il 5% in maniera predefinita. Il motivo principale di tale spazio, è che così root può accedervi anche quando il filesystem viene utilizzato al 100%. Senza questa opzione, l’utente root potrebbe non essere in grado di accedere per “ripulire”, dato che il sistema potrebbe diventare instabile, cercando di scrivere i log su un sistema pieno al 100%, per esempio. L’altro motivo è quello di aiutare l’ottimizzazione generale con una minore frammentazione del filesystem.



Questa politica poteva essere stata adeguato negli anni ’90, quando le capacità dei dischi rigidi erano relativamente basse, ma ora si può ottenere facilmente un disco da 1TB. Così il 5% di questo è di circa 50 GB mentre a noi per garantire i servizi di sistema abbiamo bisogno solo di un paio di centinaia di megabyte.

Quindi il mio suggerimento è quello di spostare questo valore su 1% per il filesystem /home e ridurre anche il valore degli altri filesystem, sui sistemi desktop, probabilmente si può avere l’1% su tutti i filesystems senza problemi.

Per ottenere questo basta collegarsi come root in un terminale e dare il comando:

tune2fs -m 1 /dev/sdXX

Dove /dev/sdXX è la partizione che si desidera modificare, è possibile vedere quali sono le tue partizioni con il comando df

Per verificare la correttezza del comando o lo stato attuale è possibile usare il comando:

sudo  tune2fs -l /dev/sdXX

E verificate il valore di “reserved blocks”

And check for the value of “reserved blocks”

Popular Posts:

Flattr this!

  4 Responses to “Liberare lo spazio riservato nelle partizioni con filesystems ext3/ext4”

  1. Bad, bad, bad idea. The ext3/ext4 filesystems behave like hash tables. As the last few percent of the filesystem space is used the number of hash collisions that occur trying to read/store data increases drastically and filesystem performance drops to a crawl.

    • hmhm i did some research and not find anything about this, could you please give me some url/pointer ?

      Thanks !

      • This is fairly easily demonstrated by filling up a filesystem including that part which would have been reserved.

        Whether hash collisions (the explanation I found digging into the ext2 structure originally) or having to look up many places where a file is fragmented, the effect occurs. I am not certain if it is as bad as when disks were smaller and the reserved percentage was also relatively smaller.

        But I have tried this repeatedly and it never works.

  2. bad for performances: check what the author of ext4 is writing about this
    https://www.redhat.com/archives/ext3-users/2009-January/msg00026.html

Leave a Reply to linuxari Cancel reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

*