Bug 155199 - [ext2fs] ext3fs mounted as ext2fs gives I/O errors
Summary: [ext2fs] ext3fs mounted as ext2fs gives I/O errors
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-02 16:20 UTC by Roger Hammerstein
Modified: 2016-02-09 03:43 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roger Hammerstein 2011-03-02 16:20:11 UTC
Made an ext3fs instead of ext2fs on an Ubuntu live cd and rsynced
some data to it.   Mounted in FreeBSD and some files are unreadable.
Symlinks also do not work.  Newly-created symlinks while booted into
Freebsd do work.  I was expecting the ext3 to mount as ext2 and still work.


The system logs messages like this on the symlinks or problem files:

Feb 10 13:08:23 butter kernel: g_vfs_done():ada2s1[READ(offset=-963020587008, length=4096)]error = 5

Booting back into Ubuntu and the entire disk is readable.  It fscks clean
in Ubuntu and Freebsd.  


On a second disk, I redid the rsync copy to a newly-created ext2fs, instead
of ext3, and that one works just fine.




latest e2fsprogs:
e2fsprogs-1.41.14   Utilities & library to manipulate ext2/3/4 filesystems



2tb Seagate ST32000542AS

ada2 at siisch2 bus 0 scbus2 target 0 lun 0
ada2: <ST32000542AS CC34> ATA-8 SATA 2.x device
ada2: Serial Number XXXXXXXXX
ada2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada2: Command Queueing enabled
ada2: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C)


fdisk ada2
******* Working on device /dev/ada2 *******
parameters extracted from in-core disklabel are:
cylinders=3876021 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=3876021 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 131 (0x83),(Linux native)
    start 63, size 2929709727 (1430522 Meg), flag 0
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
sysid 131 (0x83),(Linux native)
    start 2929709790, size 977314275 (477204 Meg), flag 0
        beg: cyl 1023/ head 254/ sector 63;
        end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>


The disk was fdisked in Ubuntu.


mount:
/dev/ada2s1 on /a (ext2fs, local)


dumpe2fs /dev/ada2s1
dumpe2fs 1.41.14 (22-Dec-2010)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          a6ac694e-33c1-4755-87c8-8d8ab7dacf27
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype sparse_super large_file
Filesystem flags:         signed_directory_hash
Default mount options:    (none)
Filesystem state:         not clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              91553792
Block count:              366213715
Reserved block count:     18310685
Free blocks:              146706194
Free inodes:              91353824
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      936
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Filesystem created:       Mon Feb  7 13:51:21 2011
Last mount time:          Tue Feb 22 02:44:43 2011
Last write time:          Wed Mar  2 10:57:46 2011
Mount count:              0
Maximum mount count:      22
Last checked:             Mon Feb 28 16:05:17 2011
Check interval:           15552000 (6 months)
Next check after:         Sat Aug 27 17:05:17 2011
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group wheel)
First inode:              11
Inode size:               256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      db8ff0df-f7bb-4940-9a0f-8e9c8d50f450
Journal backup:           inode blocks
Journal features:         journal_incompat_revoke
Journal size:             128M
Journal length:           32768
Journal sequence:         0x00004d18
Journal start:            0

How-To-Repeat: Make an ext3fs from an Ubuntu live cd and try to mount it under FreeBSD.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-03-03 00:31:24 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer(s).
Comment 2 Pedro F. Giffuni 2011-03-03 04:04:40 UTC
Hello;

Some notes.. from your original posting it seemed like
the symlink issue was due to our lack of support for
fast symlinks. Those may be interesting to implement.
(I won't volunteer though).

The unreadable files are something new. Perhaps they
have extended attributes or ACLs? We don't support
those and they would be difficult to support because
of implementation differences with our native EAs.

cheers,

Pedro.
Comment 3 Roger Hammerstein 2011-03-03 04:43:18 UTC
Thank you for the followup.
> Some notes.. from your original posting it seemed like
> the symlink issue was due to our lack of support for
> fast symlinks. 


At the time, I thought it the filesystem was ext2 and was not expecting
those errors.
I was doing directory listings across the filesystem, and the
log was showing the g_vfs_done errors.
I tracked the log entries to traversals of the symlinks, and then posted.

I hadn't done much individual file accesses at the time.

> The unreadable files are something new. Perhaps they
> have extended attributes or ACLs? We don't support
> those and they would be difficult to support because
> of implementation differences with our native EAs.


Nothing special on the files (that I know of).  They don't have any acls or 
extended attributes.   Errors occur on mnay different
types of files, READMEs, jpgs, mp3s, txts, gifs.
Sometimes in a single directory, the first couple of files
will read just fine, and the rest will give errors.

 		 	   		  =
Comment 4 Pedro F. Giffuni freebsd_committer 2016-02-09 03:43:49 UTC
This report is practically 5 years old and a lot has happened since then.
For one thing, the ext2fs implementation was rewritten for FreeBSD 9 and
has been improving.

I haven't seen similar issues nowadays and I doubt the issue can be reproduced.