From owner-freebsd-sparc64@FreeBSD.ORG Fri Sep 23 09:25:34 2011 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FD18106564A for ; Fri, 23 Sep 2011 09:25:34 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirj.bris.ac.uk (dirj.bris.ac.uk [137.222.10.78]) by mx1.freebsd.org (Postfix) with ESMTP id 5CCD88FC16 for ; Fri, 23 Sep 2011 09:25:34 +0000 (UTC) Received: from ncsc.bris.ac.uk ([137.222.10.41]) by dirj.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1R71iR-0004Mn-Q3 for freebsd-sparc64@freebsd.org; Fri, 23 Sep 2011 10:06:56 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncsc.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1R71iR-0006g7-KJ for freebsd-sparc64@freebsd.org; Fri, 23 Sep 2011 10:06:39 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5) with ESMTP id p8N96dcm054320 for ; Fri, 23 Sep 2011 10:06:39 +0100 (BST) (envelope-from mexas@bristol.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5/Submit) id p8N96dxo054319 for freebsd-sparc64@freebsd.org; Fri, 23 Sep 2011 10:06:39 +0100 (BST) (envelope-from mexas@bristol.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bristol.ac.uk using -f Date: Fri, 23 Sep 2011 10:06:39 +0100 From: Anton Shterenlikht To: freebsd-sparc64@freebsd.org Message-ID: <20110923090639.GA54307@mech-cluster241.men.bris.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: mount usb flash drive - files inconsistent with amd64 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Sep 2011 09:25:34 -0000 I've got a usb flash drive, on which I recorded some data on a Windows box. I'm trying to mount in on FreeBSD now to read the data. I get a different set of files, depending on whether I mount on amd64 or on sparc64. On amd64 r220040: The flash drive is identified as: da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 1967MB (4029440 512 byte sectors: 255H 63S/T 250C) I get da0s1 device: # ls -al /dev/da0* crw-r----- 1 root operator 0, 111 Sep 23 09:53 /dev/da0 crw-r----- 1 root operator 0, 112 Sep 23 09:53 /dev/da0s1 I can mount it as MSDOS FS, and get my files: # mount -t msdosfs /dev/da0s1 /mnt/ # df | grep mnt /dev/da0s1 4021560 369072 3652488 9% /mnt # ls -al /mnt/ total 2148 drwxr-xr-x 1 root wheel 4096 Dec 31 1979 . drwxr-xr-x 24 root wheel 512 Sep 23 00:16 .. -rwxr-xr-x 1 root wheel 394393 Apr 6 15:50 debbie.csv -rwxr-xr-x 1 root wheel 523776 Apr 6 15:49 debbie.xls drwxr-xr-x 1 root wheel 69632 Apr 7 16:52 x80-a01-190psi drwxr-xr-x 1 root wheel 102400 Apr 7 11:20 x80-t01-190bar # du -sh /mnt/ 160M /mnt/ I cannont mount /dev/da0 itself: # umount /mnt/ # mount /dev/da0 /mnt/ mount: /dev/da0 : Invalid argument # mount -t msdosfs /dev/da0 /mnt/ mount_msdosfs: /dev/da0: Invalid argument However, on sparc64 r216048, the situation is reversed. The drive is identified exactly as on amd64: da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 1.000MB/s transfers da0: 1967MB (4029440 512 byte sectors: 255H 63S/T 250C) But there is no da0s1 device: # ls -al /dev/da0* crw-r----- 1 root operator 0, 109 Sep 23 09:59 /dev/da0 Instead I can mount da0 directly, and it's UFS, not msdosfs: # mount /dev/da0 /mnt/ mech-anton240# df |grep mnt /dev/da0 1949518 6 1793552 0% /mnt And the files I get are different: # ls -al /mnt/ total 8 drwxr-xr-x 3 root wheel 512 Aug 19 12:59 . drwxr-xr-x 22 root wheel 512 Aug 1 15:35 .. drwxrwxr-x 2 root operator 512 Aug 19 12:58 .snap -rw-r--r-- 1 root wheel 17 Aug 19 12:59 zzz # du -sh /mnt/ 6.0K /mnt/ # What's going on? Is this expected? Or has this flash drive got corrupted somehow? Many thanks Anton -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423