Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[XFS] mesurer la fragmentation (résolu: man xfs_db)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
TTK
Guru
Guru


Joined: 02 Mar 2004
Posts: 523

PostPosted: Wed Feb 16, 2005 4:47 pm    Post subject: [XFS] mesurer la fragmentation (résolu: man xfs_db) Reply with quote

Bonjour

J'ai une partition XFS presque pleine, de gros fichiers qui changent souvent. C'est mal, ca donne de la fragmentation. Avec les ext2/3 on a un pourcentage indiqué quand on fait un fsck. Pas avec xfs (le fsck.xfs ne fait rien, la vérification est automatique au mount et ne produit pas de message).

Comment peut-on mesurer la fragmentation sous XFS ?

Pour la réduire, j'ai bien noté que l'idéal est d'avoir 25% d'espace libre (en gros), mais j'ai mal dimensionné cette partoche au départ. Si c'était à refaire ..
Sinon l'astuce de faire un tar, rm et dé-tar est sympa mais mes fichiers changent trop souvent pour que cela soit utile.

Merci


Last edited by TTK on Wed Feb 16, 2005 7:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
Gentoo_Lover
l33t
l33t


Joined: 10 Jun 2004
Posts: 707
Location: ln -s France/Aquitaine/Bordeaux/ Localisation

PostPosted: Wed Feb 16, 2005 5:27 pm    Post subject: Reply with quote

8O attend j'ai tounjours entendu dire que les FS sous linux ne fragmentent pas (ou trés peu) ..... là je suis bouche baie
sinon pour ton problême désolé je suis en ext3 je n'en sais rien (désolé de poluer le thread mais là....)
_________________
My fvwm desktop screen : http://romain.perier.free.fr/fvwm/fvwm-last.png

http://www.gentoofr.org
Back to top
View user's profile Send private message
kwenspc
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 4954

PostPosted: Wed Feb 16, 2005 5:41 pm    Post subject: Reply with quote

En effet, ces FS ne fragmentent que très peu. Alors mise à part pour la curiosité, voir le taux de fragmentation n'est pas forcément très utile.
(je suis arrivé à 1% au pire de fichier non-contigüe une fois en ext3. Depuis sous reiserfs j'ai jamais dû y arriver)

un ptit xfsck sous un livecd (pour avoir les partoche en read-only) devrait faire l'affaire non?
Back to top
View user's profile Send private message
kernelsensei
Bodhisattva
Bodhisattva


Joined: 22 Feb 2004
Posts: 5619
Location: Woustviller/Moselle/FRANCE (49.07°N;7.02°E)

PostPosted: Wed Feb 16, 2005 5:54 pm    Post subject: Reply with quote

fsck.xfs ne fait rien, il fait un simple
Code:
return 0;


ya qu'a lire la doc :

Code:
NAME
       fsck.xfs - do nothing, successfully

SYNOPSIS
       fsck.xfs [ ...]

DESCRIPTION
       fsck.xfs  is  called  by  the  generic  Linux fsck(8) program at startup to check and repair an XFS
       filesystem.  XFS is a journaling filesystem and performs recovery at mount(8) time if necessary, so
       fsck.xfs simply exits with a zero exit status.

       If you wish to check check the consistency of an XFS filesystem, or repair a damaged or corrupt XFS
       filesystem, see xfs_check(8) and xfs_repair(8).

FILES
       /etc/fstab.

SEE ALSO
       fsck(8), fstab(5), xfs(5), xfs_check(8), xfs_repair(8).

_________________
$ ruby -e'puts " .:@BFegiklnorst".unpack("x4ax7aaX6ax5aX15ax4aax6aaX7ax2aX5aX8 \
axaX3ax8aX4ax6aX3aX6ax3ax3aX9ax4ax2aX9axaX6ax3aX2ax4ax3aX4aXaX12ax10aaX7a").join'
Back to top
View user's profile Send private message
TTK
Guru
Guru


Joined: 02 Mar 2004
Posts: 523

PostPosted: Wed Feb 16, 2005 7:45 pm    Post subject: Reply with quote

Sisisi, les FS de linux aussi fragmentent ! Ils evitent bien la fragmentation quand les partitions ne sont pas trop pleines, et si les fichiers n'ont pas tendance à grossir. Si tu as plein de .vob, que tu les effaces et en mets d'autres ca frag pas. Si par contre tu as des fichiers qui se remplissent au fur et a mesure jusqu'a 1 ou 2 Gigs (enregistrements réseaux par exemple chez moi) ca frag.

Pour connaitre la fragmentation, j'ai finalement trouvé ça:
Code:

tosh root # xfs_db -r -c frag /dev/hda3
actual 343554, ideal 338720, fragmentation factor 1.41%
tosh root # xfs_db -r -c frag /dev/hda6
actual 163, ideal 121, fragmentation factor 25.77%


Pourtant, si je regarde l'occupation de ces partitions:

Code:

tosh root # df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda3              17G   16G  1.4G  93% /
/dev/hda6              15G  7.0G  7.3G  50% /misc/stock


Donc c'est l'inverse de ce que je disais ... Reste à voir ce que ca donne sur mon enregistreur du boulot.

Pour défragmenter, en grattant sur le net j'ai trouvé des références à xfs_fsr, mais pas de trace sur ma gentoo. Quid ?
Back to top
View user's profile Send private message
ppierre
n00b
n00b


Joined: 17 Aug 2004
Posts: 35

PostPosted: Thu Feb 17, 2005 11:10 pm    Post subject: Reply with quote

Code:
# emerge -va xfsdump
$ man xfs_fsr
NAME
       xfs_fsr - filesystem reorganizer for XFS

SYNOPSIS
       xfs_fsr [-v] [-t seconds] [-f leftoff] [-m mtab]
       xfs_fsr [-v] [xfsdev | file] ...

DESCRIPTION
       xfs_fsr is applicable only to XFS filesystems.

       xfs_fsr  improves the organization of mounted filesystems.  The reorga-
       nization algorithm operates on one file at a time, compacting or other-
       wise  improving  the  layout  of the file extents (contiguous blocks of
       file data).

Je suis tombé dessus par hasard :lol:
Back to top
View user's profile Send private message
TTK
Guru
Guru


Joined: 02 Mar 2004
Posts: 523

PostPosted: Fri Feb 18, 2005 2:58 pm    Post subject: Reply with quote

Merci du tuyau !

Ceci dit, ce soft a l'air de juste copier/déplacer les fichiers un par un. Donc il a besoin de pas mal de place libre sur la partition. On en revient au meme pb. Je crois que je vais pas couper à une sauvegarde, repartition avec plus de place, restore.

Enfin je garde ça sous le coude, ca peut servir, ne serait-ce que pour alimenter un troll sur la fragmentation sous linux ;)

Tshaw
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French 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