1. It would be great if mfsmaster node will be separate node. It could be critical term if you will use moosefs in production. First of all install some needed packages which could be absent on your mchine: root@mfsmaster:~# apt-get update root@mfsmaster:~# apt-get install build-essential zlib1g-dev pkg-config   2. Add technical user/group for moosefs work: root@mfsmaster:~# groupadd mfs root@mfsmaster:~# useradd -g mfs mfs   3. Download latest versions of moosefs and fuse: root@mfsmaster:~# cd /opt root@mfsmaster:~# wget http://downloads.sourceforge.net/project/moosefs/moosefs/1.6.27/mfs-1.6.27-5.tar.gz?r=http%3A%2F%2Fsourceforg...
Published ago by ochirkov

1. Install moosefs master: Go to the directory with unpacked MoosFS and configure it: root@mfsmaster:~# cd /opt/mfs-1.6.27 root@mfsmaster:~# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --with-default-user=mfs --with-default-group=mfs --disable-mfschunkserver --disable-mfsmount root@mfsmaster:~# make && make install   2. Modify configs name: root@mfsmaster:~# cd /etc/mfs root@mfsmaster:~# cp mfsmaster.cfg.dist mfsmaster.cfg root@mfsmaster:~# cp mfsexports.cfg.dist mfsexports.cfg root@mfsmaster:~# cp mfsmetalogger.cfg.dist mfsmetalogger.cfg   3. Give permissions for mount for machines you want: root@mfsmaster:~# v...
Published ago by ochirkov

1. Install moosefs chunk server: root@moosefschunk:~# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --with-default-user=mfs --with-default-group=mfs --disable-mfsmaster --disable-mfsmount root@moosefschunk:~# make && make install   2. Modify configs name: root@moosefschunk:~# cd /etc/mfs root@moosefschunk:~# cp mfschunkserver.cfg.dist mfschunkserver.cfg root@moosefschunk:~# cp mfshdd.cfg.dist mfshdd.cfg   3. Make directory for chunks and prepare it for work: root@moosefschunk:~# mkdir -p /opt/chunks root@moosefschunk:~# vi mfshdd.cfg # mount points of HDD drives # /opt/chunks :wq root@moosefschunk:~...
Published ago by ochirkov

1. Install fuse and moosefs client: root@ansible:~# cd fuse-2.9.3/ root@ansible:~# ./configure && make && make install root@ansible:~# cd ../mfs-dir root@ansible:~# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --with-default-user=mfs --with-default-group=mfs --disable-mfschunkserver --disable-mfsmaster root@ansible:~# make && make install   2. Make directory for mount: root@ansible:~# mkdir -p /mnt/mfs root@ansible:~# chown -R mfs:mfs /mnt/mfs   3. Start client: root@ansible:~# /usr/bin/mfsmount /mnt/mfs -H mfsmaster root@apache:~# /usr/bin/mfsmount /mnt/mfs -H mfsmaster   4. Test yo...
Published ago by ochirkov

1. Install moosefs master: root@mfsmetalogger:~# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --with-default-user=mfs --with-default-group=mfs --disable-mfschunkserver --disable-mfsmount root@mfsmetalogger:~# make && make install   2. Modify configs name: root@mfsmetalogger:~# cd /etc/mfs root@mfsmetalogger:~# cp mfsmetalogger.cfg.dist mfsmetalogger.cfg   3. Start metalogger: root@mfsmetalogger:~# /usr/sbin/mfsmetalogger start   Example of output: working directory: /var/lib/mfs lockfile created and locked initializing mfsmetalogger modules ... mfsmetalogger daemon initialized properly  
Published ago by ochirkov

1. On mfsmaster machine  start CGI monitor: root@mfsmaster:~# /usr/sbin/mfscgiserv   2. Look into browser and you should see useful UI monitor: http://mfsmaster_ip:9425/   Also we could up CGI monitor with apache web server. root@mfsmaster:~# apt-get install apache2 root@mfsmaster:~# vi /etc/apache2/sites-available/default ScriptAlias /cgi-bin/ /usr/share/mfscgi/ <Directory "/usr/share/mfscgi"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny AddType text/css .css Allow from all </Directory> :wq root@mfsmaster:~# chown -R www-data:www-data /usr/share/mf...
Published ago by ochirkov

