Read only filesystem size issues.

Adi Linden [email protected]
Sun, 10 Dec 2000 15:36:18 -0600 (CST)


Hi Dean,

> 1) When calculating the size of the / filesystem, the /home and /root
> directories are included. These directories are then separated out and
> placed in the second partition. The size of the /home and /root
> directories are not subtracted from the / filesystem. This overestimates
> the size of the / filesystem by the size of the /home and /root
> directories.
 
I will look into that. I would think this applies to the 'Read-only root
fs with multiple ramdisks' target? This one was created on request and
hasn't been tested exhaustively by myself. Almost all my systems are
router type applications at the moment. So I usually use the uncompressed
ramdisk for development and the compressed ramdisk for production
purposes.

> 2) Partition sizes are calculated by using du -s -k command. This bases
> file size on the cluster size of the development systems filesystem. In
> my case this cluster size is 4K, while the cluster size of the flash
> device is set to 1K. This also tends to overestimate the required size
> of the flash device.
> 
> The result of these issues is that if your build is approaching the size
> of your flash device, chances are very good that the pwl_target_load
> functions will fail to load the device. In my case, an extracted 13
> MByte filesystem fails to load on a 16 MByte compact flash because there
> supposedly wasn't enough room.

This is odd. Are there differences between different 'du' incarnations? I
uderstood the -k switch is supposed to calculate filesystem size as
if the filesystem was  1024 byte block size. From the man page:

       --block-size=SIZE
              use SIZE-byte blocks

       -k, --kilobytes
              like --block-size=1024

Hmmm, I thought I tested that assumption. I think I will replace the 'du'
commands with a variable (if it's possible) so the command line parameters
can be adjusted on a script wide basis.

Thank you for pointing all this out!

TTYL,
Adi 

---------------------------------------------------
See the list archives at http://adis.on.ca/archives/
See the PWL homepage at  http://peeweelinux.com
---------------------------------------------------