Glusterfs Introduction to Distributed File system usage

Source: Internet
Author: User
Tags glusterfs gluster
0 Terminology Introduction Glusterfs is an open source Distributed file system. More features refer to the reference documentation for the appendix.
A storage unit in the BRICK:GFS, through an export directory of servers in a trusted storage pool. Can be identified by host name and directory name, such as ' Server:export ' Client: The device on which the GFS volume is mounted Extended attributes:xattr is a file system feature that supports user or program associated files/directories and metadata. Fuse:filesystem Userspace is a loadable kernel module that allows non-privileged users to create their own file systems without needing to modify kernel code. The code that runs the file system through the user space is bridged with the kernel through the fuse code. Each file or directory in the Geo-replication Gfid:gfs volume has a unique 128-bit data associated with it that simulates the inode Namespace: each gluster volume exports a single NS as the POSIX mount point node: A device with several brick RDMA: Remote Direct memory access that supports direct memory access not through the two OS. Rrdns:round Robin DNS is a way to return different devices through DNS rotation for load balancing self-heal: Used for background running to detect inconsistencies in files and directories in the replica volume and to resolve these inconsistencies. Split-brain: A profile of the Translator:Volfile:glusterfs process, usually located in/var/lib/glusterd/vols/volname Volume: A set of bricks logical collections
1 Gluster Installation [Plain]View Plain copy print? #安装依赖工具 Yum install xfsprogs wget yum install fuse fuse-libs #格式化磁盘并创建GFS分区 fdisk/dev/sdb mkfs.xfs-i size=512 /DEV/SDB1 mount/dev/sdb1/mnt/sdb1 #安装gluster wget http://download.gluster.org/pub/gluster/glusterfs/LATEST/CentOS/ Gluster-epel.repo-o/etc/yum.repo.d/glusterfs.repo yum Install glusterfs{,-server,-fuse,-geo-replication} # Start Glusterfs/etc/init.d/glusterd start/etc/init.d/glusterd stop #如果需要在系统启动时开启glusterd chkconfig glusterd on

2 Cluster Management
Before you create a volume, you need to group a set of storage devices into a storage pool that is composed of the bricks provided by the storage device. After Glusterd is started on the device, the device can be added to the storage pool through the host name or IP address of the device. [Plain]View Plain copy print? $gluster peer probe Host|ip $gluster peer status #查看除本机外的其他设备状态 $gluster peer detach Host|ip #如果希望将某设备从存储池中删除

Gluster generates a UUID for each node to identify, so if the IP or hostname of the node changes, only the peer probe needs to be re-executed. However, if a host name has been used, want to change back, then Gluster will be prompted to have been saved. At this point the node can only be detach off, and then re-probe.
3 Volume The transport protocol that manages the data supports the TCP and InfiniBand RDMA protocols.
3.1 Volume Type 3.1.1 Distributed volume
A distributed volume can store a file randomly in a brick within a volume, typically for extended storage capabilities, and does not support data redundancy. Unless the underlying brick uses external redundancy measures such as raid. [Plain]View Plain copy print? $gluster Volume Create Mamm-volume node1:/media node2:/media node3:/media ...


3.1.2 Replicated Volume
The replica volume can specify the number of replicas when it is created, and the replicas are stored on different brick of the volume, so a few replicas must provide at least multiple brick. [Plain]View Plain copy print? $gluster Volume Create Mamm-volume repl 2 Node1:/media Node2:/media

Note: When creating a replica volume, the number of brick must be equal to the replica count, otherwise an error will be made. Also, if multiple brick are available on the same node, you can create replica volumes on the same nodes, but this is not safe because a device is hung up and all the brick above it cannot be accessed.
3.1.3 Striped Volume
A fragmented volume divides a single file into small chunks (block size support configuration, defaults to 128K), and then stores the small blocks on different brick to improve file access performance. [Plain]View Plain copy print? $gluster volume Create Mamm-volume stripe 2 Node1:/media Node2:/media

Stripe parameters indicate the number of locations of the slices note: The number of brick must be equal to the number of distribution locations
3.1.4 Distribute Replication Volume
This type of volume is an extension of the base replica volume, and you can specify several brick to form one replica volume, and several brick to form another replica volume. A single file remains replicated within the replica volume, and different files are distributed between different replica volumes. [Plain]View Plain copy print? $gluster Volume Create Dr-volume repl 2 node1:/exp1 node2:/exp2 node3:/exp3 NODE4:/EXP4

Note: The composition of the replica volume depends on the order of the specified brick brick must be n times the number of replicas K, and the brick list will be a group of K, forming n replica volumes
3.1.5 Distribute Striped Volume
Similar to a distributed replica volume, a volume of this type is created if the node of the created volume provides a bricks number of stripe n times. [Plain]View Plain copy print?

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.