Figuring out Block Sizes

Michael D. Setzer II mikes at kuentos.guam.net
Sun Apr 3 09:30:44 UTC 2005


On 2 Apr 2005 at 23:24, R L wrote:

Date sent:      	Sat, 2 Apr 2005 23:24:41 -0500
From:           	R L <fedora26 at gmail.com>
To:             	fedora-list at redhat.com
Subject:        	Figuring out Block Sizes
Send reply to:  	R L <fedora26 at gmail.com>,
       	For users of Fedora Core releases <fedora-list at redhat.com>
	<mailto:fedora-list-request at redhat.com?subject=unsubscribe>
	<mailto:fedora-list-request at redhat.com?subject=subscribe>

> For g4u, there is a way to fill unused data blocks with zero-bytes in
> order to make the backup smaller.  However, you got to give a bs =
> amount (block size).  This may be a simple answer, but if say I have
> 25 GBs of unused data to write zero-blocks to, how do I figure out
> what block size to use?  What's the coversion?

The blocksize doesn't matter for getting the job done, but using a 
bigger bloock size will generally make the process take less time. 
Here is a script that I use that is basically from the G4U site to clear 
the free space on linux or other unix system, I found using 20M is 
faster for fedora than the default. I creates a dummy file 0bits, and 
uses all the free space to write zeros, and then it deletes the file. 
This leaves all the free space as being nothing but zeros. It writes 
blocks of 20M at a time, but eventually fills up al the drive. 

dd if=/dev/zero of=/0bits bs=20M
rm /0bits

I've been playing with a modified version that uses dialog, and 
shows a graph as it does the zeroing. The above script just runs and 
finishes. 

As a side note, with G4L I added the option to use lzop compress, 
and in my case, it compresses the drive in half the time of gzip, but 
does make the image 15% larger. 

I also have a little C program I've written to clear out the unused 
space on Windows as well, since my classroom machines have 
98/XP/FC3.


> 
> -- 
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
> 


+----------------------------------------------------------+
  Michael D. Setzer II -  Computer Science Instructor      
  Guam Community College  Computer Center                  
  mailto:mikes at kuentos.guam.net                            
  mailto:msetzerii at gmail.com
  http://www.guam.net/home/mikes
  Guam - Where America's Day Begins                        
+----------------------------------------------------------+

http://setiathome.berkeley.edu
Number of Seti Units Returned:  16,039
Processing time:  30 years, 186 days,  1 hours,  9 minutes
(Total Hours: 267,265)





More information about the fedora-list mailing list