Bug 78401
Summary: | Files dissapear from floppy disk when dismounted | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Mike Jacobs <mike.jacobs> |
Component: | e2fsprogs | Assignee: | Thomas Woerner <twoerner> |
Status: | CLOSED NOTABUG | QA Contact: | Jay Turner <jturner> |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 8.0 | CC: | michael, mitr, sct, srevivo |
Target Milestone: | --- | Keywords: | MoveUpstream, Triaged |
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-10-07 13:59:22 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Mike Jacobs
2002-11-22 12:23:18 UTC
Confirming - I also see this behavior. $ gfloppy <format a floppy disk ext2> $ mount /mnt/floppy $ mkdir /mnt/floppy/foo $ touch /mnt/floppy/foo/bar $ umount /mnt/floppy $ mount /mnt/floppy $ cd /mnt/floppy/foo $ ls -laF total 0 Ironically - if you format the floppy as FAT - no such problem occurs. "bar" appears without a hitch. Do this by repeating the steps and selecting "FAT" instead of ext2. Here's another weirdism - need to figure out where to file this bug. Apparently, once you've done all the above, the floppy refuses to take an ext2 file system (or at least appears to): $ umount /mnt/floppy $ mke2fs /dev/fd0 mke2fs 1.27 (8-Mar-2002) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 184 inodes, 1440 blocks 72 blocks (5.00%) reserved for the super user First data block=1 1 block group 8192 blocks per group, 8192 fragments per group 184 inodes per group Writing inode tables: done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 33 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. $ mount /mnt/floppy/ $ mount | grep floppy /dev/fd0 on /mnt/floppy type vfat (rw,nosuid,nodev,user=myohe) Further analysis: $ umount /mnt/floppy # mount -t ext2 /dev/fd0 /mnt/floppy $ mount | grep floppy /dev/fd0 on /mnt/floppy type ext2 (rw) $ cd /mnt/floppy $ ls -laF total 17 drwxr-xr-x 3 myohe myohe 1024 Nov 22 10:52 ./ drwxr-xr-x 8 root root 4096 Nov 12 12:42 ../ drwx------ 2 root root 12288 Nov 22 10:52 lost+found/ $ md bar $ cd bar $ touch foo $ ls -laF total 2 drwxr-xr-x 2 myohe myohe 1024 Nov 22 10:56 ./ drwxr-xr-x 4 myohe myohe 1024 Nov 22 10:56 ../ -rw-r--r-- 1 myohe myohe 0 Nov 22 10:56 foo $ cd /mnt # umount /mnt/floppy $ mount /mnt/floppy $ mount | grep floppy /dev/fd0 on /mnt/floppy type vfat (rw,nosuid,nodev,user=myohe) $ ls -laF /mnt/floppy total 11 drwxr-xr-x 2 myohe myohe 7168 Dec 31 1969 ./ drwxr-xr-x 8 root root 4096 Nov 12 12:42 ../ $ touch /mnt/floppy/f $ ls -laF /mnt/floppy/f total 11 drwxr-xr-x 2 myohe myohe 7168 Nov 22 10:59 ./ drwxr-xr-x 8 root root 4096 Nov 12 12:42 ../ -rwxr-xr-x 1 myohe myohe 0 Nov 22 10:59 f* $ cd /mnt $ umount /mnt/floppy $ mount /mnt/floppy $ ls -laF floppy total 11 drwxr-xr-x 2 myohe myohe 7168 Dec 31 1969 ./ drwxr-xr-x 8 root root 4096 Nov 12 12:42 ../ -rwxr-xr-x 1 myohe myohe 0 Nov 22 10:59 f* $ umount /mnt/floppy # mount -t ext2 /dev/fd0 /mnt/floppy $ mount | grep floppy /dev/fd0 on /mnt/floppy type ext2 (rw) $ ls -laF /mnt/floppy/ total 18 drwxr-xr-x 4 myohe myohe 1024 Nov 22 10:56 ./ drwxr-xr-x 8 root root 4096 Nov 12 12:42 ../ drwxr-xr-x 2 myohe myohe 1024 Nov 22 10:56 bar/ drwx------ 2 root root 12288 Nov 22 10:52 lost+found/ Sounds like a SERIOUS bug... Also discovered that the problem does not arrise when using mke2fs to format the disk. Suggests that the issue is with gfloppy. What could gfloppy do that could possibly corrupt the disk so badly? I would have to say that the severity should by high since loss of data can occur. Severity changed to high due to possibility od loosing data. Ah, looks like a known problem when formatting disks of all sorts. Basically, the problem is that different filesystems put their critical metadata in different places. For ext2, the superblock starts at offset 1024 into the filesystem. For msdos (and hence vfat), it starts at offset 512. So if you have a disk formatted as vfat, and then reformat it as ext2, the old vfat superblock may still be there just before you get to the ext2 one. mke2fs has got this right since version 1.24, though, and will clear the remnants of the old dos filesystem in those versions (which explains why mke2fs doesn't show the problem, only gfloppy.) Reassigning to gfloppy. gfloppy just calls mke2fs directly. Am I missing an option to it? 8.0 shipped e2fsprogs 1.27, so it should be recent enough, right? Please verify this with a newer version of Red Hat Enterprise Linux or Fedora Core and reopen it against the new version if it still occurs. Closing as "not a bug" for now. |