Re: NTFS disks mounting trouble

From: Kevin Oberman <rkoberman_at_gmail.com>
Date: Mon, 29 Feb 2016 10:15:39 -0800
On Mon, Feb 29, 2016 at 8:36 AM, Roberto Fernández <roberfern_at_gmail.com>
wrote:

> That problem seems familiar to me.
>
> Are you sure that the partition is not locked by a Windows OS?
> Sometimes Windows locks the disk on shutdown.
>
> Best Regards,
> Roberto Fernandez Cueto
>
> 2016-02-29 16:57 GMT+01:00 Chris H <bsd-lists_at_bsdforge.com>:
>
> > On Mon, 29 Feb 2016 14:01:07 +0300 Олег Жаркой <zoleg73_at_bk.ru> wrote
> >
> > > Hi peoples!
> > > I install FreeBSD-Current and  sysutils/fusefs-ntfs , but when I try
> > mount
> > > any NTFS partition I receive error message: [root_at_zbsd /dev]# ntfs-3g
> > > /dev/ada0s2  /mnt Error reading bootsector: Invalid argument
> > > Failed to mount '/dev/ada0s2': Invalid argument
> > > The device '/dev/ada0s2' doesn't seem to have a valid NTFS.
> > > Maybe the wrong device is used? Or the whole disk instead of a
> > > partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
> > >
> > > [root_at_zbsd /dev]# file -s /dev/ada0s2
> > > /dev/ada0s2: DOS/MBR boot sector, code offset 0x52+2, OEM-ID "NTFS  ",
> > > sectors/cluster 8, Media descriptor 0xf8, sectors/track 63, heads 255,
> > hidden
> > > sectors 2929352704, dos < 4.0 BootSector (0x80), FAT (1Y bit by
> > descriptor);
> > > NTFS, sectors/track 63, sectors 921599, $MFT start cluster 38400,
> > $MFTMirror
> > > start cluster 2, bytes/RecordSegment 2^(-1*246), clusters/index block
> 1,
> > > serial number 0a0b64eefb64ec60e
> > >
> > > [root_at_zbsd /dev]# uname -a
> > > FreeBSD zbsd 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r296078: Fri Feb 26
> > > 18:55:46 IRKT 2016  root_at_zbsd:/usr/obj/usr/src/sys/zbsd  amd64
> > [root_at_zbsd
> > > /dev]# kldstat Id Refs Address  Size  Name
> > >  1  39 0xffffffff80200000 f50aa0  kernel
> > >  2  1 0xffffffff81152000 2d1670  zfs.ko
> > >  3  2 0xffffffff81424000 a398  opensolaris.ko
> > >  4  1 0xffffffff8142f000 b67ab0  nvidia.ko
> > >  5  2 0xffffffff81f97000 450c0  linux.ko
> > >  6  2 0xffffffff81fdd000 7ee8  linux_common.ko
> > >  7  1 0xffffffff81fe5000 14dd0  fuse.ko
> > >  8  1 0xffffffff82211000 23c7  ums.ko
> > >  9  1 0xffffffff82214000 1890  uhid.ko
> > > 10  1 0xffffffff82216000 1564  fdescfs.ko
> > > 11  1 0xffffffff82218000 23a  msdosfs_iconv.ko
> > > 12  1 0xffffffff82219000 322f  libiconv.ko
> > >
> > > What wrong?
> > Dunno. Maybe a bad boot sector?
> > Is it possible to mount it via:
> > mount -t MSDOS /dev/ada0s2 /mnt
> > ?
> > Just a hunch.
> >
> > --Chris
>

Has the file system previously mounted on FreeBSD? What does gpart list
ada0 show? I am assuming that fuse.ko is loaded.

I discovered that FreeBSD can corrupt FUSE file systems that are not
unmounted at shutdown. Best guess is that the fuse daemon is exiting before
the unmount is complete. ntfsfix(8) could not repair the damage. I had to
use Windows to repair them. This applied to at least NTFS and ExFAT
systems.

I have resolved the issue with a simple rc.d script that makes sure that
the FUSE file systems are safely unmounted before the daemon is terminated.
You can find the script in
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200513. No indication the
bug report has been looked at, but the script has prevented the corruption
issue for me.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkoberman_at_gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
Received on Mon Feb 29 2016 - 17:15:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:03 UTC