Ansible 入門 - 応用

こちらの記事はではAnsibleを紹介するための文章で、元Red Hat社員のJingjing Shiが作成し、Wenhan Shiが日本語に翻訳

Ansible 入門 - 紹介

こちらの記事はではAnsibleを紹介するための文章で、元Red Hat社員のJingjing Shiが作成し、Wenhan Shiが日本語に翻訳

The difference between server-side healing and client-side healing in GlusterFS

There are 2 kinds of healing functions in GlusterFS, server-side heal and client-side heal. Server side heal is automatically executed by self-heal daemon on all gluster server nodes. It does healing by crawling file/directory information from .glusterfs directory on brick path. So it will keep the file-data and meta-data to be consistent from server side. Client side heal is different, it will triggers heal for the particular file whenever client accesses files from mount path, which means a file operation on file descriptor.

failed at yum update and how to fix it

I hit an error when running yum update on my centOS 7, the command failed to update my OS! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 # yum update Loaded plugins: fastestmirror Determining fastest mirrors * base: centos.gbeservers.com * epel: linux.mirrors.es.net * extras: linux.mirrors.es.net * ius: hkg.

Docker basic foundation

Base on CentOS 7, Docker 1.12.6 Install Docker Some pre-requirment to install Docker to a Linux OS. Docker only can be installed on a 64 bit OS. Kernel version over 3.10 is recommended. recommend Need to enable cgroup and namespace. Now it is easier to install Docker in CentOS or Fedora, it can be searched by yum command like below: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 # yum search docker | grep ^docker docker-client.

How to disable IPv6 inside a container/pod in OpenShift

Although the container/pod in OpenShift transfer data by IPv4 protocol, and you do not need to worry about the setting of IPv6. But in some case people want to disable IPv6 inside the container without effecting other container/pods or host OS. Here is an example of the IPv6 info outputed from a container. 1 2 3 4 5 6 7 8 9 10 11 12 13 [root@ocp37 ~]# oc exec django-ex-4-6gmsj -- ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.

Gluster filename and GFID interconversion

create test file Mount gluster volume and create a file 1 2 3 4 [root@client-1 ~]# mount -t glusterfs gluster-node-1:/vol /mnt [root@client-1 ~]# mkdir -p /mnt/hoge/hello-gluster/ [root@client-1 ~]# touch /mnt/hoge/hello-gluster/file [root@client-1 ~]# umount /mnt/ Get GFID of a file in Gluster volume From brick directory Login to gluster node and locate file in brick directory. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [root@gluster-node-1 ~]# gluster volume info vol Volume Name: vol Type: Replicate Volume ID: 4ac36bcc-7127-48c4-ac21-421850d8bc47 Status: Started Snapshot Count: 0 Number of Bricks: 1 x 3 = 3 Transport-type: tcp,rdma Bricks: Brick1: gluster-node-1:/gluster/brick-vol <-- confirm the brick path Brick2: gluster-node-2:/gluster/brick-vol Brick3: gluster-node-3:/gluster/brick-vol Options Reconfigured: performance.

AWK - time functions

Apart of date, awk also has below built-in time functions which will help you to resolve time convert problem systime() This will return the current time as the number of seconds since the Epoch (1970-01-01 00:00:00). 1 2 3 4 $ awk 'BEGIN { > print "Number of seconds since the Epoch = " systime() > }' Number of seconds since the Epoch = 1511480989 mktime(YYYY MM DD HH MM SS) This will convert date string “YYYY MM DD HH MM SS” to the number of seconds since the Epoch.

How to check if a disk is SSD or HDD

Linux will detects SSD automatically. Since kernel version 2.6.29, you can check /dev/sda with following command 1 # cat /sys/block/sda/queue/rotational The return number 0 shows you /dev/sda is a SSD, and 1 shows it is a HDD. Note that this command may not work when your disk is created by hardware RAID. Another way is to use lsblk command, a part of the util-linux package. 1 2 3 4 # lsblk -d -o name,rota NAME ROTA sda 0 sdb 1 ROTA means rotational device, 1 for true, 0 for false.

How to sort ps command output

ps command has a --sort option which can help you to sort processes. 1 2 3 4 5 6 7 --sort spec Specify sorting order. Sorting syntax is [+|-]key[,[+|-]key[,...]]. Choose a multi-letter key from the STANDARD FORMAT SPECIFIERS section. The "+" is optional since default direction is increasing numerical or lexicographic order. Identical to k. For example: ps jax --sort=uid,-ppid, +pid Sort ps output by memory From high to low The highest is at the top of the command