Other Mounting ext3 drive, missing files?

I am currently migrating data from a Linux-based Buffalo TeraStation NAS appliance fileserver over to a new FreeBSD server.

I have the data backed up to several external hard drives, most of them XFS, but one of them ext3, which I was going to use on the FreeBSD box to migrate the data from the drive to a ZFS dataset.

However, when I mount the ext3 drive in FreeBSD, many of the files are missing. The drive has about 10 folders at the root of the drive that are all there, but 2 folders have all of their contents and the other 8 are completely empty. Running du shows only the size of the files showing up (about 850G), but running df shows that 1.9T is taken up on the drive, which is correct.

If I connect the drive to my laptop and fire up an Ubuntu VM and mount it there, all of the files show up OK.

I am currently running fsck on this drive in the hopes that it will fix something, but that'll take several hours. Any idea why this might be?
 
Well, I ended up stopping the fsck and just doing rsync-over-SSH from the Ubuntu VM on my laptop to the FreeBSD box; it'll take about 12 hours to transfer the data but that's fine with me. So I got the real issue solved.

Still curious as to why the files weren't showing up though...
 
Replace the word "folders" with "directories" when talking with Unix (including *BSD) people, makes it easier to understand.

Could it be that you found a bug in the ext3 file system on FreeBSD? Quite possibly. Or it may be some bizarre form of pilot error. Let me give you a crazy example (unlikely to be correct): You are not running the copy as root, and some directories are not world-readable, so you don't see the stuff beneath them. Maybe there is slightly different handling of ACLs (although I don't even know whether the FreeBSD ext3 implementation even implements ACLs, never tried, nor do I wish to). The fact that du agrees with the directory listing makes sense: it works by recursively walking the directory tree, and it can't count that which it doesn't see.

In theory, with modern networks (gigabit or better), copying a single disk over the network should be roughly as fast as doing it locally: Most drives can run at 100-150 MByte/s, but most file systems aren't capable of delivering that full throughput when faced with a mix of file sizes; ethernet can run at 100 MByte/s, which is a pretty good match for a single disk.

If you look for "the usual suspects" in why those directories are unreadable and don't find anything, then it might be a fun idea to leave that offending ext3 disk unmodified, and ask some FreeBSD kernel developers to help debug the ext3 file system. Lots of work though.
 
However, when I mount the ext3 drive in FreeBSD, many of the files are missing.
Main question being: how did you mount the EXT3 filesystem? It's not natively supported and there are more than one ways to do this (to my knowledge) but all readonly of course.
 
Back
Top