[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Le passage en 2.4.x peut être irreversible



Pour ma boite, j'ai dû réalisé un petit test avec un noyau 2.4 (ma
machine était la seul en 2.4 à l'époque).  Le test consistait à crée un
fichier de plus de 4Gb.  Pas de problème, je tente l'aventure avec un
fichier à trou:

    $ dd if=/dev/zero of=/tmp/big bs=1M seek=4096 count=1
    dd: /tmp/big: Invalid argument
    1+0 records in
    1+0 records out
    $ ls -l /tmp/big
    ls: /tmp/big: Value too large for defined data type
    $ /bin/rm -f /tmp/big 
    /bin/rm: cannot remove `/tmp/big': Value too large for defined data type
    $ echo /tmp/big*
    /tmp/big

Et oui, stat/lstat/fstat sont maintenant old_stat/old_lstat/old_fstat et
retournent maintenant EOVERFLOW si la taille du fichier n'est pas
exprimable avec 32 bits.  J'ai aussi eu un petit message du noyau, fort
gentil au demeurant:

    EXT2-fs warning (device sd(8,6)): ext2_update_dynamic_rev: updating to rev 1 because of new feature flag, running e2fsck is recommended

Ce filesystem n'est plus montable par un noyau 2.2.x :-(

Je me suis dit que ce n'était pas un problème mais bien que le noyau
sache gérer les fichiers de plus de 4Gb _aucun_ programme user n'est
capable de travailler avec :-(

Allez, deux solutions pour supprimer ce gros fichier:
. via un source C:

    main() { unlink("/tmp/big"); }

. via deux commandes:

    $ dd if=/dev/zero of=/tmp/big bs=1k count=1
    1+0 records in
    1+0 records out
    $ ls -l /tmp/big
    -rw-r--r--    1 egp      users        1024 Jun 14 10:17 /tmp/big
    $ rm -f /tmp/big
    $ ls -l /tmp/big 
    ls: /tmp/big: No such file or directory


Vous serez prévenus.
-- 
Edouard G. Parmelan
http://egp.free.fr



Reply to: