Puppet module for /etc/fstab mounts

armen movsesjans's avatarawaseroot

Puppet has a native module for handling fstab mounts. Here is an example:

class data_mounted {
    mount { "/data":
        device  => "/dev/sdb1",
        fstype  => "ext4",
	ensure  => "mounted",
	options => "defaults",
        atboot  => "true",
    }
}

The “device” directive can take anything what you’d normally put in the first column of /etc/fstab, i.e. if you are mounting by label (which is probably the best way to mount partitions) then instead of “/dev/sdb1” call for “LABEL=data”, where ls -l /dev/disk/by-label/data should point to the actual [and existing] partition, which in my case is /dev/sdb1.

The “fstype” is the actual type of the partition, if you are not sure of the type you can check it with df -T. You can mount linux ext partitions, nfs, samba, 9p etc.

For more on fstab file system types and mount options check http://linux.die.net/man/8/mount

View original post

How to build Zookeeper DEB for Ubuntu14.04

You need the zookeeper 3.4.6 package for Ubuntu 14.04 LTS

 wget http://apache.arvixe.com/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz

 gzip -dc zookeeper-3.4.6.tar.gz | tar xf –

Remove

vi src/packages/deb/zookeeper.control/control

in file remove line

Depends: sun-java6-jre

You need a few packages to compile it

apt-get install python-setuptools libcppunit-dev build-essential libboost-all-dev cmake flex libtool ant

and then start build process

/zookeeper-3.4.6# ant deb

this takes a few minutes, the deb packe can be found under /build

And a complete build run

Click to access build.pdf

Some found here

https://grockdoc.com/zookeeper/3.4.6/articles/install-an-apache-zookeeper-cluster-for-production-ubuntu_3a5bdf44-9d59-45a7-9b44-d83960a0ef18

MySQL Tipps

Slow Log im Betrieb einschalten

SHOW VARIABLES LIKE ‘slow_query_log%’;

SHOW VARIABLES LIKE ‘log_queries%’;

 

SET GLOBAL slow_query_log = ‘ON’;

SET GLOBAL slow_query_log_file = ‘/var/log/mysql/mysql-slow.log’;

SET GLOBAL log_queries_not_using_indexes = ‘ON’;

Slow Log im Betrieb wieder ausschalten

SET GLOBAL slow_query_log = ‘OFF’;

SET GLOBAL slow_query_log_file = ‘/var/log/mysql/mysql-slow.log’;

SET GLOBAL log_queries_not_using_indexes = ‘OFF’;

MySQL Aborted Clients anschauen und status löschen im laufenden Betrieb

show status like ‘Aborted_clients’;

flush status;