Windows Mount Gluster replicated volumes

Source: Internet
Author: User
Tags glusterfs gluster

Tag:mina   reader    file     pattern matching    software    stat   cmd    explain     avoid    



-T Glusterfs 127.0.0.1:/gv1/mnt[[email protected] mnt]# df-hFilesystem Size used Avail use% mountedon/dev/mapper/volgroup-lv_root 18G 817M 16G 5%/TMPFS 491M 0 491M 0/dev/shm/dev/sda1 477M 28M 425M 7%/ boot/dev/sdb1 5.0G 33M 5.0G 1%/storage/brick1127.0.0.1:/gv1 10G 65M 10G 1%/mnt

1, windows2012 R2 mount, add NFS Client

[[email protected] mnt] # ifconfig eth0|grep "inet addr"  #gluster IP address          inet addr:192.168.120.128  bcast:192.168.120.255  mask:255.255.255.0

2,cmd under mount 192.168.120.128:/gv1 Z:

Successfully mount, open my brain, you can see the Z: Disk in your network location

Explanation: GV1 is a shared directory, Z is a mounted network drive letter

3. un-mount:

Directly inside my Computer mouse click Unmap Network drive Z:

Or: Win+r->cmd

Input: umount X:

(umount-a cancel all network drives)

4. Modify Windows-to-NFS partition read-only properties

After the Windows NFS client uses the Mount command to mount the NFS service, the file system is read-only to win, cannot write to the file, and cannot create a new folder, using the Mount command to see the following status:

You can see that uid=-2 because the NFS file system that is shared on the storage device is rooted in root and cannot modify the owning user, and Windows writes through the Uid=-2 user, it must not be written in.

The solution is to allow win to change the UID and GID to 0 when mounting NFS: Open registry: hkey_local_machine\software\microsoft\clientfornfs\currentversion\ Default, add two items: Anonymousuid,anonymousgid,

Restart your computer and mount again. At this point, the NFS file system can be read and written under Win7, just like a local disk.

View the Mount property as follows:

The specific usage of the Mount command under win is as follows:

Open a network disk, the default is more. trashcan, this file default Linux is not, this is the gluster Recycle Bin, this is the 3.7 version of the feature

Trashcan

Temporarily save deleted data, you can specify the time period of deletion, avoid deleting files by mistake

Trash Translator for GlusterFS

Here is the main introduction of the function of Trash translator, Trash translator to remove from the glusterfs volume of files to provide a temporary storage place, is equivalent to the deleted files to provide a recycle Bin, can help users get and recover data that is temporarily deleted. Each block retains a hidden directory. Trash, it will be used to store files that have been deleted from each block. This translator will also enhance functionality to support the recovery of deleted files.

The directory name of the Recycle Bin should be configurable. Trash translator can also be used for internal operations such as self-healing and rebalancing of self-winding. Trash Translator is designed to intercept unlink (file deletion), truncate (file compression), Ftruncate (folder compression), RmDir (directory deletion) and so on, to make a copy of the target file in the Trash directory, Then perform the appropriate action on the original file.

During the removal of the operation, trash translator will intercept the unlink call, and then check whether it matches the exclusion pattern (eliminate pattern), if the file to be manipulated and the exclusion pattern match, The translator then continues to execute the unlink call, deleting the file directly, without saving it to the. Trash directory.

However, if the file and exclusion modes to be manipulated do not match, the file performs a stat operation, and after success, trash translator will establish the same path as the path to the file under the. Trash directory.

The truncate and ftruncate operations are to compress or enlarge the size of a file to a fixed value. The only difference is that under the truncate operation, we provide the file path name but in ftruncate case we use the file descriptor. As a result, ftruncate can handle files that have already been opened.

When trash translator intercepts a truncate/ftruncate call, a new file is created in trash, and the contents of the original file are copied to the new file by using the READV and Writev function calls. Once all content has been copied late, trash translator will continue to execute the TRUNCATE call on the original file.

Files saved in the Trash directory are time-stamped in order to maintain the version in case the same file is executed again and again truncated/deleted operation.


Windows Mount Gluster replicated volumes

Related Article

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.