Re: [Fedora-livecd-list] Why resize back ext3fs.img to bigger size.

2009-08-15 Thread Mads Kiilerich

Alexander Todorov wrote, On 08/15/2009 10:39 PM:

Hi,
in fs.py in ExtDiskMount.resparse() function we resize and truncate the image to
minimum possible size (i.e. ext3 becomes 100% full) and then resize it back to
the size specified in kickstart. In most cases this results in ext3fs.img which
when mounted has lots of free space on it.


Why is that ?
   


Perhaps it is because unused space might contain old data which probably 
compresses badly. By doing it this way the extended space will be 
initialized with zeroes which can be compressed to (almost) nothing, and 
the compressed image of the specified size thus doesn't take up more 
space than if it had the minimal size.


Why is that a problem?

/Mads

--
Fedora-livecd-list mailing list
Fedora-livecd-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-livecd-list


Re: [Fedora-livecd-list] Why resize back ext3fs.img to bigger size.

2009-08-15 Thread Jeremy Katz
On Sunday, August 16 2009, Mads Kiilerich said:
 Alexander Todorov wrote, On 08/15/2009 10:39 PM:
 Hi,
 in fs.py in ExtDiskMount.resparse() function we resize and truncate the 
 image to
 minimum possible size (i.e. ext3 becomes 100% full) and then resize it back 
 to
 the size specified in kickstart. In most cases this results in ext3fs.img 
 which
 when mounted has lots of free space on it.

 Why is that ?

 Perhaps it is because unused space might contain old data which probably  
 compresses badly. By doing it this way the extended space will be  
 initialized with zeroes which can be compressed to (almost) nothing, and  
 the compressed image of the specified size thus doesn't take up more  
 space than if it had the minimal size.

Correct.  And by having the free space, we are able to let you write
things to the filesystem when you're running the live image rather than
having every write operation return -ENOSPC.

We also keep around a snapshot of the minimal image so that we use the
minimal image as the basis to copy over after an install from the live
image (and then we resize that minimal image on the disk to the size of
the partition you created)

Jeremy

--
Fedora-livecd-list mailing list
Fedora-livecd-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-livecd-list