From owner-freebsd-fs@FreeBSD.ORG Mon Sep 13 13:01:57 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 086BF16A4CE for ; Mon, 13 Sep 2004 13:01:57 +0000 (GMT) Received: from mx.dada.it (mail2.dada.it [195.110.100.2]) by mx1.FreeBSD.org (Postfix) with SMTP id 5BC5643D49 for ; Mon, 13 Sep 2004 13:01:53 +0000 (GMT) (envelope-from riccardo@torrini.org) Received: (qmail 2994 invoked from network); 13 Sep 2004 13:01:49 -0000 Received: from unknown (HELO silos.torrini.home) (195.110.114.101) by mail.dada.it with SMTP; 13 Sep 2004 13:01:49 -0000 Received: from trudy.torrini.home (trudy.torrini.home [192.168.22.3]) by silos.torrini.home (Postfix) with ESMTP id 5A8A0A980 for ; Mon, 13 Sep 2004 15:01:50 +0200 (CEST) Received: by trudy.torrini.home (Postfix, from userid 1001) id 4BF101F6A; Mon, 13 Sep 2004 15:01:50 +0200 (CEST) Date: Mon, 13 Sep 2004 15:01:50 +0200 From: Riccardo Torrini To: freebsd-fs@FreeBSD.org Message-ID: <20040913130150.GG26372@trudy.torrini.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: mount_smbfs timestamp problem X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2004 13:01:57 -0000 Not sure about right ML (tryed with questions@ past week without reply). This problem happens either on 4.10 than 5.x (tested on 5.3beta2). Feel free to forward to another ML if needed. And please Cc: me. -----[ Forwarded message from questions@ ]----- Background: - I need to syncronize two dir hosted on win machines based on data contained into an Oracle DB (direction of copy may change based on owner of file as specified into the DB). I made an sh script that generate a big Makefile with right direction of cp -p but it fail copying a lot of identical file (identical means same md5 and with date of past, already copied previous night (and previous and...). (a lot of fuzzy word, problem is timestamping a remote smb file). Environment: - a freebsd machine (I tested on 4.9-STABLE and 4.10-STABLE) (a friend of mine tested on 5.3beta2 both versus WXP (NTFS) and W98 (FAT32), same results). - at least a real win machine with a NTFS exported share (my real case has one w2k-server and one wnt4-server). How to reproduce: - create a mount point, mount_smb the win share, touch a file // on the mount point (or at any level deep): // (you can also change example time but please use even/odd seconds) // # foreach s ( `jot -w%02d 10` ) foreach? touch -t 200401020304.${s} sample${s} foreach? end # ls -lnT sample* -rwxr-xr-x 1 0 0 0 Jan 2 03:04:00 2004 sample01 -rwxr-xr-x 1 0 0 0 Jan 2 03:04:02 2004 sample02 -rwxr-xr-x 1 0 0 0 Jan 2 03:04:02 2004 sample03 -rwxr-xr-x 1 0 0 0 Jan 2 03:04:04 2004 sample04 -rwxr-xr-x 1 0 0 0 Jan 2 03:04:04 2004 sample05 -rwxr-xr-x 1 0 0 0 Jan 2 03:04:06 2004 sample06 -rwxr-xr-x 1 0 0 0 Jan 2 03:04:06 2004 sample07 -rwxr-xr-x 1 0 0 0 Jan 2 03:04:08 2004 sample08 -rwxr-xr-x 1 0 0 0 Jan 2 03:04:08 2004 sample09 -rwxr-xr-x 1 0 0 0 Jan 2 03:04:10 2004 sample10 Any date&time will be rounded up to previous even second :-( If you create a file from the win-side (with touch or notepad or with your favourite tool) you can specify odd seconds, this means that is not a NTFS struct limitations (maybe :-). Who round my time? I need this for an exotic job: syncronize two win machine using data from an Oracle DB. My approach was using a Makefile but every night it copies hundreds of already copied files and it use an expensive WAN link. Yes, I can switch to more robust check, md5 signatures, extraction of time and manual check with rounded values, but any other approach leave this problem... -- TIA, Riccardo. From owner-freebsd-fs@FreeBSD.ORG Tue Sep 14 02:54:23 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0132416A4CE for ; Tue, 14 Sep 2004 02:54:23 +0000 (GMT) Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id A950843D31 for ; Tue, 14 Sep 2004 02:54:22 +0000 (GMT) (envelope-from guy@alum.mit.edu) Received: from mailgate1.apple.com (a17-128-100-225.apple.com [17.128.100.225]) by mail-out4.apple.com (8.12.11/8.12.11) with ESMTP id i8E2uxZP025040 for ; Mon, 13 Sep 2004 19:56:59 -0700 (PDT) Received: from relay2.apple.com (relay2.apple.com) by mailgate1.apple.com ; Mon, 13 Sep 2004 19:54:22 -0700 Received: from [17.202.40.208] (gharris.apple.com [17.202.40.208]) by relay2.apple.com (8.12.11/8.12.11) with ESMTP id i8E2sKRU023550; Mon, 13 Sep 2004 19:54:20 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <5FAFDA64-05F9-11D9-B631-000A958097E4@alum.mit.edu> Content-Transfer-Encoding: 7bit From: Guy Harris Date: Mon, 13 Sep 2004 19:54:19 -0700 To: Riccardo Torrini X-Mailer: Apple Mail (2.619) cc: freebsd-fs@freebsd.org Subject: Re: mount_smbfs timestamp problem X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2004 02:54:23 -0000 > Any date&time will be rounded up to previous even second :-( It's probably using SMB_INFO_STANDARD rather than SMB_SET_FILE_BASIC_INFO as the information level in a TRANS2_SET_FILE_INFORMATION or TRANS2_SET_PATH_INFORMATION call. SMB_INFO_STANDARD uses DOS dates and times, which have 2-second resolution; SMB_SET_FILE_BASIC_INFO uses NT FILETIME values, which have 100-nanosecond resolution. The CIFS 1.0 spec only mentions SMB_SET_FILE_BASIC_INFO for TRANS2_SET_FILE_INFORMATION, not for TRANS2_SET_PATH_INFORMATION, but I would not be surprised if that weren't just an accidental omission (it's silly to have one work but not the other in, say, NT, although maybe the W95/W98/WMe server and file system code path is bizarre enough that only one of them works). If CAP_NT_SMBS is set in the NEGOTIATE reply, the SMB client should probably use SMB_SET_FILE_BASIC_INFO. From owner-freebsd-fs@FreeBSD.ORG Fri Sep 17 20:22:54 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97C4C16A4CE for ; Fri, 17 Sep 2004 20:22:54 +0000 (GMT) Received: from web41207.mail.yahoo.com (web41207.mail.yahoo.com [66.218.93.40]) by mx1.FreeBSD.org (Postfix) with SMTP id 7018C43D2D for ; Fri, 17 Sep 2004 20:22:54 +0000 (GMT) (envelope-from arne_woerner@yahoo.com) Message-ID: <20040917202254.5843.qmail@web41207.mail.yahoo.com> Received: from [83.129.247.236] by web41207.mail.yahoo.com via HTTP; Fri, 17 Sep 2004 13:22:54 PDT Date: Fri, 17 Sep 2004 13:22:54 -0700 (PDT) From: Arne "Wörner" To: freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: soft updates / short or lost files after system crash X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2004 20:22:54 -0000 Hi! I experienced a. short and b. disapeared files on two of my ufs2 fs with soft updates enabled (in an intentional system crash caused by pressing the reset button). Test cases:{ 1. I did a > dd if=/dev/zero of=a bs=1 [where a was in the fs on ad1s1e] and when the file a was about 1MB, I pressed the reset button (I wanted to do a sync shortly before pressing the button, but I am not sure now, if I did). After the next reboot background fsck logged some messages (see appendix A). The file a disapeared. 2. I did a > dd if=/dev/zero of=/root/a bs=1 & dd if=/dev/zero of=/opt/a & sync ; sleep 20 ; sync [where /root/a is in a non-soft-updates fs; and /opt/a is in a soft-updates fs] and pressed the reset button shortly after the second sync, when the files where about 2MB. After the next reboot ackground fsck logged some messages (see appendix B). The file /root/a was about 2MB and /opt/a just 2K. } I was quite sure, that a sync would bring every unclean block to disc before it terminates or abount at its termination time. Did I do something wrong (maybe mis-configuration)? Is there a bug in the soft updates configuration? Should I write a bug report? Thank you for your time. Bye Arne appendix A: Sep 17 19:23:31 neo fsck: /dev/ad1s1e: Reclaimed: 0 directories, 1 files, 424 fragments Sep 17 19:23:31 neo fsck: /dev/ad1s1e: 106404 files, 26065010 used, 33244724 free (4620 frags, 4155013 blocks, 0.0% fragmentation) appendix B: Sep 17 19:38:02 neo fsck: /dev/ad1s1e: INCORRECT BLOCK COUNT I=3 (3712 should be 4) (CORRECTED) Sep 17 19:38:02 neo fsck: /dev/ad1s1e: Reclaimed: 0 directories, 0 files, 929 fragments Sep 17 19:38:02 neo fsck: /dev/ad1s1e: 106254 files, 26058903 used, 33250326 free (4614 frags, 4155714 blocks, 0.0% fragmentation) _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com