parted를 사용하여 파티션 크기를 다시 원래 크기로 조정하면 /dev/vda1 파티션을 문제 없이 마운트할 수 있습니다.
하지만 8GB로 축소한 후에 어떻게 마운트할 수 있나요? (위의 데이터는 1GB만 해당)
parted resizepart를 사용하여 축소한 후 resize2fs /dev/vda1을 수행하려고 하면 e2fsck -f /dev/vda1을 먼저 실행하라는 메시지가 표시되지만 항상 오류가 발생합니다.
:~/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 **********
일부 백업 슈퍼블록을 얻을 수 있지만 e2fsck -b backupsuperblockNumber /dev/vda1 중 하나를 사용하려고 하면 오류가 발생합니다... 아래 붙여넣기를 참조하세요.
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 **********
이것은 파티션의 현재 fdisk입니다(축소 후) 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