Author: admin

  • How to check progress of the rsync job

    • You can add the progress option with rsync command:

    rsync -a --progress /media/backup-folder/
    sending incremental file list
    created directory backup

    • or you can add the -P flag in rsync command as below:

    rsync -a -P /media/backup-folder/
    sending incremental file list
    created directory backup

    Note that the -P option includes both –partial and –progress rsync options.

  • Exclude more than one directory with rsync

    To exclude a single directory with rsync use the following command

    rsync -av -e --exclude='/directory-path/' ip:/destination-folder

    rsync -av -e --exclude='/directory-path-1' --exclude='/directory-path-2/*' ip:/destination-folder

  • How to resolve rsync error: some files/attrs were not transferred

    The following error is generated when rsync is run with the -X option (preserve extended attributes)

    rsync -axHAX --delete /. /tmp/selinux/.
    rsync: rsync_xal_set: lsetxattr("selinux","security.selinux") failed: Permission denied (15)
    rsync error: some files/attrs were not transferred (see previous errors) (code 31) at main.c(1039)

    To resolve this error, filter the ‘/selinux’ filesystem from the command. Run rsync as below;

    rsync -axHAX --delete --filter="- /selinux" /. /tmp/selinux/.

    It is suggested to also excluded /var/run, /var/lock, /proc and /dev from rsync command.

     

     

  • Linux Cluster do not form membership when totem token is set to 30s or longer

    Cluster nodes can form membership if the value of totem token is 29000 ms. Once the totem token is set to value 30000 ms or above, the cluternodes fail to establish a connection between the nodes (inquorate).

    To resolve this issue, update OS to CentOS 8.3

  • Why yum module list show @modulefailsafe

    The command yum module list output @modulefailsafe

    # yum module list --disablerepo=\*
    @modulefailsafe
    Name Stream Profiles Summary
    389-ds 12 [e] 209 Directory Server (base)
    ant 1.9 [e] common Java build tool
    httpd 2.2 [e] common, devel, mini Apache HTTP Server

    In the case of local repositories, Re-build repodata either with reposync --download-metadata or modifyrepo to include the modules.yaml into the repomd.xml

    The issue is usually caused when the module metadata is not available. Unavailability of module metadata happens when the user removes a .repo file or disables a repository via –disablerepo / –repoid or repository is unavailable and has option skip_if_unavailable=true.

  • Unable to add host to cluster of hypervisors in Linux virtualization

    First of all delete host from user interface than add correct selinux context to the log file.

    chcon -t httpd_log_t /var/log/ovirt-engine/logfile.log

    restorecon /var/log/ovirt-engine/logfile.log

    Reattach host via user interface.

  • Restrict ftp user login to ftp server denying access to operating system

    When you create new users for ftp server access, do not assign shell to those users.

    # useradd -s /sbin/nologin webconn

    For existing user, use “usermod -s” to change the user’s shell to /sbin/nologin.

    # usermod -s /sbin/nologin webconn

  • How to add a binary attribute in Linux?

    At the command-line, the following syntax is used;

    attribute:< file:///FILE_FULL_PATH

    Note: There should be no space character between the colon ‘:’ and the less-than sign ‘<‘.

    As an example; jpegPhoto:< file:///home/webconn/picture.png

  • Server hangs for a long time on firewalld service shutting down or on reboot

    Add/edit following option in /etc/firewalld/firewalld.conf;

    CleanupOnExit=no

    Using option CleanupOnExit=yes in /etc/firewalld/firewalld.conf flush firewall rules and try to off-load nf_conntrack module. If server hangs, it is because something is stopping nf_conntrack module from unloading quickly.

    Try running systemctl stop firewalld and see if service hangs. If firewalld service start is success you are likely not having this issue.

  • System panic error – IPv4: Attempt to release alive inet socket | IPv4: Attempt to release TCP socket in state 1 [kernel address]

    The main reason for this system panic error is that socket is being closed while packet sent via that socket is queued to userspace. After userspace reinjects (userspace or another netfilter rule asks for the packet to get queued again,) the refcount transition will be 1 -> 0 -> 1 (-> 0), thus double-free occurs.

    This error is being managed in bugzilla 1885682 and 1886557.