Modification date won't update

2015-01-21 Thread DaneeL

   Hi,
   I'd like to get some guidance on aufs behavior I noticed lately.
   I have 2 HDDs merged using aufs:
   mount -v -t aufs -o sum,create=mfs,dirs=/media/hdd1=rw:/media/hdd3=rw none
   /media/share
   I noticed lately that the modification time does not change if I copy new
   files into some directories.
   If a directory exits on both hdd1 and hdd3 and the files is copied into hdd3
   - date does not change in aufs mount but changes on hdd3.
   If a directory exists on only hdd3 the directory modify date changes on aufs
   as well.
   Two things happened lately that - in my opinion - can cause this:
   - I ungraded Ubuntu 14.04 LTS from the previous LTS release
   - I replaced a HDD: deleted hdd2 and appended hdd3 into aufs
   Some relevant information:
   #Linux and kernel version
   Ubuntu 14.04 LTS
   3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 x86_64
   x86_64 GNU/Linux
   #AUFS version
   aufs 3.13-20140303
   #cat /proc/mounts
   /dev/sda1 /media/hdd1 ext4 rw,noatime,data=ordered 0 0
   /dev/sdb1 /media/hdd3 ext4 rw,noatime,data=ordered 0 0
   none /media/share aufs rw,noatime,si=dccfb401106ea55a,create=mfs,sum 0 0
   # cat /sys/fs/aufs/*
   CONFIG_AUFS_FS=m
   CONFIG_AUFS_BRANCH_MAX_127=y
   CONFIG_AUFS_SBILIST=y
   CONFIG_AUFS_EXPORT=y
   CONFIG_AUFS_INO_T_64=y
   CONFIG_AUFS_BR_RAMFS=y
   CONFIG_AUFS_BR_FUSE=y
   CONFIG_AUFS_POLL=y
   CONFIG_AUFS_BR_HFSPLUS=y
   CONFIG_AUFS_BDEV_LOOP=y
   Please let me know what to do in order to get the directory modification
   time to update.
   Thank you!
   Daniel
--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet

Re: Modification date won't update

2015-01-21 Thread sfjro

Hello Daniel,

DaneeL:
> I noticed lately that the modification time does not change if I copy new
> files into some directories.
> If a directory exits on both hdd1 and hdd3 and the files is copied into
> hdd3 - date does not change in aufs mount but changes on hdd3.
> If a directory exists on only hdd3 the directory modify date changes on
> aufs as well.

Would you describe these more speicifically? Probably the reproducible
command sequence is better.
- how and what did you copy? from where to where?
- how did you check the mtime?


J. R. Okajima

--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet


Re: Modification date won't update

2015-01-21 Thread DaneeL

   Hi,
   I'm attaching an example.
   In  the  example  I just created a file for each scenario, but usually
   transmission downloads the files and move them from a temporary directory to
   their final location.
   As for how I check, I just order the directories by date on windows via
   samba share usually. On the box itself I just use the ls command.
   Daniel

   DaneeLÂ  -Â  <[1]danee...@gmail.com>
   "To boldly go where no one has gone before ..."
   On Wed, Jan 21, 2015 at 2:35 PM, <[2]sf...@users.sourceforge.net> wrote:

 Hello Daniel,
 DaneeL:
 > I noticed lately that the modification time does not change if I copy
 new
 > files into some directories.
 > If a directory exits on both hdd1 and hdd3 and the files is copied into
 > hdd3 - date does not change in aufs mount but changes on hdd3.
 > If a directory exists on only hdd3 the directory modify date changes on
 > aufs as well.
 Would you describe these more speicifically? Probably the reproducible
 command sequence is better.
 - how and what did you copy? from where to where?
 - how did you check the mtime?
 J. R. Okajima

References

   1. mailto:danee...@gmail.com
   2. mailto:sf...@users.sourceforge.net
