Por favor, note que se eu redimensionar minha partição de volta ao tamanho original com parted, eu posso montar minha partição / dev / vda1 sem problemas.
Mas como posso obtê-lo para montá-lo depois que eu SHRUNK para 8GB? (havia apenas 1 GB de dados)
Depois de encolher com parted resizepart, quando tento fazer resize2fs / dev / vda1 ele me diz para executar e2fsck -f / dev / vda1 primeiro, mas isso sempre dá erro:
:~/e2fsprogs-1.44.1# ./e2fsck/e2fsck -f /dev/vda1
e2fsck 1.44.1 (24-Mar-2018)
The filesystem size (according to the superblock) is 5214459 blocks
The physical size of the device is 1924709 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? cancelled!
rootfs: ********** WARNING: Filesystem still has errors **********
Eu posso conseguir alguns superblocos de backup, mas se eu tentar usar qualquer um deles com o e2fsck -b backupsuperblockNumber / dev / vda1 eu recebo erros ... veja abaixo cole:
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
:~/e2fsprogs-1.44.1# ./e2fsck/e2fsck -b 32768 /dev/vda1
e2fsck 1.44.1 (24-Mar-2018)
rootfs: recovering journal
./e2fsck/e2fsck: unable to set superblock flags on rootfs
rootfs: ***** FILE SYSTEM WAS MODIFIED *****
rootfs: ********** WARNING: Filesystem still has errors **********
E aqui está o fdisk atual da partição (após encolher) fdisk -l / dev / vda1
Disk /dev/vda1: 7.4 GiB, 7883608576 bytes, 15397673 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
sfdisk -d /dev/vda > sfdiskDump
:~/e2fsprogs-1.44.1# cat sfdiskDump
# partition table of /dev/vda
unit: sectors
/dev/vda1 : start= 1, size= 41943039, Id=ee
/dev/vda2 : start= 0, size= 0, Id= 0
/dev/vda3 : start= 0, size= 0, Id= 0
/dev/vda4 : start= 0, size= 0, Id= 0
And gdisk:
Found valid GPT with protective MBR; using GPT.
Disk /dev/vda: 41943040 sectors, 20.0 GiB
Logical sector size: 512 bytes
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 41943006
Partitions will be aligned on 2048-sector boundaries
Total free space is 26320020 sectors (12.6 GiB)
Number Start (sector) End (sector) Size Code Name
1 227328 15625000 7.3 GiB 8300
14 2048 10239 4.0 MiB EF02
15 10240 227327 106.0 MiB EF00