From owner-freebsd-current@freebsd.org Mon Feb 29 18:15:40 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF041AB8715 for ; Mon, 29 Feb 2016 18:15:40 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7742715E0 for ; Mon, 29 Feb 2016 18:15:40 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: by mail-ig0-x229.google.com with SMTP id hb3so688423igb.0 for ; Mon, 29 Feb 2016 10:15:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=og6E4pMKTuzf/EyHy/NB9TsvY8KmM8V8l2iT0iGN+/E=; b=ZY2HL7+aJ7tdO8lLDSx+hb0RqfUGsOjXE/bC1eI/dqgvX+pRF8ekqIywK1x5Hvm+1M FSJC2zJhCv/jsvwemhCG0JmSar5I3QVCV2/BF3nYkkt7hLbqqrxEYjuBbu2YdE6NKHVy K2Jk5rY1UHRJlm/eudh0iIGEVl58QodZkDdx7dTytjOY5GsrJ3MbsoKzi+fb8P1ZOqGL gC41W2OAoTeopgKvfE3UTDBYDvYRtlIyKpdWsnb9Ek09bZ8MzcXFNtTMKY7sQqhwbcNd MywcQg2VbFzIgnxnNF6yI5E9SyFs6XWC3wnbDiXosR/3F/tBEFajrhqpsYNcSqfGTbdx gZrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=og6E4pMKTuzf/EyHy/NB9TsvY8KmM8V8l2iT0iGN+/E=; b=NwKvW2B46jPCxueco+hfH1u15WNgF5CSzo5bkVHnW236IxizUyvqmnJGZVpk/TdQyq +EbJy09goIhw+npEIxeL6KUO0EZs4Mt+jBvaeq444aNSMKPN+NuHDudAurfoni3uDj49 iYBzcLLJtVbylEIAW7kejpeESlWdAANDeXoqxxYmzsmL9n9hJhS1axWQg62RhN0jkD4s vRTT9wS4u+xpQS3kiZeshD//yAwv2Fx1SpHk1ZLmAvsMnJTJskV85v7qzH2jb9x6ePVf RNZVKhnBCdNwMMEEeSw+WiFz7gVQN7quP1uDU+XqyNh/N4FE8WYPAjcs7/1r/Rn81tL9 d+5w== X-Gm-Message-State: AD7BkJJPaH4aJ4sKMb0zmSb4TyRP2ajpjOWuPZQV8BvXFmxN/FmqqZFhRLKiWhHkog5kkuZV6DVNK1awObJYxA== MIME-Version: 1.0 X-Received: by 10.50.142.37 with SMTP id rt5mr10613105igb.15.1456769739788; Mon, 29 Feb 2016 10:15:39 -0800 (PST) Sender: kob6558@gmail.com Received: by 10.79.35.31 with HTTP; Mon, 29 Feb 2016 10:15:39 -0800 (PST) In-Reply-To: References: <1456743667.143653098@f423.i.mail.ru> <076d9dab6c4b5c1ae2ad80804958c753@ultimatedns.net> Date: Mon, 29 Feb 2016 10:15:39 -0800 X-Google-Sender-Auth: MZlGUxoQ8xhBzMFOvRvvohNrmXs Message-ID: Subject: Re: NTFS disks mounting trouble From: Kevin Oberman To: =?UTF-8?Q?Roberto_Fern=C3=A1ndez?= Cc: Chris H , FreeBSD Current Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Feb 2016 18:15:40 -0000 On Mon, Feb 29, 2016 at 8:36 AM, Roberto Fern=C3=A1ndez 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 : > > > On Mon, 29 Feb 2016 14:01:07 +0300 =D0=9E=D0=BB=D0=B5=D0=B3 =D0=96=D0= =B0=D1=80=D0=BA=D0=BE=D0=B9 wrote > > > > > Hi peoples! > > > I install FreeBSD-Current and sysutils/fusefs-ntfs , but when I try > > mount > > > any NTFS partition I receive error message: [root@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@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@zbsd /dev]# uname -a > > > FreeBSD zbsd 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r296078: Fri Feb 26 > > > 18:55:46 IRKT 2016 root@zbsd:/usr/obj/usr/src/sys/zbsd amd64 > > [root@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=3D200513. No indication t= he 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@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683