Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmfs-fuse on FreeBSD 10.0 #13

Open
jovoro opened this issue Apr 28, 2014 · 1 comment
Open

vmfs-fuse on FreeBSD 10.0 #13

jovoro opened this issue Apr 28, 2014 · 1 comment

Comments

@jovoro
Copy link

jovoro commented Apr 28, 2014

Hello,

i'm trying to mount some vmfs datastores via vmfs-fuse on a FreeBSD 10 box. Exactly the same datastores work fine under CentOS 6, but on FreeBSD I get this:

# vmfs-fuse  /dev/da29s1 /datastores/lhstor11
VMFS: Unable to read FS information
Unable to open filesystem

But when I use debugvmfs to list files, for example, it outputs the expected list of files:

# debugvmfs /dev/da29s1 ls
.
..
.fbb.sf
.fdc.sf
.pbc.sf
.sbc.sf
.vh.sf
.vSphere-HA
[...]
aims-bbp-001
FOM
geoc-ags3

The binaries compiled fine with clang, but I also tried with gcc, with the same result. Maybe someone can give me a push in the right direction?

Cheers, J.

@jovoro
Copy link
Author

jovoro commented Apr 29, 2014

Apparently, in FreeBSD everything is a character device..?! Maybe someone can enlighten me why this should be right and if this would be an adequate solution. But for the moment, I fixed my issue with the following change:

diff --git a/vmfs-fuse/vmfs-fuse.c b/vmfs-fuse/vmfs-fuse.c
index 48e1537..5900c93 100644
--- a/vmfs-fuse/vmfs-fuse.c
+++ b/vmfs-fuse/vmfs-fuse.c
@@ -464,7 +464,7 @@ static int vmfs_fuse_opts_func(void *data, const char *arg, int key,
       }
       if (S_ISDIR(st.st_mode)) {
          opts->mountpoint = strdup(arg);
-      } else if (S_ISREG(st.st_mode) || S_ISBLK(st.st_mode)) {
+      } else if (S_ISREG(st.st_mode) || S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode)) {
          *(opts->path++) = strdup(arg);
       }
       return 0;

I can now mount datastores, further tests are pending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant