Skip to content

Instantly share code, notes, and snippets.

@thiagooak
Created December 30, 2013 17:00
Show Gist options
  • Save thiagooak/8184732 to your computer and use it in GitHub Desktop.
Save thiagooak/8184732 to your computer and use it in GitHub Desktop.
mogilefs setup
$ mysql -u root -p
mysql> create database mogilefs;
mysql> grant all on mogilefs.* to 'mogile'@'%' identified by 'mogilepw';
mysql> flush privileges;
mysql> quit
$ mogdbsetup --yes --dbname=mogilefs --dbuser=mogile --dbpassword=mogilepw
$ cat > /etc/mogilefs/mogilefsd.conf <<EOF
daemonize = 1
db_dsn = DBI:mysql:mogilefs
db_user = mogile
db_pass = mogilepw
listen = 127.0.0.1:7001
conf_port = 7001
default_mindevcount = 1
EOF
$ su mogile -
$ mogilefsd
$ exit
$ cat > /etc/mogilefs/mogstored.conf <<EOF
daemonize = 1
httplisten = 127.0.0.1:7500
mgmtlisten = 127.0.0.1:7501
docroot = /var/mogdata
EOF
$ mkdir /var/mogdata
$ mogstored
$ cat > /etc/mogilefs/mogilefs.conf <<EOF
trackers = 127.0.0.1:7001
EOF
$ mogadm host add localhost --ip=127.0.0.1 --port=7500 --status=alive
$ mogadm device add localhost 1
$ mkdir /var/mogdata/dev1
$ mogadm device list
$ mogadm check
$ mogadm domain add westwing
$ mogadm class add westwing temp --mindevcount=1
$ cat > /etc/mogilefs/mogtool.conf <<EOF
trackers = 127.0.0.1:7001
domain = westwing
class = temp
EOF
$ mogtool inject /etc/hosts hosts
$ mogtool extract hosts -
$ mogtool delete hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment