Friday, July 6, 2018

gitlab 11 - Keep git data on partition or external hard disk

gitlab change git data path in gitlab 11

1. Mount the partition or external hark disk on the system. It should be accessible by absolute path like /home/partition or /mnt/nfs etc

2. Open file /etc/gitlab/gitlab.rb and data dir path in it.


git_data_dirs({
  "default" => { "path" => "/mnt/nfs/gitlab/git-data" },
  "storage" => { "path" => "/mnt/nfs/gitlab/git-data" },
}) 

It depends on your path.

Reconfigure gitlab.
gitlab-ctl reconfigure

Now you will not get 500 or 502 error and Repositories will be accessed from defined path. 

Note : gitlab completely deprecated git_data_dir "/git-data/path" parameter in gitlab 11.
You need to use path like mentioned above. If you do not change the attribute, you will not be able to reconfigure gitlab successfully.

Friday, June 15, 2018

Failed to add /run/systemd/ask-password to directory watch: No space left on device

Solution :


echo 1048576 > /proc/sys/fs/inotify/max_user_watches

The long-term fix is to edit the file /etc/sysctl.conf to include the line:

fs.inotify.max_user_watches=1048576
Reload Kernel.
sysctl -p
Reload settings from all system configuration files.

Type the following command to reload settings from config files without rebooting the box:

sysctl --system

Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found

Solution :
Your gcc is older and you need to upgrade new.

If you are using centos, here is the procedure to upgrade gcc
wget https://ftp.gnu.org/gnu/gcc/gcc-8.1.0/gcc-8.1.0.tar.gz
yum install libmpc-devel mpfr-devel gmp-devel zlib-devel*
./configure --with-system-zlib --disable-multilib --enable-languages=c,c++
make -j 8
make install