(参考:日経Linux を参考にしました)
Linux、Mac 向け、分散ファイルシステム、MooseFS。
以下のような特徴があります。
sudo yum -y install gcc zlib zlib-devel
sudo groupadd mfs sudo useradd -g mfs mfs
tar xzfv mfs-1.6.27.tar.gz
cd mfs-1.6.27 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --with-default-user=mfs --with-default-group=mfs make sudo make install
cd /etc/mfs/ sudo cp mfsmaster.cfg.dist mfsmaster.cfg sudo cp mfsexports.cfg.dist mfsexports.cfg
cd /var/lib/mfs/ sudo cp metadata.mfs.empty metadata.mfs
sudo /usr/sbin/mfsmaster start sudo /usr/sbin/mfscgiserv
sudo yum -y install gcc zlib zlib-devel
sudo groupadd mfs sudo useradd -g mfs mfs
tar xzfv mfs-1.6.27-1.tar.gz
cd mfs-1.6.27 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --with-default-user=mfs --with-default-group=mfs make sudo make install
cd /etc/mfs/ sudo cp mfsmetalogger.cfg.dist mfsmetalogger.cfg
sudo /usr/sbin/mfsmetalogger start
sudo /usr/sbin/mfsmetalogger start sudo mfsmount /mnt/mfsmeta -o mfsmeta,nonempty -H mfsmaster
sudo yum -y install gcc zlib zlib-devel
sudo groupadd mfs sudo useradd -g mfs mfs
tar xzfv mfs-1.6.27-1.tar.gz
cd mfs-1.6.27 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --with-default-user=mfs --with-default-group=mfs make sudo make install
cd /etc/mfs/ sudo cp mfshdd.cfg.sample mfshdd.cfg sudo cp mfschunkserver.cfg.sample mfschunkserver.cfg
cd /etc/mfs/ sudo cp mfshdd.cfg.dist mfshdd.cfg sudo cp mfschunkserver.cfg.dist mfschunkserver.cfg
# mount points of HDD drives # #/mnt/hd1 #/mnt/hd2 #etc. /mnt/f-dra
sudo /usr/sbin/mfschunkserver start
sudo apt-get install gcc zlib1g zlib1g-dev fuse libfuse-dev
sudo groupadd mfs sudo useradd -g mfs mfs
tar xzfv mfs-1.6.27-1.tar.gz cd mfs-1.6.27 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --with-default-user=mfs --with-default-group=mfs --disable-mfsmaster --disable-mfschunkserver --enable-mfsmount make sudo make install
sudo mkdir /mnt/mfs
sudo mfsmount /mnt/mfs -H mfsmaster
tar xzfv mfs-1.6.27-1.tar.gz cd mfs-1.6.27 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --with-default-user=mfs --with-default-group=mfs --disable-mfsmaster --disable-mfschunkserver --enable-mfsmount make sudo make install
sudo mkdir /mnt/mfs
sudo mfsmount /mnt/mfs -H mfsmaster
mfsgetgoal /mnt/mfs/
mfssetgoal -r 3 /mnt/mfs/
sudo /usr/sbin/mfsmetalogger stop sudo mfsmaster -a cd /etc/mfs/ sudo cp mfsmaster.cfg.dist mfsmaster.cfg sudo cp mfsexports.cfg.dist mfsexports.cfg sudo /usr/sbin/mfsmaster start sudo /usr/sbin/mfscgiserv &
sudo find /mnt/mfs/ -type f -print0 | xargs -0 mfscheckfile | grep -b1 "chunks with 0 copies:" | grep :$ | sed 's/:$//g'
sudo find /mnt/mfs/ -type f -print0 | xargs -0 mfscheckfile | grep -b1 "chunks with 0 copies:" | grep :$ | sed 's/:$//g' > mfs_missing.log
<?php $fp = fopen("mfs_missing.log", "r"); $sh_detail=""; while ($line = fgets($fp)) { $fileName=substr($line,8,strlen($line)-9); $sh_detail=$sh_detail."mfssettrashtime 1 \"".trim($fileName)."\"\n"; $sh_detail=$sh_detail."rm \"".trim($fileName)."\"\n"; } fclose($fp); $fp = fopen("mfs_delete_log.sh", "w"); fwrite($fp, $sh_detail); fclose($fp); ?>
151342-/mnt/mfs/backup/ozubuntu1204_rsync/var/var/www/index.html 151437-/mnt/mfs/backup/ozubuntu1204_rsync/var/var/tmp/kdecache-dramsuko/ksycoca4stamp
mfssettrashtime 1 "/mnt/mfs/backup/ozubuntu1204_rsync/var/var/lib/dpkg/info/libnss-mdns.md5sums" rm "/mnt/mfs/backup/ozubuntu1204_rsync/var/var/lib/dpkg/info/libnss-mdns.md5sums"
sudo find /mnt/mfsmeta/trash/ -name "*|data|*" -print0 | xargs -0 rm -fv
sudo ls /mnt/mfsmeta/trash/ sudo mv /mnt/mfsmeta/trash/00000014\movie.mov /mnt/mfsmeta/trash/undel
sudo find /mnt/mfsmeta/trash/ -name "*|data|*" | xargs -i mv -v {} /mnt/mfsmeta/trash/undel/
sudo yum install fuse-libs sudo rpm -ivh mfs-client-1.6.27-18.1.i386.rpm
mfs-client-1.6.27-18.1.i386.rpm
mfsmount /mnt/mfs fuse mfsmaster=mfsmaster.hogehoge.com,_netdev 0 0
mfsmount /mnt/mfs fuse defaults,mfsdelayedinit,mfsmaster=mfsmaster.tar3.net,mfsport=9421 0 0
mfsmount /mnt/mfs fuse defaults,mfsmaster=mfsmaster.hogehoge.com,mfsport=9421 0 0
sudo mfssetquota -HS 500G dirName
mfsgetquota dirName
sudo mfsdelquota -sS dirName
このエラーにえんらい苦しめられました。
調べてもなかなか情報が無いし。。。
いろいろと試してようやくわかりました。
MATOCS_MASTER_ACK - wrong meta data id. Can't connect to master
/var/lib/mfs
chunkserverid.mfs
sudo mv /var/lib/mfs chunkserverid.mfs chunkserverid.mfs.back
sudo mfschunkserver restart
sudo groupadd -g 1001 mfs sudo useradd -u 1001 -g 1001 mfs
sudo wget -O - https://ppa.moosefs.com/moosefs.key | sudo apt-key add -
sudo wget -O - http://ppa.moosefs.com/moosefs.key | sudo apt-key add -
sudo wget -O - http://ppa.moosefs.com/stable/apt/moosefs.key > key sudo apt-key add key
sudo vi /etc/apt/sources.list
echo "deb [arch=amd64] http://ppa.moosefs.com/moosefs-3/apt/ubuntu/focal focal main" > /etc/apt/sources.list.d/moosefs.list
echo "deb http://ppa.moosefs.com/moosefs-3/apt/ubuntu/bionic bionic main" > /etc/apt/sources.list.d/moosefs.list
sudo echo "deb http://ppa.moosefs.com/moosefs-3/apt/ubuntu/trusty trusty main" > /etc/apt/sources.list.d/moosefs.list
deb http://ppa.moosefs.com/moosefs-3/apt/ubuntu/trusty trusty main
deb http://ppa.moosefs.com/stable/apt/ubuntu/trusty trusty main
deb http://ppa.moosefs.com/stable/apt/ubuntu/precise precise main
deb http://ppa.moosefs.com/stable/apt/ubuntu/maverick maverick main
deb http://ppa.moosefs.com/moosefs-3/apt/debian/wheezy wheezy main
deb http://ppa.moosefs.com/stable/apt/debian/wheezy wheezy main
deb http://ppa.moosefs.com/stable/apt/debian/squeeze squeeze main
deb http://ppa.moosefs.com/stable/apt/debian/lenny lenny main
sudo apt-get update
sudo apt-get install moosefs-master
sudo apt-get install moosefs-cgiserv
sudo apt-get install moosefs-metalogger
sudo apt-get install moosefs-chunkserver
sudo apt-get install moosefs-cli moosefs-client
http://(IP):9425/or
http://mfsmaster.hogehoge.com:9425/
(以下の作業は全て root 権限が必要です)
curl "http://ppa.moosefs.com/RPM-GPG-KEY-MooseFS" > /etc/pki/rpm-gpg/RPM-GPG-KEY-MooseFS
curl "http://ppa.moosefs.com/MooseFS-3-el8.repo" > /etc/yum.repos.d/MooseFS.repo
curl "http://ppa.moosefs.com/MooseFS-3-el7.repo" > /etc/yum.repos.d/MooseFS.repo
curl "http://ppa.moosefs.com/MooseFS-3-el6.repo" > /etc/yum.repos.d/MooseFS.repo
yum install moosefs-master moosefs-cli moosefs-cgi moosefs-cgiserv
yum install moosefs-chunkserver
yum install moosefs-metalogger
yum install moosefs-client fuse
mfsmount /mnt/mfs fuse defaults,mfsdelayedinit,mfsmaster=mfsmaster.tar3.net,mfsport=9421 0 0