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

how to install or compile proxyfs on ubuntu #549

Open
m-amir-ir opened this issue Oct 25, 2020 · 6 comments
Open

how to install or compile proxyfs on ubuntu #549

m-amir-ir opened this issue Oct 25, 2020 · 6 comments

Comments

@m-amir-ir
Copy link

m-amir-ir commented Oct 25, 2020

hello members.

I am thinking about installing or compiling proxyfs on Ubuntu 18.04 and after that connect to exist openstack swift in my server form , but this project doesn't have user manual for it .
do you have any suggestion for me ?

@edmc-ss
Copy link
Collaborator

edmc-ss commented Oct 25, 2020

Hi m-amir-ir,

A couple of comments:

In the ProxyFS directory, there is a Makefile... Assuming you have your Golang setup, this should be sufficient. The default "all" target builds everything you need.

Your question was about building for Ubuntu - specifically 18.04. Therein lies a challenge. One aspect of ProxyFS is support for SMB. The way this is accomplished is via Samba of course. But, importantly, ProxyFS uses the "vfs" mechanism to integrate a C library (2 actually) into the Samba program (smbd). Such support for arbitrary versions of Samba is limited. Indeed, Samba version 4.4 is targeted...well behind the version that ships with Ubuntu 18.04.

The currently supported Samba integration is keyed to CentOS 7.4. you should do a "git submodule update --recursive" to fetch the C code for the Samba integration. Make should do the rest by default.

If you are not in need of SMB, ProxyFS is far more portable. Ubuntu and even macOS work fine. You can look in the Makefile to see what targets are needed...basically you want to avoid the "c-*" targets for anything other than CentOS. Indeed, look at what "all" defaults to under macOS for your guide.

For NFS, things are easier. ProxyFS includes support for a local FUSE mount point for a volume. You can simply use that locally...or set up nfsd to export it (i.e. in /etc/exports).

Finally, a path under heavy development is PFSAgent (the pfsagentd/ subdir). PFSAgent is designed to run on any client (except Windows...though it works well inside WSL 2). PFSAgent basically replaces the client's SMB or NFS Client mount mechanism. This path truly makes ProxyFS scale out for file reads & writes...though, as I said, it's still maturing (1.16.9 works well but 1.17.0 is currently unstable).

Come over to the Slack group (proxyfs.slack.com) to discuss more...love to engage.

@edmc-ss
Copy link
Collaborator

edmc-ss commented Oct 25, 2020

Let me add one more tidbit... Under the saio directory, there is a Vagrantfile for launching a VM environment that can build and deploy both a single node Swift ("saio" stands for "Swift All In One") plus all of ProxyFS (indeed, including PFSAgent). There is even a Dockerfile (in saio/container) to do the same. In the Dockerfile case, you should see the startup shell file that even launches everything (look for CMD). This setup is sufficient to expose SMB, NFS, and even PFSAgent to your host or another VM/Container.

@tabeamiri
Copy link

dear "edmc-ss"
according to your comment, I built a docker image with the Dockerfile in saio/container successfully. but I could n't run a container based on that image. I used command "docker run -it --rm --device /dev/fuse --device /dev/loop0 --cap-add SYS_ADMIN -p 15346:15346 saio-pfs" as mentioned in Dockerfile and got this error "mount: /srv/swift-disk: failed to setup loop device: No such file or directory"
thanks in advance :)

@edmc-ss
Copy link
Collaborator

edmc-ss commented Oct 26, 2020

Hmm... Does your Docker HostOS have a /dev/loop0 device? Is it possibly in use by some other process? I've not seen this one...

@edmc-ss
Copy link
Collaborator

edmc-ss commented Oct 26, 2020

Ok... I think I have one theory why you might have had trouble.
It turns out that CentOS 7.4 is, despite such an explicit name, an "evolving" thing.
What happens is that this now old release "ages" out of certain locations and is archived.
Still available, references to it need to be adjusted.
You'll see a bunch of those "pinning" steps at the top of the saio/vagrant_provision.sh and
saio/container/Dockerfile files.
Anyway, the only way we discover those is when we attempt to re-provision.
As you might imagine, this is a rare event... but typically triggered by a new version of Swift.
You may notice that the 3rd line of that Dockerfile reads:
ARG SwiftVersion=ss-release-2.26.0.3
It just so happens that this change triggered an awareness of liberasurecode having moved...
So I had to rework the Dockerfile to actually build it from source.
In so doing, I believe I "broke" the Dockerfile you likely fetched from the development branch.

Fortunately, the fix was already ready-to-go... and I've just merged it to development.
If you can refetch, then docker image rm ... your build image (perhaps you also called it saio-pfs:latest) then rebuild.

BTW, I there is also a default build-arg named ProxyFS_Version that, as you see in the Dockerfile, defaults to stable. Feel free to override that with e.g. development also, so long as you have development checked out when you do your docker build, that's not really necessary.

One reason you might want to use development as your ProxyFS_Version is because you are trying out PFSAgent. Of all the parts of ProxyFS, it's basically PFSAgent that is changing at this point... And, indeed, the latest tag (1.17.0) now at the head of branch stable picked up some but not the most recent of those changes. Suffice it to say that our testing has hit upon issues with 1.17.0... Some may have been eradicated on HEAD of development... but PFSAgent is still very much a work-in-progress.

Please let us know if you've gotten past the "No /dev/loop" issue with or without these proposed updates...

@tabeamiri
Copy link

thanks a million, I successfully build and run my docker container.

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

3 participants