Posts

Showing posts with the label unix

Space reclamation / UNMAP on RHEL or CentOS 7

What is Space Reclamation? This feature supports Thin Provisioned environment, and it is the process of freeing space from the storage system that has already been freed from the host file system. A host file system contains metadata to keep track to know which blocks are available to store new data and which blocks contain actual data and must not be overwritten. This metadata is stored within the LUN. When a file is deleted in the host file system, the file system metadata is updated to mark that file's blocks as free space. Total file system free space is then recalculated to include the newly-freed blocks. To the storage system, these metadata updates appear no different than any other writes being performed by the host. Therefore, the storage system is unaware that any deletions have occurred. What is Unmapping? Unmapping is a process which de-allocates relationship between LBA and a physical block in a logical unit. Reclamation within RHEL and CentOS: RHEL / Ce...

Difference between /var/log/messages and /var/log/dmesg log files

/var/log/messages – This file contains global system messages, including the messages that are logged during system startup. There are several things that are logged in /var/log/messages including mail, cron, daemon, kern, auth, etc. [root@localhost ~]# cat /var/log/messages Apr 17 20:30:03 localhost rsyslogd: [origin software="rsyslogd" swVersion="8.24.0-34.el7" x-pid="9423" x-info="http://www.rsyslog.com"] rsyslogd was HUPed Apr 17 20:40:02 localhost systemd: Started Session 9 of user root. Apr 17 20:40:32 localhost dhclient[9217]: DHCPREQUEST on ens33 to 192.168.189.254 port 67 (xid=0xde4e9a7) Apr 17 20:40:32 localhost dhclient[9217]: DHCPACK from 192.168.189.254 (xid=0xde4e9a7) Apr 17 20:40:32 localhost NetworkManager[8908]: <info>  [1555513832.8097] dhcp4 (ens33):   address 192.168.189.128 Apr 17 20:40:32 localhost NetworkManager[8908]: <info>  [1555513832.8107] dhcp4 (ens33):   plen 24 (255.255.255.0) Apr 17 20:40:32 ...

What are /dev/zero and /dev/null files ?

"/dev/zero" and "/dev/null" are two dummy devices files which are useful for creating empty files. "/dev/zero":   It is used to create a file with no data but with required size(A file with all zero’s written on it). Let's create file with /dev/zero [root@localhost ~]# dd if=/dev/zero of=/opt/zero.txt bs=2048 count=2048 2048+0 records in 2048+0 records out 4194304 bytes (4.2 MB) copied, 0.150465 s, 27.9 MB/s it creates a file that has continuous zeros in it. So we can say that /dev/zero is a file which is used to create a new file with some required size without any meaning to the data. "/dev/null": This file is useful in cases like redirecting unwanted output/error etc to this file. Actually it acts as a black hole which absorbs this unwanted input. So whenever you feed some data to this file, you can not retrieve the data which is fed to it. This file even useful for creating files with zero size. e.g. If you see i h...