Re: Redimensionnement avec gparted

Top Page

Reply to this message
Author: Frédéric
Date:  
To: guilde
New-Topics: Re: Redimensionnement avec gparted [Résolu]
Subject: Re: Redimensionnement avec gparted
[Je reposte ce message qui est resté coincé hier soir à cause du rapport de gparted en html]

On mercredi 27 mars 2013, Frédéric wrote:

> Bon, en fait, 5h, c'était juste pour le checkdisk ! Le déplacement, c'est
> 20h :o(
>
> Y'a plus qu'à être patient... et prier pour qu'il n'y ait pas de souci sur
> le réseau EDF !


Bon, bah, c'est fini. Pas eu de coupure EDF, mais visiblement, y'a un truc qui a foiré :o(

J'ai attaché les logs... D'après ce que je comprend, il a bien déplacé le système de fichiers,
puis la partition elle-même, mais le checkdisk final n'est pas content : il voit une
discordance entre la taille de la partition et du système de fichiers...

Une idée pour rattraper ça ? Je reboote, tout simplement, où faut-il intervenir avant ?

Merci d'avance.

UPDATE :

Entre-temps, j'ai contacté Edgar en privé, qui m'a donné le conseil suivant :

"Personnellement je serais tenté d'y aller à la
tronçonneuse : éditer le superbloc à la main avec dd et hexedit (pas vim
pour une fois...). Tu dois mettre à jour au moins s_inodes_count,
s_blocks_count, s_free_blocks_count et s_free_inodes_count [1]. Ensuite
recopier ça dans les backup superblocs, sauf s_block_group_nr qu'il faut
pas changer. Éventuellement corriger aussi bg_free_blocks_count et
bg_free_inodes_count du dernier group descriptor. Et passer e2fsck
derrière pour t'assurer que tout est bon. Mais pour ça il faut commencer
par faire un dumpe2fs, établir une carte détaillée de ce que tu dois
modifier à quel endroit, et s'armer de beaucoup de patiente..."

J'ai commencé à regarder les outils bas niveau, et ça va être marrant ;o)

Si quelqu'un a d'autres pistes, avant que je casse tout, je suis preneur.

Je me demandais par exemple comment forcer resize2fs a remettre la bonne taille. Là, il râle,
et veut à tout prix que e2fsck remettre le file systèm en ordre. Mais e2fsck n'y arrive pas
(j'ai tout essayé plein de trucs, comme lui donner un backup du superblock, mais il me demande
de corriger des milliards d'i-node, et répondre y à chacun, c'est pas de la tarte. Et
l'option -y n'aide pas, car la première réponse, c'est 'do you want to abort?' !!! Donc -y fait
sorti tout de suite...)

-- 
    Frédéric

GParted 0.5.0
Libparted 1.9.0
Move /dev/sda1 to the right and shrink it from 1.82 TiB to 1.81 TiB  22:48:28    ( ERROR )


   calibrate /dev/sda1  00:00:00    ( SUCCESS )


  path: /dev/sda1
start: 2048
end: 3907028991
size: 3907026944 (1.82 TiB)
   calculate new size and position of /dev/sda1  00:00:00    ( SUCCESS )


  requested start: 20964825
requested end: 3902831099
requested size: 3881866275 (1.81 TiB)
  new start: 20964825
new end: 3902831099
new size: 3881866275 (1.81 TiB)
   check file system on /dev/sda1 for errors and (if possible) fix them  00:01:13    ( SUCCESS )


e2fsck -f -y -v /dev/sda1

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

28041 inodes used (0.02%)
281 non-contiguous files (1.0%)
22 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 25933/296
273156868 blocks used (55.93%)
0 bad blocks
171 large files

23416 regular files
2810 directories
1 character device file
0 block device files
0 fifos
0 links
1805 symbolic links (1803 fast symbolic links)
0 sockets
--------
28032 files

e2fsck 1.41.9 (22-Aug-2009)

   shrink file system  00:00:49    ( SUCCESS )


resize2fs /dev/sda1 1940933137K

Resizing the filesystem on /dev/sda1 to 485233284 (4k) blocks.
The filesystem on /dev/sda1 is now 485233284 blocks long.


resize2fs 1.41.9 (22-Aug-2009)

   shrink partition from 1.82 TiB to 1.81 TiB  00:00:01    ( SUCCESS )


  old start: 2048
old end: 3907028991
old size: 3907026944 (1.82 TiB)
  new start: 2048
new end: 3881868322
new size: 3881866275 (1.81 TiB)
   check file system on /dev/sda1 for errors and (if possible) fix them  00:01:10    ( SUCCESS )


e2fsck -f -y -v /dev/sda1

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

28041 inodes used (0.02%)
281 non-contiguous files (1.0%)
22 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 25933/296
273107524 blocks used (56.28%)
0 bad blocks
171 large files

23416 regular files
2810 directories
1 character device file
0 block device files
0 fifos
0 links
1805 symbolic links (1803 fast symbolic links)
0 sockets
--------
28032 files

e2fsck 1.41.9 (22-Aug-2009)

   grow file system to fill the partition  00:00:45    ( SUCCESS )


resize2fs /dev/sda1

Resizing the filesystem on /dev/sda1 to 488378368 (4k) blocks.
The filesystem on /dev/sda1 is now 488378368 blocks long.


resize2fs 1.41.9 (22-Aug-2009)

   calculate new size and position of /dev/sda1  00:00:00    ( SUCCESS )


  requested start: 20964825
requested end: 3902831099
requested size: 3881866275 (1.81 TiB)
  new start: 20964825
new end: 3902831099
new size: 3881866275 (1.81 TiB)
   check file system on /dev/sda1 for errors and (if possible) fix them  00:01:12    ( SUCCESS )


e2fsck -f -y -v /dev/sda1

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

28041 inodes used (0.02%)
281 non-contiguous files (1.0%)
22 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 25933/296
273156868 blocks used (55.93%)
0 bad blocks
171 large files

23416 regular files
2810 directories
1 character device file
0 block device files
0 fifos
0 links
1805 symbolic links (1803 fast symbolic links)
0 sockets
--------
28032 files

e2fsck 1.41.9 (22-Aug-2009)

   move file system to the right  22:43:18    ( SUCCESS )


   perform read-only test  07:03:33    ( SUCCESS )


using internal algorithm
read 3881866275 sectors
finding optimal blocksize

   read 65536 sectors using a blocksize of 128 sectors  00:00:06    ( SUCCESS )


  65536 of 65536 read
  6.15387 seconds
   read 65536 sectors using a blocksize of 256 sectors  00:00:05    ( SUCCESS )


  65536 of 65536 read
  5.64148 seconds
   read 65536 sectors using a blocksize of 512 sectors  00:00:04    ( SUCCESS )


  65536 of 65536 read
  3.54398 seconds
   read 65536 sectors using a blocksize of 1024 sectors  00:00:02    ( SUCCESS )


  65536 of 65536 read
  1.72214 seconds
   read 65536 sectors using a blocksize of 2048 sectors  00:00:01    ( SUCCESS )


  65536 of 65536 read
  1.038 seconds
   read 65536 sectors using a blocksize of 4096 sectors  00:00:01    ( SUCCESS )


  65536 of 65536 read
  1.04764 seconds
   read 65536 sectors using a blocksize of 8192 sectors  00:00:01    ( SUCCESS )


  65536 of 65536 read
  0.973288 seconds
   read 65536 sectors using a blocksize of 16384 sectors  00:00:01    ( SUCCESS )


  65536 of 65536 read
  1.04785 seconds
   read 65536 sectors using a blocksize of 32768 sectors  00:00:01    ( SUCCESS )


  65536 of 65536 read
  0.758561 seconds
   read 65536 sectors using a blocksize of 65536 sectors  00:00:00    ( SUCCESS )


  65536 of 65536 read
  0.745437 seconds
   optimal blocksize is 65536 sectors (32.00 MiB)
   read 3881210915 sectors using a blocksize of 65536 sectors  07:03:11    ( SUCCESS )


  3881210915 of 3881210915 read
   3881866275 sectors read
   perform real move  15:39:45    ( SUCCESS )


using internal algorithm
copy 3881866275 sectors
finding optimal blocksize

   copy 65536 sectors using a blocksize of 64 sectors  00:00:09    ( SUCCESS )


  65536 of 65536 copied
  9.11824 seconds
   copy 65536 sectors using a blocksize of 128 sectors  00:00:08    ( SUCCESS )


  65536 of 65536 copied
  8.49246 seconds
   copy 65536 sectors using a blocksize of 256 sectors  00:00:08    ( SUCCESS )


  65536 of 65536 copied
  7.50322 seconds
   copy 65536 sectors using a blocksize of 512 sectors  00:00:05    ( SUCCESS )


  65536 of 65536 copied
  5.47546 seconds
   copy 65536 sectors using a blocksize of 1024 sectors  00:00:06    ( SUCCESS )


  65536 of 65536 copied
  5.54577 seconds
   copy 65536 sectors using a blocksize of 2048 sectors  00:00:03    ( SUCCESS )


  65536 of 65536 copied
  3.0899 seconds
   copy 65536 sectors using a blocksize of 4096 sectors  00:00:02    ( SUCCESS )


  65536 of 65536 copied
  2.22058 seconds
   copy 65536 sectors using a blocksize of 8192 sectors  00:00:02    ( SUCCESS )


  65536 of 65536 copied
  1.98575 seconds
   copy 65536 sectors using a blocksize of 16384 sectors  00:00:02    ( SUCCESS )


  65536 of 65536 copied
  1.72574 seconds
   copy 65536 sectors using a blocksize of 32768 sectors  00:00:01    ( SUCCESS )


  65536 of 65536 copied
  1.60271 seconds
   copy 65536 sectors using a blocksize of 65536 sectors  00:00:02    ( SUCCESS )


  65536 of 65536 copied
  1.49905 seconds
   optimal blocksize is 65536 sectors (32.00 MiB)    ( ERROR )
   copy 3881145379 sectors using a blocksize of 65536 sectors  15:38:57    ( SUCCESS )


  3881145379 of 3881145379 copied
   3881866275 sectors copied
   move partition to the right  00:00:00    ( SUCCESS )


  old start: 2048
old end: 3881868322
old size: 3881866275 (1.81 TiB)
  new start: 20964825
new end: 3902831099
new size: 3881866275 (1.81 TiB)
   check file system on /dev/sda1 for errors and (if possible) fix them  00:00:00    ( ERROR )


e2fsck -f -y -v /dev/sda1

The filesystem size (according to the superblock) is 488378368 blocks
The physical size of the device is 485233284 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort? yes


e2fsck 1.41.9 (22-Aug-2009)

   libparted messages    ( INFO )


The kernel was unable to re-read the partition table on /dev/sda (Device or resource busy). This means Linux won't know anything about the modifications you made until you reboot. You should reboot your computer before doing anything with /dev/sda.
========================================
Create Primary Partition #1 (ext4, 10.00 GiB) on /dev/sda
========================================
Create Primary Partition #2 (linux-swap, 2.00 GiB) on /dev/sda
========================================
Set Partition Label "data" on /dev/sda1
========================================