This is weird. (And this "answer" started as a comment ;), became a bit long for it.)
Looking at the strace
it looks like there are no hidden characters or the like, else I suspect you would have seen it in e.g. (which should have resulted in -1 ENOENT
and not 0
if everything was OK):
stat("akorg", {st_mode=S_IFDIR|0755, st_size=21, ...}) = 0
as you do in:
lstat("akorg\342\234\275", {st_mode=S_IFDIR|0755, st_size=21, ...}) = 0
Came across a mail exchange where one person has the opposite problem. ls
list the files, but stat
give ENOENT
– though that was on FreeBSD.
I do not know much about zfs
, but could it be that some sync, snapshot or the like has failed and left a corrupted file table? Did you create/have a directory named akorg
that you deleted before you tried the mv
?
Do not know if you can get some error descriptions by:
# zpool status -v
One thing to try is check the reverse inode lookup (optionally add yet another d
) and check path
:
# zdb -dddd <pool-name> <inode>
On a folder named baz
:
# zdb -dddd qqq 31
Object lvl iblk dblk dsize lsize %full type
31 1 16K 512 1K 512 100.00 ZFS directory
264 bonus ZFS znode
dnode flags: USED_BYTES USERUSED_ACCOUNTED
dnode maxblkid: 0
path /baz
uid 1000
gid 1000
atime Fri Jun 14 12:39:46 2013
mtime Fri Jun 14 11:55:33 2013
ctime Fri Jun 14 11:55:33 2013
crtime Fri Jun 14 11:55:33 2013
gen 1510
mode 40775
size 2
parent 3
links 2
xattr 0
rdev 0x0000000000000000
microzap: 512 bytes, 0 entries
On a directory named foo
holding several subdirectories including one named akorg✽
:
Object lvl iblk dblk dsize lsize %full type
16 1 16K 512 1K 512 100.00 ZFS directory
264 bonus ZFS znode
dnode flags: USED_BYTES USERUSED_ACCOUNTED
dnode maxblkid: 0
path /foo
uid 1000
gid 1000
atime Fri Jun 14 13:10:38 2013
mtime Fri Jun 14 12:13:18 2013
ctime Fri Jun 14 12:13:18 2013
crtime Fri Jun 14 11:41:53 2013
gen 1482
mode 40775
size 6
parent 3
links 6
xattr 0
rdev 0x0000000000000000
microzap: 512 bytes, 4 entries
foo1 = 15 (type: Directory)
foo2 = 18 (type: Directory)
foo = 19 (type: Directory)
akorg✽ = 30 (type: Directory)
The settings you have on zfs get all storage/home-ak-annex
for various name mod also looks sane (as far as I can tell) as well as the other properties by reading ZFS Properties:
storage/home-ak-annex utf8only off -
storage/home-ak-annex normalization none -
storage/home-ak-annex casesensitivity sensitive -
If you build zfs
yourself you can enable debug by ./configure --enable-debug
and play with the above including -vvvv
, -bbbb
etc.
Lastly you could open a new Issue on the git.
Best Answer
lsb_release -a
is likely going to be your best option for finding this information out, and being able to do so in a consistent way.History of LSB
The
lsb
in that command stands for the project Linux Standards Base which is an umbrella project sponsored by the Linux Foundation to provide generic methods for doing basic kinds of things on various Linux distros.The project is voluntary and vendors can participate within the project as just a user and also as facilitators of the various specifications around different modules that help to drive standardization within the different Linux distributions.
excerpt from the charter
Useful links related to LSB
Criticisms
There are a number of problems with LSB that make it problematic for distros such as Debian. The forced usage of RPM being one. See the Wikipedia article for more on the matter.
Novell
If you search you'll possibly come across a fairly dated looking page titled: Detecting Underlying Linux Distro from Novell. This is one of the few places I"ve seen an actual list that shows several of the major distros and how you can detect what underlying one you're using.
excerpt
This same page also includes a handy script which attempts to codify for the above using just vanilla
uname
commands, and the presence of one of the above files.NOTE: This list is dated but you could easily drop the dated distros such as Mandrake from the list and replace them with alternatives. This type of a script might be one approach if you're attempting to support a large swath of Solaris & Linux variants.
Linux Mafia
More searching will turn up the following page maintained on Linuxmafia.com, titled: /etc/release equivalents for sundry Linux (and other Unix) distributions. This is probably the most exhaustive list to date that I've seen. You could codify this list with a case/switch statement and include it as part of your software distribution.
In fact there is a script at the bottom of that page that does exactly that. So you could simply download and use the script as 3rd party to your software distribution.
script
NOTE: This script should look familiar, it's an up to date version of the Novell one!
Legroom script
Another method I've seen employed is to roll your own script, similar to the above Novell method but making use of LSB instead. This article titled: Generic Method to Determine Linux (or UNIX) Distribution Name, shows one such method.
This chunk of code could be included into a system's
/etc/bashrc
or some such file which would then set the environment variable$DISTRO
.gcc
Believe it or not another method is to make use of
gcc
. If you query the commandgcc --version
you'll get the distro that gcc was built for, which is invaribly the same as the system it's running on.Fedora 14
CentOS 5.x
CentOS 6.x
Ubuntu 12.04
TL;DR;
So which one should I use? I would tend to go with
lsb_release -a
for any Linux distributions that I would frequent (RedHat, Debian, Ubuntu, etc.). For situations where you're supporting systems that don't providelsb_release
I'd roll my own as part of the distribution of software that I'm providing, similar to one of the above scripts.UPDATE #1: Follow-up with SuSE
In speaking with @Nils in the comments below it was determined that for whatever reason, SLES11 appeared to drop LSB from being installed by default. It was only an optional installation, which seemed counter for a package that provides this type of key feature.
So I took the opportunity to contact someone from the OpenSuSE project to get a sense of why.
excerpt of email
Here's Rob's response