Description
Hey folks,
Greetings from germany!
I've (possibly) found a bug while mounting a zfs filesystem, in my example named "data3", from a current working directory (cwd) which contains a symbolic link also called "data3". The destination where the symlink points to is not significant. In my example the cwd is: "/data/home/chriss_ubuntu" and the symblic link called "data3" points to "/data3".
It seems to me that the command "zfs mount data3" tries to follow the symbolic link and so the following error message appears:
filesystem '/data3' cannot be mounted, unable to open the dataset
cannot mount 'data3': Invalid argument
If I change the cwd to any other directory (without a symlink called "data3") the mount command works just fine.
strace (the short way):
11304 execve("/sbin/zfs", ["zfs", "mount", "data3"], [/* 29 vars /]) = 0
11304 lstat("/data3", {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0
11304 openat(AT_FDCWD, "/data3", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 6
11305 execve("/bin/mount", ["/bin/mount", "-t", "zfs", "-o", "defaults,atime,dev,exec,rw,suid,"..., "data3", "/data3"], [/ 29 vars /]) = 0
11305 readlink("/data/home/chriss_ubuntu/data3", "/data3", 4096) = 6
11305 readlink("/data3", 0x7fff5fd0afe0, 4096) = -1 EINVAL (Invalid argument)
11306 execve("/sbin/mount.zfs", ["/sbin/mount.zfs", "/data3", "/data3", "-o", "rw,xattr,zfsutil"], [/ 25 vars */]) = 0
11306 stat("/data3", {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0
11306 open("/data3", O_RDONLY) = 6
11306 lstat("/data3", {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0
11306 write(2, "filesystem '/data3' cannot be mo"..., 66) = 66
11304 write(2, "cannot mount 'data3': Invalid ar"..., 39) = 39
Is this a bug or maybe an intentional behaviour?
Used versions:
Ubuntu 13.04 (amd64)
dkms 2.2.0.3-1.1ubuntu2+zfs6raring1raring
libzfs1 0.6.2-1
mountall 2.48build1-zfs2
zfs-dkms 0.6.2-1raringraring
zfsutils 0.6.2-1