Ext3 reserved area:...
 
Notifications
Clear all

Ext3 reserved area: Where?

2 Posts
2 Users
0 Likes
244 Views
(@mizwei)
Posts: 1
New Member
Topic starter
 

Hello,
I hope this is the right place for my question as a learner in IT-sec.
For the Superblock analysis in ext3 partitions I found in the "File System Forensic" book that
Bytes 8–11 of the superblock contain "Number of blocks reserved to prevent file system from filling up"
But is it possible to locate these blocks? No further information is stored where I can find them.
Or is it just to calculate No more write access if there are only "number of blocks" free?

Thanks
Mi2

 
Posted : 08/11/2014 2:40 am
jaclaz
(@jaclaz)
Posts: 5133
Illustrious Member
 

I am not sure to understand your question ? .

The attention is (was) for allowing Superusers to edit files safely, compare the EXT2
http//wiki.osdev.org/Ext2#Base_Superblock_Fields
and EXT4 documentation
https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#The_Super_Block

In EXTx that would be field "s_r_blocks_count"
http//www.nongnu.org/ext2-doc/ext2.html#S-R-BLOCKS-COUNT

That area is a sort of "slack space" reserved for use "in case of need", and it's size may depend from a number of factors, see
http//www.commandlinefu.com/commands/view/8095/check-the-reserved-block-percentage-of-an-ext23-filesystem
http//linuxers.org/quick-tips/increase-available-disk-space-decreasing-reserved-blocks-extended-filesytems-ext234-using-tune2fs
for a "how to check"/"how to change" this size.

The location of these blocks is not "fixed" (and they are not "preallocated") the following set of bytes at 0xC represent "Total number of unallocated blocks" or "Free block count" (and is obviously dynamically updated when writes/deletions occur), if this is too low the f_bavail is set to 0, check
https://www.kernel.org/pub/linux/kernel/people/marcelo/linux-2.4/fs/ext3/super.c
which amounts - more or less - to "disk is full".
Is this what you were asking?

jaclaz

 
Posted : 09/11/2014 12:46 am
Share: