Bug 124904 - RAMdisk doesn't keep its files
RAMdisk doesn't keep its files
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
2
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Dave Jones
Brian Brock
:
: 124905 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-06-01 07:47 EDT by Wouter Liefting
Modified: 2015-01-04 17:06 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-16 00:44:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Wouter Liefting 2004-06-01 07:47:36 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1)
Gecko/20021003

Description of problem:
After creating and mounting a RAM disk you can store files on it.
After unmounting and then mounting the RAM disk again these files are
gone. This used to work in other distributions and kernel versions.

Note: the fact that this does not work in itself is not a problem
since you should not use RAM disks for this but use shmfs instead. But
I've got the feeling that this a more fundamental bug somewhere in the
filesystem code, instead of a RAM disk bug. Hence the report.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
mkdir /mnt/ramdisk

dd if=/dev/zero of=/dev/ram0 bs=1024k count=4
mke2fs /dev/ram0

(Note - the RAM disk is now 16 MB instead of 4 MB. Strange...)

mount /dev/ram0 /mnt/ramdisk
df                                 (confirms that the FS size is 16 MB)
cp /etc/passwd /mnt/ramdisk/passwd
cat /mnt/ramdisk/passwd            (no problem)
umount /mnt/ramdisk

mount /dev/ram0 /mnt/ramdisk       (no problem so the filesystem info
is still there!)
cat /mnt/ramdisk/passwd            (no such file or directory!)
umount /mnt/ramdisk
    

Actual Results:
1. Filesystem is 16 MB
2. /mnt/ramdisk/passwd: no such file or directory

Expected Results:
1. Filesystem size should have been the size of the ramdisk - 4 MB
2. File should be there and viewable

Additional info:

This has always worked on 2.4 kernels and earlier. Does not work under
the default FC2 kernel, and the problem has been confirmed under
vanilla 2.6.6 as well.
Comment 1 Wouter Liefting 2004-06-01 07:54:10 EDT
*** Bug 124905 has been marked as a duplicate of this bug. ***
Comment 2 giulioo 2004-06-01 16:39:21 EDT
> dd if=/dev/zero of=/dev/ram0 bs=1024k count=4
>1. Filesystem size should have been the size of the ramdisk - 4 MB

Note that you merely blanked 4MB, the size of the ramdisk is fixed
(boot time option and/or compile time I think); ie, try the same with
/dev/hda, would you expect that hda became 4MB?
So I think expectation no.1 is wrong and observed behavior is right
(pass block size to mke2fs to get a 4MB fs)

Comment 3 Dave Jones 2005-04-16 00:44:04 EDT
Fedora Core 2 has now reached end of life, and no further updates will be
provided by Red Hat.  The Fedora legacy project will be producing further kernel
updates for security problems only.

If this bug has not been fixed in the latest Fedora Core 2 update kernel, please
try to reproduce it under Fedora Core 3, and reopen if necessary, changing the
product version accordingly.

Thank you.

Note You need to log in before you can comment on or make changes to this bug.