Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Oct 2010 11:38:43 -0600
From:      Modulok <modulok@gmail.com>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Weird file system corruption or something else?
Message-ID:  <AANLkTi=1W=qwoBUU6-21w5fJ%2BDCcrTwQPb1=_%2BaWrGU=@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
List,

I have a disk image of a Windows machine I took via dd. It's shared on
the local network from FreeBSD via samba. The disk image is read-only.
I want to access files within the disk image from some Windows boxes,
so I do this:

    mdconfig -a -t vnode -f image.bin
    mount_ntfs -o ro /dev/md0s1 ./mnt

I then add the appropriate entry in my smb.conf file to share the
'mnt' directory. It worked... almost.

PROBLEM: I can see files from the windows machines, but I cannot
decend into any subdirectories or open any files unless they've first
been listed or opened on FreeBSD. The file permission bits are
correct, but the 'link' column in the 'ls -l' output on all files is
'0', until I open a file or list the contents of a directory on
FreeBSD. Thereafter, its normal i.e. '1' for regular files and so
forth, and I can access the files from Windows as usual.

I can issue a 'tree' command to automate the listing of directories on
FreeBSD, thus changing their link number... so that I can access them
from windows, but this all seems very strange. I don't want to have to
open every file, before I can open any files from windows.

The file system of the disk image wasn't corrupt when I took it, and
dd had zero errors when it was created. I have no problem accessing
files on the local FreeBSD. The disk image still matches the sha256
checksum from when I create it, so it hasn't since become corrupt.

What's going on?! How do I fix this? Is there some mount option I
missed? An mdconfig issue? A mount_ntfs bug?
-Modulok-



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=1W=qwoBUU6-21w5fJ%2BDCcrTwQPb1=_%2BaWrGU=>