Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Unexpected Behavior of Ext4


  • Please log in to reply
2 replies to this topic

#1 askey127

askey127

  • Security Colleague
  • 19 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:New hampshire, US
  • Local time:06:52 PM

Posted 24 November 2017 - 02:08 PM

There is an interesting issue I have encountered recently with some Linux installations.
Most Distros default to the Ext4 file system, but all may not appear as expected.
Some of the distros, for example Manjaro, Mageia and Maui, seem to be using the feature in Ext4 called Pre-Allocation.
Quite a few new pre-release versions of Linux I am seeing are using it also.
This seems to mean that the entire resident partition gets reserved somehow.

We wouldn't care about this, except....
Some of the older Partition tools can't recognize the partition as Ext4, and therefore can't perform any modifications like expand the partition.
The partition may show as some unknown format and will show as having no free space.
Minitool Partition Wizard up to version 9, and Clonezilla both have problems with this.
The newer Gparted version 0.29 seems to be OK and recognizes the Ext4 correctly, along with the actual occupied space.

A potential problem arises if you want to image a machine containing such a partition.
Some imaging programs will save the image OK, but will recognize the Linux partition as having no free space, and dutifully make the excessively large image of the entire partition.
This means a HUGE image file from a partition that is, say, 150GB but only has 7GB actually occupied by Linux.
Terabyte's Image for Linux ver 3.07 treats this issue properly, but Clonezilla does not. Don't know about Macrium Reflect.
 

Has anyone else seen this, and is the use of pre-allocation the reason?

I could be mistaken about my conclusions here, but there seems to be little on the Internet about it.

 


MWR Teacher/Admin | MS MVP Consumer Security 2007-2012

FixEdit | FixEdit User Guide | Log Comparator
 


BC AdBot (Login to Remove)

 


#2 mremski

mremski

  • Members
  • 491 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:NH
  • Local time:06:52 PM

Posted 24 November 2017 - 03:54 PM

I read the preallocation a bit differently. To me, it sounds like a new syscall was added that you can use to preallocate space for a file, guaranteeing contiguous blocks on the storage device. Same idea as if created a file, wrote 10GB of /dev/zero to it from userland. The partition size is the partition size, regardless of if it's full or not, you newfs it and you allocate the inodes and other metadata structures. I think you have something else going on; Clonezilla is more or less an image copy of the source if I'm remembering correctly, you say "image partition/device A" and it gives you exactly that, regardless of "is that disk block empty or not". That's the way disk imaging works.

FreeBSD since 3.3, only time I touch Windows is to fix my wife's computer


#3 rufwoof

rufwoof

  • Members
  • 94 posts
  • OFFLINE
  •  
  • Local time:11:52 PM

Posted 28 November 2017 - 11:32 AM

All ext3 here. ext3 can be mounted as though ext4, but can also be mounted by BSD as though ext2 i.e. more generic. Don't really have the needs for full ext4.


Debian and OpenBSD multiboot's





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users