Read only filesystem size issues.

Dean Brown [email protected]
Mon, 11 Dec 2000 09:33:30 -0800


Adi Linden wrote:
> 
> 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.

Yes this is a 'Read-only root fs with multiple ramdisks'. I believe I
said that in the portion you snipped.. ;^) If the devices that I am
trying to work on weren't so resource limited, I'd be tempted to use the
compressed ramdisk target.

> > 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

I read that documentation to mean that the -k option reported the size
of files as nnnK where K=1024. Try a du -b at a shell, this reports
sizes in bytes. What I see is all files being reported in multiples of
the cluster size of the fs.
 
> 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!

Not a problem. I appreciate the fact that PWL is available. I will be
feeding some more comments as time permits.
-- 
Dean Brown
---------------------------------------------------
See the list archives at http://adis.on.ca/archives/
See the PWL homepage at  http://peeweelinux.com
---------------------------------------------------