Error in e2fsck (fsutils.c:288): e2fsck failed (exit code 4)

vzctl mount XXXX
Opening delta /vz/private/XXXX/root.hdd/root.hdd
Adding delta dev=/dev/ploopXXXX img=/vz/private/XXXX/root.hdd/root.hdd (rw)

/dev/ploop15649p1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
Error in e2fsck (fsutils.c:288): e2fsck failed (exit code 4)

Failed to mount image: Error in e2fsck (fsutils.c:288): e2fsck failed (exit code 4)
[41]

ploop check -F /vz/private/CID/root.hdd/root.hdd
ploop mount /vz/private/CID/root.hdd/DiskDescriptor.xml
fdisk -l /dev/ploopXXXXX
e2fsck -y /dev/ploopXXXX

ploop umount /vz/private/XXXX/root.hdd/DiskDescriptor.xm

Error: Multilib version problems found. This often means that the root cause is something else and multilib version checking is just pointing out that there is a problem

–> Finished Dependency Resolution
Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:

1. You have an upgrade for e2fsprogs-libs which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of e2fsprogs-libs of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
–exclude e2fsprogs-libs.otherarch … this should give you an error
message showing the root cause of the problem.

2. You have multiple architectures of e2fsprogs-libs installed, but
yum can only see an upgrade for one of those arcitectures.
If you don’t want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.

3. You have duplicate versions of e2fsprogs-libs installed already.
You can use “yum check” to get yum show these errors.

…you can also use –setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).

Protected multilib versions: e2fsprogs-libs-1.41.12-24.el6.i686 != e2fsprogs-libs-1.42.6-1.el6.x86_64
Error: Protected multilib versions: libcom_err-1.42.6-1.el6.x86_64 != libcom_err-1.41.12-24.el6.i686

Fix:

yum –disablerepo=* –enablerepo=base update

directadmin custom extension exif with php-fpm

cd /usr/local/directadmin/custombuild
mkdir /usr/local/directadmin/custombuild/custom/fpm
cp -v /usr/local/directadmin/custombuild/configure/fpm/configure.php72 /usr/local/directadmin/custombuild/custom/fpm/
cp -v /usr/local/directadmin/custombuild/configure/fpm/configure.php56 /usr/local/directadmin/custombuild/custom/fpm/

vi /usr/local/directadmin/custombuild/custom/fpm/configure.php56
#!/bin/sh
./configure \
--prefix=/usr/local/php56 \
--program-suffix=56 \
--enable-fpm \
--with-config-file-scan-dir=/usr/local/php56/lib/php.conf.d \
--with-curl=/usr/local/lib \
--with-gd \
--enable-gd-native-ttf \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-freetype-dir=/usr/local/lib \
--with-libxml-dir=/usr/local/lib \
--with-kerberos \
--with-openssl \
--with-mcrypt \
--with-mhash \
--with-mysql=mysqlnd \
--with-mysql-sock=/var/lib/mysql/mysql.sock \
--with-mysqli=mysqlnd \
--with-pcre-regex=/usr/local \
--with-pdo-mysql=mysqlnd \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xsl \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--enable-zip \
--with-iconv=/usr/local \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-sockets \
--enable-soap \
--enable-mbstring \
--with-icu-dir=/usr/local/icu \
--enable-intl \
--enable-exif

./build php n

php -i | grep exif
exif
exif.decode_jis_intel => JIS => JIS
exif.decode_jis_motorola => JIS => JIS
exif.decode_unicode_intel => UCS-2LE => UCS-2LE
exif.decode_unicode_motorola => UCS-2BE => UCS-2BE
exif.encode_jis => no value => no value
exif.encode_unicode => ISO-8859-15 => ISO-8859-15

ssh use multiplexing with rsync

This will increase rsync speed.
vi ~/.ssh/config
host *
controlmaster auto
controlpath /tmp/ssh-controlmaster-%r@%h:%p

ssh user@hostname

In other terminal:
ssh -O check user@hostname
Master running (pid=444444)

#ssh -O stop user@hostname
#ssh -O exit ser@hostname

rsync -avz -e ssh /some/path user@hostname:/some/path

print a stack trace of a running process

gstack PID

Thread 3 (Thread 0x7f196867d700 (LWP 1873)):
#0 0x00007f1988a89c6b in poll () from /lib64/libc.so.6
#1 0x00007f1983965eb9 in g_main_context_iterate.isra () from /lib64/libglib-2.0.so.0
#2 0x00007f1983965fcc in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3 0x00007f19898e0d1f in QEventDispatcherGlib::processEvents(QFlags) () from /lib64/libQt5Core.so.5

btier cache

Btier is not a cache but tiered storage that automatically moves frequently accessible data to fast(er) device.

wget http://sourceforge.net/projects/tier/files/STABLE_PRODUCTION/btier-1.3.11.tar.gz
tar -xvf btier-1.3.11.tar.gz -C /usr/src

dkms add -m btier/1.3.11
dkms build -m btier/1.3.11
dkms install -m btier/1.3.11
modprobe btier

#dkms remove -m btier/1.3.11 –all # You can remove if build was not successful

dkms status
btier, 1.3.11, 2.6.XXX, x86_64: installed

btier_setup -f /dev/sdaX:/dev/sdbX -cVz 4096
echo 0 >/sys/block/sdtiera/tier/sequential_landing
fsck -y /dev/sdtiera
mount -o discard,noatime,nodiratime /dev/sdtiera /some_dir/path

Works with Centos OS.

If you have error “Error! Could not locate dkms.conf file”

vi dkms.conf
PACKAGE_VERSION=”1.3.11″
PACKAGE_NAME=”btier”
AUTOINSTALL=”yes”
BUILT_MODULE_NAME[0]=”btier”
BUILT_MODULE_LOCATION[0]=”kernel/btier”
DEST_MODULE_LOCATION[0]=”/kernel/drivers/block”
REMAKE_INITRD=”no”
MAKE[0]=”make -Wall -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/kernel/btier modules”