Mount volume in glusterfs

Source: Internet
Author: User
Tags glusterfs gluster

 

Glusterfs provides maximum flexibility: You can use various existing protocols to output storage volumes. It supports glusterfs clients, CIFS, NFS, and WebDAV protocols.

Reference: http://hi.baidu.com/wongxuelei/blog/item/cd32e62e6bc16c434ec22696.html official website has based on glusterfs, NFS, CIFS volume mount example, in the previous glusterfs cluster environment to build an article, also with glusterfs and CIFS mounted volume, in the article on building the win NFS client, I mounted volume with NFS. If you are interested, read the previous article. The following describes how to mount volume1 with WebDAV, install Apache server sudo apt-Get install apache2. open the Dav module library

Sudo a2enmod dav_fs

Sudo a2enmod Dav

Sudo a2enmod dav_lock

3. Create a WebDAV virtual directory

Mkdir/var/www/Sync

4. Create a user name and password

Sudo htpasswd-C/var/www/pwd. Dav test # Where test is the user name

5. modify the configuration file

Sudo CP/etc/apache2/sites-available/default/etc/apache2/sites-available/default-Backup # back up the original configuration file

Sudo gedit/etc/apache2/sites-available/Default

Alias/shared/var/www/Sync # obtain an alias for the newly created shared directory <location/shared> Dav on # Start davauthtype basicauthname "testdav" # provide external service name authuserfile/ var/www/pwd. dav # password file storage path require valid-user # specify to require user verification </location> # the password file is used only when user verification is required

 

For the construction of WebDAV in Ubuntu, you can refer to the following articles and write detailed references: 1. snapshot 1. enter http: // 192.168.30.6/shared in the address bar of the browser to access the service, shared is the location name in/etc/apache2/sites-available/default or/etc/apache2/sites-enabled/000-default, at first, I thought it was WebDAV (the directory is located in/var/www/WebDAV), and entered http: // 192.168.30.6/WebDAV. Therefore, I cannot access it until I access this address through a browser, the user name and password are displayed. After correct input, you can see the files in the shared directory. However, this file can only be used for access and cannot be added, deleted, or modified, /etc/apache2/sites-enabled/000-default is a quick connection of/etc/apache2/sites-available/default, which can be changed to 2. someone said on the Internet that you can use net use M: http: // 192.168.30.6/shared to establish a ing, whether through commands in DOS or directly by ing the network drive, I tried and couldn't even connect.
References: 1. listen "network error 67" III. XP can be accessed through a network neighbor. It can be copied, pasted, or deleted, but cannot be modified online. You need to copy the modified file from the network neighbor. After modification, paste it to this location to overwrite the original file references: 1. http://jakarta.apache.org/slide/xp.html2.http://blog.dreamhosters.com/kbase/index.cgi? Area = 2913 4. I have read several articles on the Internet. Ubuntu can install cadaver to access WebDAV. After I install it, sudo apt-Get install cadaver,

Cadaver http: // localhost/WebDAV/always reports error 405. For details, refer to the following:
Cocould not access/WebDAV/(not WebDAV-enabled ?) :
405 method not allowed
Connection to 'localhost' closed.
I found some relevant information on the Internet and failed to solve the problem. After successfully connecting to WebDAV via a network neighbor on XP, I found out that the address was incorrect, the correct information should be cadaver http: // localhost/shared/, because the loctioan name set in the configuration file is connected and enters the Dav terminal, you can enter help to view related commands, including get, put, edit, and move commands.

For Ubuntu, you can use places-> connect to server... -> after you select WebDAV (HTTP) as the service type, enter the URL and/shared, which corresponds to the integrated configuration <location/shared>, enter the user name test, connect, and password, the connection is successful. on this page, addition, deletion, modification, and query are supported.

5. I have not figured out this problem, that is, the permission to share the directory files. On the service machine, chown-r test: Test/var/www/WebDAV, after creating a file in the shared directory on the client, check the file LS-L on the server, whether it is created through the XP Network Neighbor or the file created through the Ubuntu client, we can see that the user is www-data: www-data, but this user is not on the local machine. When I set up the WebDAV environment, I found this problem, when sudo chown www-data: www-data/var/www/WebDAV is used, no error is prompted on Ubuntu server, but an error is reported on Ubuntu Desktop, the user prompts that no www-data is available to mount the volume of glusterfs through WebDAV. refer:
1. http://www.gluster.com/community/documentation/index.php/Client_Installation_and_Configuration
2. http://www.gluster.com/community/documentation/index.php/Running_Apache_with_Glusterfs

After reading about it, you must first know how to access volume through Apache by mounting volume through WebDAV:
1. mount volume directly on the server side to a physical directory, and then set this directory to the directory of Apache WebDAV. Then, Windows can establish an HTTP WebDAV access through a network neighbor, this method is similar to Samba. First, Mount volume to a physical directory, then set Samba to export the mounted directory, in this way, windows can be accessed through the CIFS protocol, that is, the network neighbors.

2. Mount volume to a virtual mount point through the configuration file, and then add the file to the environment variable started by Apache.

I personally think that the WebDAV Method is similar to the CIFS protocol. You need to mount volume to a physical directory on the glusterfs server and then put this directory in Apache to implement its universal cross-platform performance, if you use the glusterfs protocol or NFS protocol, you do not need to mount it on the server, but you cannot mount it on Windows. Even if you have installed the Windows NFS client, only shared directories on the NFS server can be mounted. Volume cannot be mounted and cross-platform performance cannot be achieved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.