Bug 1883

Summary: No space left on device
Product: [Build System, Metadata & Runtime] BSPs Reporter: Manjunath <manjunath>
Component: bsps-runtimeAssignee: Saul Wold <sgw>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Medium CC: dvhart, manjunath, sgw, yp.kernel.watcher, yp.watcher
Version: 1.1-beta   
Target Milestone: 1.3   
Hardware: mpc8315e-rdb   
OS: ppc   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Manjunath 2012-01-07 00:45:28 UTC
We are running Linux 2.6.37 on MPC8315E based board. We have created a RAMDISK as rootfs and mounting the same during boot. When we try to create a new folder or file the device responds as "No space left on device". The details are as below:

CPU : MPC8315e
Linux Version: 2.6.37
Yocto ver: 1.1

RAMDISK size : Initially 65MB ( tried with 120MB also by changing IMAGE_ROOTFS_SIZE in bitbake.conf file under meta folder )

when df command is issued ( with RAMDISK as 120MB ) its mentioning 53% free, still not able to create the file.

We took the latest patch from yocto website ( Fix rootfs size calcuation ) and applied to runimagecmd() in image_type.bbclass under meta/classes folder. Previously we used LTIB ( for Linux 2.6.29 ) under which we did not had this issue
 Can anyone help how to go about this issue.

Thanks,
Manjunath
Comment 1 Darren Hart 2012-01-07 08:01:47 UTC
Please provide details about how you mount the ramdisk and the kernel parameters, for example:

    bzImage initrd=initrd.img root=/dev/ram0

What does "mount" report, just run it and provide the output. Please include the complete output of "df" as well.
Comment 2 Bruce Ashfield 2012-01-10 07:22:32 UTC
changing status to reflect the ask for details
Comment 3 Manjunath 2012-01-16 17:42:31 UTC
(In reply to comment #2)
> changing status to reflect the ask for details

Hi Darren,Bruce and Saul,
    This issue is resolved. The file system ext2 was created by genext2fs, which used to create sufficient number of inodes for rootfs by default. Now we added -i option to mention the required number of inodes and this has solved the issue as of now. 

Thanks for your effort.

Thanks & Regards,
Manjunath
Comment 4 Darren Hart 2012-01-18 11:31:55 UTC
We'd still like to automate this to determine the proper inode count. But with the workaround in place, we'll postpone to post 1.2.
Comment 5 Saul Wold 2012-01-18 13:42:46 UTC
I will pick this up and review the inode count set up.
Comment 6 Saul Wold 2012-01-24 13:03:20 UTC
Can you provide me with a df -i (inodes) on your first boot of the orignal ppc image that you had problems with.  I am not sure what you changed the -i to, but it's a bytes/inode value vs setting the # of inodes via the -N options.
Comment 7 Saul Wold 2012-01-27 08:58:14 UTC
Manjunath,

I found a problem with inode computation in genext2fs, but I am not sure it will address your issue, I need to get more details about your image creation, are you building any of the core-image-* targets when this occurs?  Do you have any other settings for changing the size of the image?  As I asked before, what does df -i show on first boot and did you really just change the -i parameter to genext2fs or did you use the -N, this information will greatly help me create a reproducer for this issue.

Thanks
Comment 8 Manjunath 2012-01-29 16:55:39 UTC
(In reply to comment #6)
> Can you provide me with a df -i (inodes) on your first boot of the orignal ppc
> image that you had problems with.  I am not sure what you changed the -i to,
> but it's a bytes/inode value vs setting the # of inodes via the -N options.

The command df -i does not work on my target, only df command works
Comment 9 Manjunath 2012-01-29 17:23:13 UTC
(In reply to comment #7)
> Manjunath,
> 
> I found a problem with inode computation in genext2fs, but I am not sure it
> will address your issue, I need to get more details about your image creation,
> are you building any of the core-image-* targets when this occurs?  Do you have
> any other settings for changing the size of the image?  As I asked before, what
> does df -i show on first boot and did you really just change the -i parameter
> to genext2fs or did you use the -N, this information will greatly help me
> create a reproducer for this issue.
> 
> Thanks

Yes we create rootfs image using core-image-*, it is compatible with u-boot. No we did not tried with -N option. We also modified rootfs size. When free command is issued the target used to mention between 60-70% usage of rootfs which means still we had space ( memory ) to add files, but if we add any file it used to display "No space left on device", but if i remove a file and add another file whose size is 2 times of the size of original file size ( file which was removed ) it was able to add ( replace file was 2 times bigger than the removed file ). This means the error was not due to space, it has to do with the number of files that can be placed on file system. With addition of -i option it worked.
Comment 10 Saul Wold 2012-01-30 12:04:50 UTC
Manjunath,

Thank you for this information, could you please run the following and provide me the output:

df -i

That output will tell us about the inode count, can you please
include that along with a regular "df -h" output.


That information will help me also, can you send me a diff of the changes that you did make.

Thanks
Comment 11 Darren Hart 2012-03-29 23:49:37 UTC
Manjunath, is this still an issue for you?
Comment 12 Saul Wold 2012-04-20 00:28:02 UTC
Since we have not heard any updates on this, closing as not a bug, if this issue still exists, please re-open.