Example: Date will not update
--
xbmc@doboz:~$ ls -l /media/hdd1/_Series/ | grep CSI
drwxrwxr-x 2 xbmc xbmc  4096 Jan  5 12:02 CSI
xbmc@doboz:~$ ls -l /media/hdd3/_Series/ | grep CSI
drwxrwxr-x  2 xbmc xbmc 4096 Jan 13 15:51 CSI
xbmc@doboz:~$ ls -l /media/share/_Series/ | grep CSI
drwxrwxr-x  2 xbmc xbmc  4096 Jan  5 12:02 CSI
xbmc@doboz:~$ touch /media/share/_Series/CSI/testfile
xbmc@doboz:~$ ls -l /media/hdd1/_Series/ | grep CSI
drwxrwxr-x 2 xbmc xbmc  4096 Jan  5 12:02 CSI
xbmc@doboz:~$ ls -l /media/hdd3/_Series/ | grep CSI
drwxrwxr-x  2 xbmc xbmc 4096 Jan 21 15:02 CSI
xbmc@doboz:~$ ls -l /media/share/_Series/ | grep CSI
drwxrwxr-x  2 xbmc xbmc  4096 Jan  5 12:02 CSI
xbmc@doboz:~$ ls -l /media/share/_Series/CSI | grep test
-rw-rw-r-- 1 xbmc xbmc 0 Jan 21 15:02 testfile
xbmc@doboz:~$

Emaple: Date will update
--
xbmc@doboz:~$ ls -l /media/hdd1/_Series/ | grep Helix
xbmc@doboz:~$ ls -l /media/hdd3/_Series/ | grep Helix
drwxr-xr-x  2 xbmc xbmc 4096 Jan 17 08:52 Helix
xbmc@doboz:~$ ls -l /media/share/_Series/ | grep Helix
drwxr-xr-x  2 xbmc xbmc  4096 Jan 17 08:52 Helix
xbmc@doboz:~$ touch /media/share/_Series/Helix/testfile2
xbmc@doboz:~$ ls -l /media/hdd1/_Series/ | grep Helix
xbmc@doboz:~$ ls -l /media/hdd3/_Series/ | grep Helix
drwxr-xr-x  2 xbmc xbmc 4096 Jan 21 15:06 Helix
xbmc@doboz:~$ ls -l /media/share/_Series/ | grep Helix
drwxr-xr-x  2 xbmc xbmc  4096 Jan 21 15:06 Helix
xbmc@doboz:~$ ls -l /media/share/_Series/Helix/ | grep test
-rw-rw-r-- 1 xbmc xbmc 0 Jan 21 15:06 testfile2
xbmc@doboz:~$
--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet

Re: Modification date won't update

2015-01-21 Thread sfjro

DaneeL:
> Example: Date will not update
> --
> xbmc@doboz:~$ touch /media/share/_Series/CSI/testfile
> xbmc@doboz:~$ ls -l /media/hdd1/_Series/ | grep CSI
> drwxrwxr-x 2 xbmc xbmc  4096 Jan  5 12:02 CSI
> xbmc@doboz:~$ ls -l /media/hdd3/_Series/ | grep CSI
> drwxrwxr-x  2 xbmc xbmc 4096 Jan 21 15:02 CSI
> xbmc@doboz:~$ ls -l /media/share/_Series/ | grep CSI
> drwxrwxr-x  2 xbmc xbmc  4096 Jan  5 12:02 CSI

Ok, by this "touch" /media/hdd3/_Series is updated, but
/media/share/_Series is not. It is because your branches are
"/media/hdd1=rw:/media/hdd3=rw".
The attributes of an aufs dir inherit the first same-named dir in the
branches. In this case, you have /media/hdd1/_Series,
/media/share/_Series inherits the /media/hdd1/_Series's timestamps
instead of /media/hdd3/_Series.


J. R. Okajima

--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet


Re: Modification date won't update

