Tente isto: mkfs.ext4 -N 104 -m0 -O ^has_journal,^resize_inode /dev/purgatory/test1
Eu acho que isso permite que você entenda "o que está acontecendo".
-N 104
(defina o número de iNodes que seu sistema de arquivos deve ter)
- todo iNode "custa" espaço utilizável (128 Byte)
-m 0
(sem blocos reservados)
-O ^has_journal,^resize_inode
(desative os recursos has_journal
e resize_inode
-
resize_inode
"costs" espaço livre (a maioria dos 1550 1K-Blocks / 2% que você vê no seudf
- 12K é usada para a pasta "lost + found") -
has_journal
"costs" utilizável space (4096 1K-Blocks no seu caso)
Recebemos 102348
de 102400
, outros 52 blocos inutilizáveis (se tivermos excluído a pasta "lost + found"). Portanto, nós mergulhamos em dumpe2fs
:
Group 0: (Blocks 1-8192) [ITABLE_ZEROED]
Checksum 0x5ee2, unused inodes 65533
Primary superblock at 1, Group descriptors at 2-2
Block bitmap at 3 (+2), Inode bitmap at 19 (+18)
Inode table at 35-35 (+34)
8150 free blocks, 0 free inodes, 1 directories, 65533 unused inodes
Free blocks: 17-18, 32-34, 48-8192
Free inodes:
Group 1: (Blocks 8193-16384) [BLOCK_UNINIT, ITABLE_ZEROED]
Checksum 0x56cf, unused inodes 5
Backup superblock at 8193, Group descriptors at 8194-8194
Block bitmap at 4 (+4294959107), Inode bitmap at 20 (+4294959123)
Inode table at 36-36 (+4294959139)
8190 free blocks, 6 free inodes, 0 directories, 5 unused inodes
Free blocks: 8193-16384
Free inodes: 11-16
Group 2: (Blocks 16385-24576) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
Checksum 0x51eb, unused inodes 8
Block bitmap at 5 (+4294950916), Inode bitmap at 21 (+4294950932)
Inode table at 37-37 (+4294950948)
8192 free blocks, 8 free inodes, 0 directories, 8 unused inodes
Free blocks: 16385-24576
Free inodes: 17-24
Group 3: (Blocks 24577-32768) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
Checksum 0x3de1, unused inodes 8
Backup superblock at 24577, Group descriptors at 24578-24578
Block bitmap at 6 (+4294942725), Inode bitmap at 22 (+4294942741)
Inode table at 38-38 (+4294942757)
8190 free blocks, 8 free inodes, 0 directories, 8 unused inodes
Free blocks: 24577-32768
Free inodes: 25-32
Group 4: (Blocks 32769-40960) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
Checksum 0x79b9, unused inodes 8
Block bitmap at 7 (+4294934534), Inode bitmap at 23 (+4294934550)
Inode table at 39-39 (+4294934566)
8192 free blocks, 8 free inodes, 0 directories, 8 unused inodes
Free blocks: 32769-40960
Free inodes: 33-40
Group 5: (Blocks 40961-49152) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
Checksum 0x0059, unused inodes 8
Backup superblock at 40961, Group descriptors at 40962-40962
Block bitmap at 8 (+4294926343), Inode bitmap at 24 (+4294926359)
Inode table at 40-40 (+4294926375)
8190 free blocks, 8 free inodes, 0 directories, 8 unused inodes
Free blocks: 40961-49152
Free inodes: 41-48
Group 6: (Blocks 49153-57344) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
Checksum 0x3000, unused inodes 8
Block bitmap at 9 (+4294918152), Inode bitmap at 25 (+4294918168)
Inode table at 41-41 (+4294918184)
8192 free blocks, 8 free inodes, 0 directories, 8 unused inodes
Free blocks: 49153-57344
Free inodes: 49-56
Group 7: (Blocks 57345-65536) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
Checksum 0x5c0a, unused inodes 8
Backup superblock at 57345, Group descriptors at 57346-57346
Block bitmap at 10 (+4294909961), Inode bitmap at 26 (+4294909977)
Inode table at 42-42 (+4294909993)
8190 free blocks, 8 free inodes, 0 directories, 8 unused inodes
Free blocks: 57345-65536
Free inodes: 57-64
Group 8: (Blocks 65537-73728) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
Checksum 0xf050, unused inodes 8
Block bitmap at 11 (+4294901770), Inode bitmap at 27 (+4294901786)
Inode table at 43-43 (+4294901802)
8192 free blocks, 8 free inodes, 0 directories, 8 unused inodes
Free blocks: 65537-73728
Free inodes: 65-72
Group 9: (Blocks 73729-81920) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
Checksum 0x50fd, unused inodes 8
Backup superblock at 73729, Group descriptors at 73730-73730
Block bitmap at 12 (+4294893579), Inode bitmap at 28 (+4294893595)
Inode table at 44-44 (+4294893611)
8190 free blocks, 8 free inodes, 0 directories, 8 unused inodes
Free blocks: 73729-81920
Free inodes: 73-80
Group 10: (Blocks 81921-90112) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
Checksum 0x60a4, unused inodes 8
Block bitmap at 13 (+4294885388), Inode bitmap at 29 (+4294885404)
Inode table at 45-45 (+4294885420)
8192 free blocks, 8 free inodes, 0 directories, 8 unused inodes
Free blocks: 81921-90112
Free inodes: 81-88
Group 11: (Blocks 90113-98304) [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
Checksum 0x28de, unused inodes 8
Block bitmap at 14 (+4294877197), Inode bitmap at 30 (+4294877213)
Inode table at 46-46 (+4294877229)
8192 free blocks, 8 free inodes, 0 directories, 8 unused inodes
Free blocks: 90113-98304
Free inodes: 89-96
Group 12: (Blocks 98305-102399) [INODE_UNINIT, ITABLE_ZEROED]
Checksum 0x9223, unused inodes 8
Block bitmap at 15 (+4294869006), Inode bitmap at 31 (+4294869022)
Inode table at 47-47 (+4294869038)
4095 free blocks, 8 free inodes, 0 directories, 8 unused inodes
Free blocks: 98305-102399
Free inodes: 97-104
e conte os blocos usados (para o superbloco Backup, descritores de grupo, bitmap de blocos, bitmap Inode e tabela Inode) ou nós grep
e count:
LANG=C dumpe2fs /dev/mapper/vg_vms-test1 | grep ' at ' | grep -v ',' | wc -l
que nos dá a contagem de linhas que têm um único bloco (no nosso exemplo) e
LANG=C dumpe2fs /dev/mapper/vg_vms-test1 | grep ' at ' | grep ',' | wc -l
que nos dá a contagem de linhas que têm dois blocos (no nosso exemplo).
Portanto, temos (no nosso exemplo) 13
linhas com um bloco cada e 19
linhas com dois blocos cada.
13+19*2
que nos dá 51
blocos que estão em uso pelo próprio ext4. Finalmente, há apenas um bloco à esquerda. O bloco 0, que são os bytes 1024
omitidos no início para coisas como o setor de inicialização.