I always thought fsck operated on the filesystem level only, but recently I came across the following procedure for growing an ext3 partition: https://www.howtoforge.com/linux_resizing_ext3_partitions_p2. in a nutshell, you delete the partition from the partition table, add it back with the larger size, run fsck on the partition, then run resize2fs on it. My question is: what exactly does fsck do in this situation? Obviously there is a lot of unformatted space in the newly sized partition, how does fsck handle that or does it ignore it?
Asked
Active
Viewed 42 times
1 Answers
0
The fsck run in that procedure just makes sure the file system is in a consistent state before resizing it, as otherwise the resizing process might amplify any inconsistencies present.

Tilman Schmidt
- 4,101
- 12
- 27
-
so it must not know about the unformatted space on the partition. It must look only at the superblock and follows the links given there, examining only the inodes and data blocks that reside on the first part of the partition. – Michael Martinez Sep 11 '15 at 16:49
-
That's it exactly. – Tilman Schmidt Sep 11 '15 at 21:11