Package: e2fsprogs Version: 1.42 Severity : minor Here is an abridged sample session highlighting the problem (on a French system; examination of the English resize2fs strings shows the problem is the same) :
(quote begins) $ sudo fdisk /dev/sdb Commande (m pour l'aide) : p [...] Périphérique Amorçage Début Fin Blocs Id. Système [...] /dev/sdb2 144584 3751934 1803675+ 83 Linux Commande (m pour l'aide) : q $ sudo resize2fs /dev/sdb2 3607351s [...] Le système de fichiers /dev/sdb2 a maintenant une taille de 450918 blocs. $ sudo fdisk /dev/sdb Commande (m pour l'aide) : p [...] Périphérique Amorçage Début Fin Blocs Id. Système [...] /dev/sdb2 144584 3751934 1803675+ 83 Linux (quote ends) In the example above, resize2fs was invoked because the file system was using less than the full partition size. Fdisk systematically uses a 'block' of 1024 bytes, whereas resize2fs uses a flexible definition (e.g. the string 'Resizing the filesystem on %s to %llu (%dk) blocks'). Some of the resize2fs reports omit defining the 'block' size used, which is unsettling to the user. In the example above, the user specified a size of 3607351 sectors (of 512 bytes), reported as '1803675+ blocks' by fdisk (where the '+' indicates a half-block), but resize2fs blithely states it resized to '450918 blocks'. The (apparent) discrepancy will be jarring for the user, who will check fdisk and dig around until he finds out the 'block' size used in that statement was 4096 bytes. The fix is easy: everywhere resize2fs reports '%llu blocks' (there are 4 such string fragments), state the block size used: '%llu (%dk) blocks'. It would also be more reassuring to the user if fractional block sizes were not rounded down (in the example above, the final file system size was not 450918 blocks but rather 450918.875 blocks or 450918 and 7/8 blocks). Maybe the same '+' convention as fdisk should be used. Daniel U. Thibault Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC) Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS) RDDC - Centre de recherches de Valcartier | DRDC - Valcartier Research Centre 2459 route de la Bravoure Québec QC G3J 1X5 CANADA Vox : (418) 844-4000 x4245 Fax : (418) 844-4538 NAC : 918V QSDJ<http://www.travelgis.com/map.asp?addr=918V%20QSDJ> <http://www.travelgis.com/map.asp?addr=918V%20QSDJ> Gouvernement du Canada | Government of Canada <http://www.valcartier.drdc-rddc.gc.ca/>