https://tracker.ceph.com/https://tracker.ceph.com/favicon.ico2015-02-13T12:18:57ZCeph CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=480472015-02-13T12:18:57ZZheng Yanukernel@gmail.com
<ul><li><strong>File</strong> <i>patch</i> added</li></ul><p>could you try the attached patch</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=480482015-02-13T12:20:02ZZheng Yanukernel@gmail.com
<ul><li><strong>File</strong> deleted (<del><i>patch</i></del>)</li></ul> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=480492015-02-13T12:20:33ZZheng Yanukernel@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/download/1625/patch">patch</a> <a class="icon-only icon-magnifier" title="View" href="/attachments/1625/patch">View</a> added</li></ul> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=480502015-02-13T12:41:58ZDennis Kramer
<ul></ul><p>It won't patch on samba 4.1.16 (latest) source. Did you grab a different version?</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=480512015-02-13T13:50:19ZZheng Yanukernel@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/download/1626/patch-4.1.6">patch-4.1.6</a> added</li></ul><p>it's for samba 4.3. please try the new one</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=480542015-02-13T14:49:35ZDennis Kramer
<ul></ul><p>Tried it. Patched successful. But not entirely fixed though, it seems that the timestamp "created timestamp" also changes unintentionally (tested on ms office .docx files). Plain textfiles (edited with notepad) is still working as intended (e.g. only modified/access time changes, not the creation time).</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=480762015-02-13T23:36:29ZZheng Yanukernel@gmail.com
<ul></ul><p>ceph inode does not store birth time. ceph vfs module assigns 'modified time' to 'birth time'</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=480792015-02-14T00:24:20ZGreg Farnumgfarnum@redhat.com
<ul></ul><p>I wonder how other Linux filesystems keep track of creation times. Are they just storing them in an xattr or something?</p>
<p>Reporting an mtime as a creation time is fairly misleading, I think I'd rather we just set it to the Unix epoch or something to make clear that it's not really correct...which is apparently what we're actually doing if it reverts to 1970.</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=480812015-02-14T02:39:17ZZheng Yanukernel@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/download/1627/patch-fake-birth">patch-fake-birth</a> added</li></ul><p>most linux filesystems (extN,xfs,btrfs) do not have birth time. When dealing with linux local filesystem, samba fakes a birth time. please try the new patch (together with previous patch)</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=481852015-02-17T11:08:04ZDennis Kramer
<ul></ul><p>It doesn't build after patching:<br /><pre>
[3740/3767] Linking default/source3/modules/libvfs-ceph.so
default/source3/modules/vfs_ceph_80.o: In function `cephwrap_stat':
vfs_ceph.c:(.text+0x1f91): undefined reference to `lp_fake_directory_create_times'
default/source3/modules/vfs_ceph_80.o: In function `cephwrap_fstat':
vfs_ceph.c:(.text+0x22b2): undefined reference to `lp_fake_directory_create_times'
default/source3/modules/vfs_ceph_80.o: In function `cephwrap_lstat':
vfs_ceph.c:(.text+0x24fd): undefined reference to `lp_fake_directory_create_times'
collect2: error: ld returned 1 exit status
Waf: Leaving directory `/usr/src/samba-4.1.16/bin'
Build failed: -> task failed (err #1):
{task: cc_link vfs_ceph_80.o -> libvfs-ceph.so}
make: *** [all] Error 1
</pre></p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=482662015-02-18T16:44:13ZDennis Kramer
<ul></ul><p>Hi Zheng, I was wondering if there is any progress with the above?</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=482702015-02-18T16:56:31ZGreg Farnumgfarnum@redhat.com
<ul></ul><p>He's on vacation for Chinese New Year, and the rest of us are traveling. This'll probably require some work to get it going properly; have patience! :)</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=482732015-02-18T17:04:52ZDennis Kramer
<ul></ul><p>I will :-)<br />Thanks for the reply Greg!</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=483222015-02-20T12:22:00ZZheng Yanukernel@gmail.com
<ul></ul><p>try replacing "lp_fake_directory_create_times" in the patch with "lp_fake_dir_create_times"</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=483232015-02-20T13:28:31ZDennis Kramer
<ul></ul><p>Replaced it and it builds, but the problem still exists. <br />The created time == modified time after editing.</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=483652015-02-23T00:20:52ZZheng Yanukernel@gmail.com
<ul></ul><p>please check how samba behave when using local file system as backbend. I think this patch make ceph backend behave the same as local filesystem</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=483712015-02-23T12:01:31ZDennis Kramer
<ul></ul><p>When I use the local filesystem or even cephfs with the kernel module (instead of ceph vfs) everything is working fine. Timestamps are shown correctly, for both created time and modified time. This patch didn't work for me when using the ceph vfs samba module, specifically on MS Office files (.docx).</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=484662015-02-25T03:49:53ZZheng Yanukernel@gmail.com
<ul><li><strong>File</strong> <i>0002-vfs_ceph-remove-cephwrap_init_stat_ex_from_stat.patch</i> added</li></ul><p>please try the new patches</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=484672015-02-25T03:51:22ZZheng Yanukernel@gmail.com
<ul><li><strong>File</strong> deleted (<del><i>0002-vfs_ceph-remove-cephwrap_init_stat_ex_from_stat.patch</i></del>)</li></ul> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=484682015-02-25T03:51:46ZZheng Yanukernel@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/download/1633/0001-vfs_ceph-fix-ntimes_fn-callback.patch">0001-vfs_ceph-fix-ntimes_fn-callback.patch</a> <a class="icon-only icon-magnifier" title="View" href="/attachments/1633/0001-vfs_ceph-fix-ntimes_fn-callback.patch">View</a> added</li><li><strong>File</strong> <a href="/attachments/download/1634/0002-vfs_ceph-remove-cephwrap_init_stat_ex_from_stat.patch">0002-vfs_ceph-remove-cephwrap_init_stat_ex_from_stat.patch</a> <a class="icon-only icon-magnifier" title="View" href="/attachments/1634/0002-vfs_ceph-remove-cephwrap_init_stat_ex_from_stat.patch">View</a> added</li></ul> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=484762015-02-25T09:26:00ZDennis Kramer
<ul></ul><p>It won't patch. Hunk <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: gpf in tcp_sendpage (Closed)" href="https://tracker.ceph.com/issues/1">#1</a> failures.<br />Is it for SAMBA 4.1.16? I see a couple of discrepancies in the patches.</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=484842015-02-25T11:07:46ZZheng Yanukernel@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/download/1645/0000-pre.patch">0000-pre.patch</a> <a class="icon-only icon-magnifier" title="View" href="/attachments/1645/0000-pre.patch">View</a> added</li></ul><p>they are for 4.3. please apply the prerequisite patch first.</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=484912015-02-25T11:30:25ZDennis Kramer
<ul></ul><p>Are the previous patches also needed?</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=484942015-02-25T12:55:21ZDennis Kramer
<ul></ul><p>Awesome Zheng! It seems to be working correctly now.<br />I've only used the patches 0000-, 0001- and 0002-</p>
<p>Thank you.</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=484972015-02-25T15:19:28ZDennis Kramer
<ul></ul><p>After some more testing, I've noticed it still doesn't work perfectly.<br />My setup is as follows for test purposes:<br />I have two samba servers:<br />- samba1 has a cephfs kernel mount, which is exported in SAMBA (e.g. /mnt/cephfs/test)<br />- samba2 has the ceph_vfs module from samba, which is configure in SAMBA to point to the same share in cephfs (e.g. /test). This server has implemented above patches.</p>
<p>Both samba servers are being accessed from a Windows client.</p>
<p>Scenario 1:<br />1. samba1 is being accessed by the client and creates a .docx file. Timestamps are correctly shown.<br />2. client modifies the file (after 1 minute). Timestamps are correctly shown: Creation time is untouched, and the modified and accessed time is correctly adjusted.</p>
<p>Scenario 2:<br />1. samba2 is being accessed by the client and creates a .docx file. Timestamps are correctly shown.<br />2. client modifies the file (after 1 minute). Timestamps are correctly shown: Creation time is untouched, and the modified and accessed time is correctly adjusted.</p>
<p>Scenario 3:<br />1. <strong>samba2</strong> is being accessed by the client and creates a .docx file. Timestamps are correctly shown.<br />2. client modifies the file (after 1 minute). Timestamps are correctly shown: Creation time is untouched, and the modified and accessed time is correctly adjusted.<br />3. client modifies the same file again (after 1 minute), but this time the client uses the server <strong>samba1</strong> <em>instead</em> of <strong>samba2</strong>. Timestamps are now <strong>incorrectly</strong> shown: Creation time has the same timestamp as the modified time. This is shown on the file properties on server <strong>samba2</strong>, <em>however</em> when I look at the same file properties on server <strong>samba1</strong> the timestamps are correct. Creation time seems untouched, and only the modified and accessed time is correctly adjusted. So both servers are showing different creation times on the same file in the situation when the file is modified on samba1 and read on samba2.</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=485022015-02-25T16:25:55ZDennis Kramer
<ul></ul><p>Zheng, I've compiled your patches against Samba v4.2.0rc5 and it seems to work now for scenario 3 aswell. So far so good :-)</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=485742015-02-27T14:05:09ZDennis Kramer
<ul></ul><p>Sorry, I was wrong. <br />Even with Samba v4.2.0rc5 the problem exists for "scenario 3" in my comment above.</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=485752015-02-27T14:14:54ZDennis Kramer
<ul></ul><p>Okay, I've noticed that when I restart the samba process the timestamps are shown correctly as expected, however when I edit the file again on <strong>samba1</strong> (when using the same test-setup as described above) it shows the incorrect timestamps again on <strong>samba2</strong>.</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=495572015-03-20T03:02:04ZZheng Yanukernel@gmail.com
<ul></ul><p>do both of your samba servers have "store dos attributes" option enabled.</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=496142015-03-20T22:54:02ZDennis Kramer
<ul></ul><p>yes they do.</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=496152015-03-20T23:05:07ZDennis Kramer
<ul></ul><p>My smb.conf is as follows:</p>
<p>[global]<br />workgroup = DOMAIN<br />realm = FQDN<br />netbios name = samba2<br />server string = Ubuntu - samba2<br />kerberos method = secrets and keytab<br />client signing = yes<br />client use spnego = yes<br />security = ADS<br />os level = 0<br />lm announce = no<br />preferred master = no<br />local master = no<br />domain master = no<br />encrypt passwords = true<br />log level = 0 vfs:0<br />syslog = 2<br />log file = /var/log/samba/samba.log<br />max log size = 10000000<br />bind interfaces only = yes<br />interfaces = 127.0.0.1 172.17.135.111<br />client max protocol = SMB3<br />server max protocol = SMB3<br />acl allow execute always = True<br />store dos attributes = yes<br />dfree cache time = 60<br />dfree command = /usr/bin/dfree</p>
<ol>
<li>Tuneables<br />socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE<br />strict sync = no<br />sync always = no<br />dead time = 15<br />large readwrite = yes<br />strict locking = no<br />dns proxy= no<br />max xmit = 1048576<br />read raw = yes<br />write raw = yes<br />use sendfile = no<br />oplocks = 0<br />level2 oplocks = 0<br />getwd cache = yes</li>
<li>TEST TUNABLES<br />strict allocate = Yes<br />aio read size = 16384<br />aio write size = 16384<br />smb2 leases = yes</li>
</ol>
<ol>
<li>ADS IDMAPPER <-> UID<br />winbind separator = +<br />idmap backend = tdb<br />idmap uid = 50000 - 99999<br />idmap gid = 50000 - 99999<br />idmap config DOMAIN : backend = ad<br />idmap config DOMAIN : schema_mode = rfc2307<br />idmap config DOMAIN : readonly = yes<br />idmap config DOMAIN : range = 50000 - 99999<br />idmap cache time = 120<br />idmap negative cache time = 20<br />winbind nss info = rfc2307<br />winbind expand groups = 2<br />winbind nested groups = yes<br />winbind use default domain = no<br />winbind enum users = yes<br />winbind enum groups = yes<br />winbind refresh tickets = yes<br />winbind offline logon = false<br />obey pam restrictions = yes<br />client ntlmv2 auth = yes</li>
</ol>
<ol>
<li>DISABLE CUPS<br />load printers = no<br />printing = bsd<br />printcap name = /dev/null<br />disable spoolss = yes</li>
</ol>
<p>#================ Share Definitions ===================<br />[TEMPUS]<br /> comment = TEMPUS SHARE<br /> browseable = yes<br /> read only = no<br /> nt acl support = yes<br /> create mask = 0664<br /> directory mask = 2775<br /> valid users = @BOFH<br /> force group = BOFH<br /> vfs objects = ceph recycle<br /> path = /FIG<br /> recycle:repository = .recycle<br /> recycle:keeptree = yes<br /> recycle:versions = yes<br /> recycle:maxsize = 20971520<br /> recylce:touch = yes<br /> recylce:exclude = <strong>.tmp|</strong>.temp|*.o|*.obj<br /> recycle:directory_mode = 2775</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=497002015-03-23T06:12:07ZZheng Yanukernel@gmail.com
<ul></ul><p>sound like a libcephfs bug. could you please try the newest development version of ceph (just need to update ceph on machine that run samba server, no need to update ceph on machine run osd/mds/mon)</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=747522016-07-13T23:25:56ZGreg Farnumgfarnum@redhat.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li></ul><p>Closing in favor of <a class="issue tracker-1 status-1 priority-4 priority-default" title="Bug: Samba: hook up to birthtime correctly (New)" href="https://tracker.ceph.com/issues/16679">#16679</a>, since this is really about birthtime and we're adding a real one.</p> CephFS - Bug #10834: SAMBA VFS module: Timestamps revert back to 01-01-1970https://tracker.ceph.com/issues/10834?journal_id=1312562019-03-09T00:26:12ZPatrick Donnellypdonnell@redhat.com
<ul><li><strong>Category</strong> deleted (<del><i>43</i></del>)</li><li><strong>Labels (FS)</strong> <i>Samba/CIFS</i> added</li></ul>