2015-01-21 Thread DaneeL

   Thanks for the quick reply!
   I just changed to command to "/media/hdd3=rw:/media/hdd1=rw" swapping the
   hdd1 and hdd3 and it seems to be working.
   Thank you again for the help!
   Daniel

   DaneeLÂ  -Â  <[1]danee...@gmail.com>
   "To boldly go where no one has gone before ..."
   On Wed, Jan 21, 2015 at 3:22 PM, <[2]sf...@users.sourceforge.net> wrote:

 DaneeL:
 > Example: Date will not update
 > --
 > xbmc@doboz:~$ touch /media/share/_Series/CSI/testfile
 > xbmc@doboz:~$ ls -l /media/hdd1/_Series/ | grep CSI
 > drwxrwxr-x 2 xbmc xbmc  4096 Jan  5 12:02 CSI
 > xbmc@doboz:~$ ls -l /media/hdd3/_Series/ | grep CSI
 > drwxrwxr-x  2 xbmc xbmc 4096 Jan 21 15:02 CSI
 > xbmc@doboz:~$ ls -l /media/share/_Series/ | grep CSI
 > drwxrwxr-x  2 xbmc xbmc  4096 Jan  5 12:02 CSI
 Ok, by this "touch" /media/hdd3/_Series is updated, but
 /media/share/_Series is not. It is because your branches are
 "/media/hdd1=rw:/media/hdd3=rw".
 The attributes of an aufs dir inherit the first same-named dir in the
 branches. In this case, you have /media/hdd1/_Series,
 /media/share/_Series inherits the /media/hdd1/_Series's timestamps
 instead of /media/hdd3/_Series.
 J. R. Okajima

References

   1. mailto:danee...@gmail.com
   2. mailto:sf...@users.sourceforge.net
--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet

Re: Modification date won't update

2015-01-21 Thread sfjro

DaneeL:
> I just changed to command to "/media/hdd3=rw:/media/hdd1=rw" swapping the
> hdd1 and hdd3 and it seems to be working.
>
> Thank you again for the help!

My pleasure.

But I am wondering, when a multiple writable branches exit, and aufs
choose the lower one, then aufs should update the timestamps of the
parent dir on the topmost branch.
In other words, the behaviour in front of you is due to "mfs" option
(most-free-space). And if you use another path (other than _Series/CSI),
you will meet the same problem.


J. R. Okajima

--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet


Re: Modification date won't update

2015-01-21 Thread DaneeL

   In my opinion that might be confusing as nothing changed on the topmost
   branch.
   Maybe just update the timestamp on the aufs mount on and not touch the
   topmost branch?
   Anyway, now that I know the logic I'll keep an eye out for this :)
   I don't expect it to happen often but might be helpful for others to know
   this behavior.
   Daniel
   On Wed, Jan 21, 2015 at 3:33 PM, <[1]sf...@users.sourceforge.net> wrote:

 DaneeL:
 > I just changed to command to "/media/hdd3=rw:/media/hdd1=rw" swapping
 the
 > hdd1 and hdd3 and it seems to be working.
 >
 > Thank you again for the help!
 My pleasure.
 But I am wondering, when a multiple writable branches exit, and aufs
 choose the lower one, then aufs should update the timestamps of the
 parent dir on the topmost branch.
 In other words, the behaviour in front of you is due to "mfs" option
 (most-free-space). And if you use another path (other than _Series/CSI),
 you will meet the same problem.
 J. R. Okajima

References

   1. mailto:sf...@users.sourceforge.net
--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet

Re: Modification date won't update

2015-01-21 Thread sfjro

DaneeL:
> I don't expect it to happen often but might be helpful for others to know
> this behavior.

Hmm, aufs manual describes about it a little.

--
.SH Incompatible with an Ordinary Filesystem
stat(2) returns the inode info from the first existence inode among
:::
The timestamp of a directory will not be updated when a file is
created or removed under it, and it was done on a lower branch.
--

Anyway, I've decided NOT to implement the feature to update the
timestamps on the topmost branch.


J. R. Okajima

--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet


Re: Modification date won't update

2015-01-21 Thread DaneeL

   Ohh...in this case I apologize, I totally missed this in the manual.
   Sorry to bother you for nothing.
   Daniel
   On Wed, Jan 21, 2015 at 4:04 PM, <[1]sf...@users.sourceforge.net> wrote:

 DaneeL:
 > I don't expect it to happen often but might be helpful for others to
 know
 > this behavior.
 Hmm, aufs manual describes about it a little.
 --
 .SH Incompatible with an Ordinary Filesystem
 stat(2) returns the inode info from the first existence inode among
 Â  Â  Â  Â  :::
 The timestamp of a directory will not be updated when a file is
 created or removed under it, and it was done on a lower branch.
 --
 Anyway, I've decided NOT to implement the feature to update the
 timestamps on the topmost branch.
 J. R. Okajima

References

   1. mailto:sf...@users.sourceforge.net
--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet