2014
07.08

En cas d’erreur lors d’un resize2fs du type resize2fs: Operation not permitted While trying to add group #8256 comme dans l’exemple ci dessous :

root@debianServer:~# resize2fs /dev/vgl_debianServer01_tech/lvl_prdsitenbmain_tomcat7

resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/vgl_debianServer01_tech/lvl_prdsitenbmain_tomcat7 is mounted on /app/prd/SITENB/MAIN/tomcat7; on-line resizing required
old desc_blocks = 258, new_desc_blocks = 802
Performing an on-line resize of /dev/vgl_debianServer01_tech/lvl_prdsitenbmain_tomcat7 to 210227200 (1k) blocks.
resize2fs: Operation not permitted While trying to add group #8256

Cette erreur se produit si le journal est trop petit

root@debianServer:~# tail -1 /var/log/messages

Jul 8 07:49:54 debianServer kernel: EXT4-fs warning (device dm-49): ext4_group_add: No reserved GDT blocks, can't resize

Par défaut le journal fait 8M ce qui est trop petit dans certains cas.
Pour vérifier sa taille , il faut passer la commande dump2fs :
root@debianServer:~# dumpe2fs /dev/vgl_debianServer01_tech/lvl_prdsitenbmain_tomcat7| grep ‘Journal size’

dumpe2fs 1.41.12 (17-May-2010)
Journal size: 8M

On va donc augmenter sa taille. Voila la procédure :

1. Demonter le FS


umount /dev/vgl_debianServer01_tech/lvl_prdsitenbmain_tomcat7

2. Augmenter la taille du journal en 2 étapes

root@debianServer:~# tune2fs -O ^has_journal /dev/vgl_debianServer01_tech/lvl_prdsitenbmain_tomcat7

tune2fs 1.41.12 (17-May-2010)

root@debianServer:~# tune2fs -j /dev/vgl_debianServer01_tech/lvl_prdsitenbmain_tomcat7

tune2fs 1.41.12 (17-May-2010)
Creating journal inode: done
This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

3. Vérification de la taille du journal

root@debianServer:~# dumpe2fs /dev/vgl_debianServer01_tech/lvl_prdsitenbmain_tomcat7| grep ‘Journal size’

dumpe2fs 1.41.12 (17-May-2010)
Journal size: 32M

4.Faire un check du FS

root@debianServer:~# e2fsck -f /dev/vgl_debianServer01_tech/lvl_prdsitenbmain_tomcat7

e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/vgl_debianServer01_tech/lvl_prdsitenbmain_tomcat7: 76/16710144 files (5.3% non-contiguous), 2143209/67633153 blocks

5.Le resize2fs doit passer

root@debianServer:~# resize2fs /dev/vgl_debianServer01_tech/lvl_prdsitenbmain_tomcat7

resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/vgl_debianServer01_tech/lvl_prdsitenbmain_tomcat7 to 210227200 (1k) blocks.
The filesystem on /dev/vgl_debianServer01_tech/lvl_prdsitenbmain_tomcat7 is now 210227200 blocks long.

Aucun commentaire.

Ajoutez votre commentaire