In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Overview of MFS
MooseFS is a network distributed file system with fault tolerance. It distributes the data on multiple physical servers and presents a unified resource to the user.
Advantages 1, high reliability (multiple copies of data are stored on different computers) 2, dynamic expansion of capacity can be achieved by attaching new computers or hard drives 3, deleted files can be retained according to a configurable time period (a file system level recycle bin) 4, Master server cannot solve single point of failure component metadata server (Master) of MFS: responsible for managing the file system throughout the system Maintain metadata, high availability is not currently supported. Metadata log server (MetaLogger): back up the change log files of the Master server. When the master server is damaged, you can recover the files from the log server. Data storage server (Chunk Server): the more servers that actually store data, the larger the capacity, the higher the reliability, and the better the performance. Client (Client): the experimental topology diagram of the MFS file system can be mounted like NFS.
Lab environment server IP address master server 192.168.13.128log log server 192.168.13.129chunk1 server 192.168.13.130chunk2 server 192.168.13.131client client Computer 192.168.13.1321 Configure the master scheduling server [root@master ~] # systemctl stop firewalld.service # # close the firewall [root@master ~] # setenforce 0 [root@master ~] # yum install gcc gcc-c++ zlib-devel-y # # install the necessary environment components [root@master ~] # useradd-s / sbin/nologin mfs # # create the mfs system user [root@master] # mount.cifs / / 192.168.100.3/LNMP-C7 / mnt/ # # Mount [root@master ~] # cd / mnt/mfs [root@master mfs] # tar zxvf mfs-1.6.27-5.tar.gz-C / opt/ # # decompress to / opt [root@master mfs] # cd / opt/ [root@master opt] # cd mfs-1.6.27/ [root@master mfs-1.6.27] #. / configure\ # # configuration >-prefix=/usr/local/mfs\ # # installation path Path >-- with-default-user=mfs\ # # default user and group >-- with-default-group=mfs\ >-- disable-mfschunkserver\ # # disable two functions Chunkserver is required by the chunk server >-- disable-mfsmount [root@master mfs-1.6.27] # make & & make install # # compile and install [root@master mfs-1.6.27] # cd / usr/local/mfs/etc/mfs/ # # switch to the mfs configuration file directory [root@master mfs] # cp mfsmaster.cfg.dist mfsmaster.cfg # # master server configuration file [root@master mfs] # cp mfsexports.cfg.dist mfsexports. Cfg # # Mount permission profile [root@master mfs] # cp mfsmetalogger.cfg.dist mfsmetalogger.cfg # # Log configuration file [root@master mfs] # cd / usr/local/mfs/var/mfs/ [root@master mfs] # cp metadata.mfs.empty metadata.mfs # # metadata file [root@master mfs] # ln-s / usr/local/mfs/sbin/* / usr/local/sbin # # command makes it easy for the system to identify [root] @ master mfs] # chown-R mfs.mfs / usr/local/mfs/ # # give mfs directory master group permission [root@master mfs] # mfsmaster start # # enable the service # # turn it off to mfsmaster-s [root@master mfs] # ps-elf | grep mfs # # check whether the service is enabled 2 Configure metalogger log server # # download metadata.mfs.back from master and restore the entire mfs by default 24 hours You need to get the file [root@log ~] # systemctl stop firewalld.service [root@log ~] # setenforce 0 [root@log ~] # yum install zlib-devel gcc gcc-c++-y [root@log ~] # useradd-s / sbin/nologin mfs [root@log ~] # mount.cifs / / 192.168.100.3/LNMP-C7 / mnt/Password for root@//192.168.100.3/LNMP-C7: [root@log ~] # cd from the log server / mnt/mfs/ [root@log mfs] # tar zxvf mfs-1.6.27-5.tar.gz-C / opt/ [root@log mfs] # cd / opt/ [root@log opt] # cd mfs-1.6.27/ [root@log mfs-1.6.27] #. / configure\ # # configuration >-- prefix=/usr/local/mfs\ # # installation path >-- with-default-user=mfs\ # # default user And group >-- with-default-group=mfs\ >-- disable-mfschunkserver\ # # disable the two functions These two functions are required by the chunk server >-- disable-mfsmount [root@log mfs-1.6.27] # make & & make install # # compile and install [root@log mfs-1.6.27] # cd / usr/local/mfs/etc/mfs/ [root@log mfs] # cp mfsmetalogger.cfg.dist mfsmetalogger.cfg # # copy configuration file template [root@log mfs] # vim mfsmetalogger.cfg # # Edit configuration file MASTER_HOST = 192.168.13.128 # # specify the master server address [root@log mfs] # ln-s / usr/local/mfs/sbin/* / usr/local/sbin/ # # command to facilitate the system to recognize [root@log mfs] # mfsmetalogger start # # enable service 3 Configure chunk1 2 Storage server (the two chunk servers operate in the same way) [root@chunk01 ~] # systemctl stop firewalld.service [root@chunk01 ~] # setenforce 0 [root@chunk01 ~] # yum install zlib-devel gcc gcc-c++-y [root@chunk01 ~] # useradd-s / sbin/nologin mfs [root@chunk01 ~] # mount.cifs / / 192.168.100.3/LNMP-C7 / mnt/Password for root@//192.168.100.3/LNMP-C7: [root@ Chunk01 ~] # cd / mnt/mfs/ [root@chunk01 mfs] # tar zxvf mfs-1.6.27-5.tar.gz-C / opt/ [root@chunk01 mfs] # cd / opt/mfs-1.6.27/ [root@chunk01 mfs-1.6.27] #. / configure\ >-- prefix=/usr/local/mfs\ >-- with-default-user=mfs\ >-- with-default-group=mfs\ >-- disable-mfsmaster\ # # disable master function > -- disable-mfsmount [root@chunk01 mfs-1.6.27] # make & & make install [root@chunk01 mfs-1.6.27] # cd / usr/local/mfs/etc/mfs/ [root@chunk01 mfs] # cp mfschunkserver.cfg.dist mfschunkserver.cfg # # copy profile template [root@chunk01 mfs] # cp mfshdd.cfg.dist mfshdd.cfg [root@chunk01 mfs] # vim mfschunkserver.cfgMASTER_HOST = 192.168.13.128 # # add master Service Device address [root@chunk01 mfs] # vim mfshdd.cfg## Last Line add / data # # Storage Space [root@chunk01 mfs] # mkdir / data # # create Storage Space [root@chunk01 mfs] # chown-R mfs.mfs / data/ # # give mfs master group permission [root@chunk01 mfs] # ln-s / usr/local/mfs/sbin/* / usr/local/sbin/ [root@chunk01 mfs] # mfschunkserver start # # enable Service 4 Configure client client [root@client ~] # systemctl stop firewalld.service [root@client ~] # setenforce 0 [root@client ~] # yum install gcc gcc-c++ zlib-devel-y [root@client ~] # mount.cifs / / 192.168.100.3/LNMP-C7 / mnt/Password for root@//192.168.100.3/LNMP-C7: [root@client ~] # cd / mnt/mfs/ [root@client mfs] # tar zxvf fuse-2.9.2. Tar.gz-C / opt/ # # client and master mount module [root@client mfs] # cd / opt/fuse-2.9.2/ [root@client fuse-2.9.2] #. / configure # # configure [root@client fuse-2.9.2] # make & & make install # # compile and install [root@client fuse-2.9.2] # vim / etc/profile # # configure environment variable # # add export on the last line PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_ path [root @ client fuse-2.9.2] # source / etc/profile # # refresh configuration file [root@client fuse-2.9.2] # useradd-s / sbin/nologin mfs [root@client fuse-2.9.2] # cd / mnt/mfs/ [root@client mfs] # tar zvxf mfs-1.6.27-5.tar.gz-C / opt/ [root@client mfs- 1.6.27] #. / configure\ >-- prefix=/usr/local/mfs\ >-- with-default-user=mfs\ >-- with-default-group=mfs\ >-- disable-mfsmaster\ # close master and chunkserver >-- disable-mfschunkserver\ >-- enable-mfsmount # # enable mount [root@client mfs-1.6.27] # make & & make install [root@client mfs-1.6.27] # mkdir / opt/mfs # # create mount Click [root@client mfs-1.6.27] # modprobe fuse # # to load fuse into the kernel [root@client mfs-1.6.27] # / usr/local/mfs/bin/mfsmount / opt/mfs-H 192.168.13.128 # # mount [root@client mfs-1.6.27] # df-hT # # View 192.168.13.128Viru 9421 fuse.mfs 32G 032G 0 0 / opt/mfs5 Optimize client [root@client mfs-1.6.27] # vim / etc/profile## add export PATH=/usr/local/mfs/bin:$PATH [root@localhost mfs-1.6.27] # source / etc/profile [root@localhost mfs-1.6.27] # mfsgetgoal-r / opt/mfs # # make a copy 6 View [root@chunk01 mfs] # cd / data/ [root@chunk01 data] # ls # # on the chunk server has planned the distribution structure 00 0E 1C 2A 38 46 54 62 70 E 8C 9A 01 0F 1D 2B 39 47 55 63 71 7F 8D 9B 02 10 1E 2C 3A 48 56 64 72 80 8E 9C 03 11 1F 2D 3B 49 57 65 73 81 8F 9D 7 Start the monitor program on the master server [root@master mfs] # mfscgiserv # # start the monitor program # # View the server and disk on the browser
Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.