zfs-linux / zfs

Native ZFS for Linux
http://wiki.github.com/behlendorf/zfs/
Other
56 stars 2 forks source link

a few snapshot problems #127

Open Curley-Joe opened 13 years ago

Curley-Joe commented 13 years ago

I'm having a few problems accessing the snapshots I've created using the .zfs/snapshots directory.

The first issue is minor. "ls -l" always returns an "Invalid argument" error, but otherwise works fine. Using ltrace and strace, it seems that "ls" is calling lgetfilecon(), which is calling lgetxattr(path, "security.selinux", ...) and failing.

The more serious problem is that many of the directories cannot be opened. E.g. from strace:

open("MS_raw", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 EINVAL (Invalid argument)

Also, the .zfs directory is not accessible at all through NFS:

stat(".zfs", 0x121e1568)                = -1 EIO (Input/output error)

But the good news is that cloning a snapshot seems to work.

prasad-joshi commented 13 years ago

Thanks a lot for your inputs.

On Tue, May 10, 2011 at 5:18 AM, Curley-Joe reply@reply.github.com wrote:

I'm having a few problems accessing the snapshots I've created using the .zfs/snapshots directory.

The first issue is minor.  "ls -l" always returns an "Invalid argument" error, but otherwise works fine.  Using ltrace and strace, it seems that "ls" is calling lgetfilecon(), which is calling lgetxattr(path, "security.selinux", ...) and failing.

Thanks a lot. This can be fixed easily.

@Rohan can you please fix this problem.

The more serious problem is that many of the directories cannot be opened.  E.g. from strace:

   open("MS_raw", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 EINVAL (Invalid argument)

I will test this.

Also, the .zfs directory is not accessible at all through NFS:

   stat(".zfs", 0x121e1568)                = -1 EIO (Input/output error)

Yes this feature has been left intentionally and should be fixed now.

But the good news is that cloning a snapshot seems to work.

Reply to this email directly or view it on GitHub: https://github.com/zfs-linux/zfs/issues/127