It is absolutely useful manage packages unlike deal with source code. Let's build debian packages from MooseFS source code. root@mfsmaster:~# cd /opt/mfs-1.6.27 root@mfsmaster:/opt/mfs-1.6.27# apt-get install build-essential debhelper autotools-dev libfuse-dev pkg-config root@mfsmaster:/opt/mfs-1.6.27# dpkg-buildpackage -b root@mfsmaster:/opt/mfs-1.6.27# ls -l ../ drwxr-xr-x 15 501 messagebus 4096 Mar 1 20:06 mfs-1.6.27 -rw-r--r-- 1 root root 2663 Mar 1 20:07 mfs_1.6.27-5_amd64.changes -rw-r--r-- 1 root root 784507 Feb 10 14:10 mfs-1.6.27-5.tar.gz -rw-r--r-- 1 root root 30678 Mar 1 20:07 mfs-cgi_1.6.27-5_amd64.deb -rw-r--r-- 1 root ro...
Published ago by ochirkov

Let's remove some folder and restore it from trash: root@ansible:/mnt# rm -rf /mnt/mfs/ansible root@ansible:/mnt# /usr/bin/mfsmount /mnt/mfs-test -H mfsmaster -o mfsmeta mfsmaster accepted connection with parameters: read-write,restricted_ip root@ansible:/mnt# ls -l /mnt/mfs-test/ total 0 dr-x------ 2 root root 0 Mar 2 00:09 reserved drwx------ 3 root root 0 Mar 2 00:09 trash   root@ansible:/mnt# cd /mnt/mfs-test/trash/ root@ansible:/mnt/mfs-test/trash# ls -l . -rw-r--r-- 1 root root 27 Mar 1 23:46 0000162E|ansible|test|units|inventory_test_data|inventory_dir|0hosts -rw-r--r-- 1 root root 52 Mar 1 23:46 0000162F|ansible|test|units|inventory_t...
Published ago by ochirkov

Let’s create ansible in /mnt/mfs, in which we would store files in one copy (setting goal=1): mkdir -p /mnt/mfs/ansible and ansible2, in which we would store files in one copy (setting goal=2): mkdir -p /mnt/mfs/ansible2   The number of copies for the folder is set with the mfssetgoal –r command: root@ansible:/mnt/mfs# mfssetgoal -r 1 ansible2 ansible2: inodes with goal changed: 0 inodes with goal not changed: 929 inodes with permission denied: 0 root@ansible:/mnt/mfs# mfssetgoal -r 2 ansible3 ansible3: inodes with goal changed: 929 inodes with goal not changed: 0 inodes with per...
Published ago by ochirkov

Useful way to mount moosefs on boot up of machine. We should add moosefs resource to fstab file. Let's do it: root@ansible:~# vi /etc/fstab mfsmount /mnt/mfs fuse mfsmaster=mfsmaster,mfsport=9421,_netdev 0 0 mfsmount /mnt/mfs-test fuse mfsmaster=mfsmaster,mfsport=9421,_netdev,mfsmeta 0 0   From this moment you could mount moosefs resources from shell simplier than earlier. Just specify mount point in command: mount /mnt/mfs mount /mnt/mfs-test   Also system during boot will mount these resources. _netdev option provides booting of networking daemon before moosefs resources mount process will start.
Published ago by ochirkov

Python
Web development
Review Linux
Administration
Provisioning CVS
Windows AWS
Continuous Integration
NoSql Logging Web Servers FileSystems Scala
accurev ansible apach2 apache api application approaches architecture archivation argparse arguments artifactory automation awk aws backup bash batch-scripting beaver block build built-in caching call captcha cartridge case certificates cgi chain client cloud cloudformation cluster cmd coding collections command-line commands compression conditionals conversion convert cookbook copy counter cron crud css cut cygwin daemon datatype date dd debpackage decorator delattr deploy deque dict distributed-file-systems django DNS domain driver dropbox dump elasticcache elasticsearch encryption exit ext4 extra-tags failover file filename filters for form format freetds functions gerrit getattribute gid git globals glusterfs hardware hook iam indexing inheritance init install job-interview jquery ldap linux list locals logging logs logstash lookup magicmethods mail main-menu metadata metalogger mongodb moosefs mount mssql multiplatform multithreading mysql netcat nginx nosql open-ssh openldap openshift os packaging parse partition path pattern patterns permissions pid pil pip pipe playbook pool post post-commit processes production provisioning proxy putty python python-mysql recursively redirection redis register replication repr restore return review rotation scala script search selenium server setattr settings setup shipper signals singleton slots snapshot socket splunk ssh ssh-key ssl storage str string style subprocess sugar super switch syntactic syntaxhighlighter systeminfo tail tar templatetags time tls tune2fs tuple ubuntu unicode unique unix unixodbc usage usecases uuid uwsgi variable vars version vi virtualenv volume web web-server windows with_items __getattr__