- FreeBSD 12.1
- All ports recompiled for 12.1
- Using a combination of tar cf - ... | ( cd <exfat-fs> ; tar xfp - ) to copy files to an exfat-formatted SD card
- Since a few weeks, the receiving tar gives messages like
x <filename>: Can't restore time
- I believe this started to happen when I installed FreeBSD 12.1 and recompiled all ports
- The file contents are otherwise o.k. (verified using diff -r)
- I have written a small utility "cptimes" which copies the atime and mtime from one file to another
- Trying to use this utility to correct these times manually results in
% cptimes <sourcefile> <destinationfile>
<destinationfile>: Operation not permitted
One more note: The same commands on another SD-card which is formatted as NTFS and uses sysutils/fusefs-ntfs work fine.
Unable to reproduce and issue is most likely related to the damaged fs on the target sd card.
# mdconfig -a -s 1g
# mkfs.exfat /dev/md0
File system created successfully.
# fsck.exfat /dev/md0
Checking file system on /dev/md0.
File system version 1.0
Sector size 512 bytes
Cluster size 32 KB
Volume size 1 GB
Used space 288 KB
Available space 1 GB
Totally 0 directories and 0 files.
File system checking finished. No errors found.
Below is a test provided by me:
# mount.exfat /dev/md0 /mnt/
FUSE exfat 1.3.0
[root@bunny /mnt]# echo test > test
[root@bunny /mnt]# ls -l
-rwxrwxrwx 1 root wheel 5 May 3 22:43 test
# rsync -a /etc/hosts /mnt/hosts
# ls -l /mnt/hosts
-rwxrwxrwx 1 root wheel 1116 Nov 28 14:36 /mnt/hosts
# touch -d "2018-01-02T22:13:14" /mnt/hosts
# stat /mnt/hosts
18446744073391374205 4 -rwxrwxrwx 1 root wheel 0 1116 "Jan 2 22:13:14 2018" "Jan 2 22:13:14 2018" "Jan 2 22:13:14 2018" "Jan 1 00:59:59 1970" 4096 64 0 /mnt/hosts
Also i tested that timestamp persist after remount. My recommendation would be to reformat the card and start from scratch. Feel free to reopen if needed.
O.k. thank you for checking.