* Dumpe2fs output with primary and backup superblock are different?
@ 2014-01-16 10:44 Subranshu Patel
2014-01-16 16:35 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Subranshu Patel @ 2014-01-16 10:44 UTC (permalink / raw)
To: linux-ext4
I am using dumpe2fs command using primary superblock (default) and
backup superblock. In both the cases the output is different.
I followed the following steps:
1. Create EXT4 filesystem of 4TiB
2. Run dumpe2fs (unmounted filesyetm) using default parameters #
dumpe2fs /dev/mapper/my_vg-dup >file1
3. Run dumpe2fs (unmounted filesystem) using backup superblock #
dumpe2fs -o superblock=32768 /dev/mapper/my_vg-dup >file2
4. The output of step-2 and step-3 are different
For example:
# diff -Nrup file1 file2
------------------8<-------------------------------
Group 0: (Blocks 0-32767) [ITABLE_ZEROED]
- Checksum 0xd85a, unused inodes 8181
+ Checksum 0x405c, unused inodes 0
Primary superblock at 0, Group descriptors at 1-64
Reserved GDT blocks at 65-1024
Block bitmap at 1025 (+1025), Inode bitmap at 1041 (+1041)
Inode table at 1057-1568 (+1057)
- 23513 free blocks, 8181 free inodes, 2 directories, 8181 unused inodes
+ 23513 free blocks, 8181 free inodes, 2 directories
Free blocks: 9255-32767
Free inodes: 12-8192
-Group 1: (Blocks 32768-65535) [INODE_UNINIT, ITABLE_ZEROED]
- Checksum 0xa883, unused inodes 8192
+Group 1: (Blocks 32768-65535) [ITABLE_ZEROED]
+ Checksum 0xb37f, unused inodes 0
Backup superblock at 32768, Group descriptors at 32769-32832
Reserved GDT blocks at 32833-33792
Block bitmap at 1026 (+4294935554), Inode bitmap at 1042 (+4294935570)
Inode table at 1569-2080 (+4294936097)
- 31743 free blocks, 8192 free inodes, 0 directories, 8192 unused inodes
+ 31743 free blocks, 8192 free inodes, 0 directories
Free blocks: 33793-65535
- Free inodes: 8193-16384
------------------8<-------------------------------
Here we can see that there are difference between the two outputs.
For example, in Group 0, with primary superblock it shows that unused
inodes is 8181. With backup superblock unused inodes is 0.
Why there is a difference in the output. Shouldn't it should same
output with both primary and secondary superblock?
(E2progfs verison is 1.41.12)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Dumpe2fs output with primary and backup superblock are different?
2014-01-16 10:44 Dumpe2fs output with primary and backup superblock are different? Subranshu Patel
@ 2014-01-16 16:35 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2014-01-16 16:35 UTC (permalink / raw)
To: Subranshu Patel; +Cc: linux-ext4
On Thu, Jan 16, 2014 at 04:14:14PM +0530, Subranshu Patel wrote:
> I am using dumpe2fs command using primary superblock (default) and
> backup superblock. In both the cases the output is different.
Yes, this is expected. It's too expensive to be constantly updating
all of the backup block group descriptors every time we allocate or
deallocate a block or inode. What is important to be kept in the
backup block group descriptors is where to find the inode table and
allocation bitmaps. E2fsck can reconstruct the information which is
not updated in the backup block group descriptors and backup
superblock, and that's what you are seeing which is different.
Regards,
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-16 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-16 10:44 Dumpe2fs output with primary and backup superblock are different? Subranshu Patel
2014-01-16 16:35 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).