RHCSA Articles RSS Feed
RHEL: XFS basic operations
Viewed 15439 times since Sat, Jun 2, 2018
RHEL: XFS basic operations # Tested on RHEL 6 & 7 # XFS filesystem supports up to 16 EiB filesystems and up to 8 EiB and directory structures # holding tens of millions entries. # On the other hand it is a single node filesystem. It comes... Read More
RHEL: How to change a USER/GROUP UID/GID and all owned files
Viewed 19951 times since Sat, Jun 2, 2018
RHEL: How to change a USER/GROUP UID/GID and all owned files # How to change a UID/GID and all belonging filesUSER=myuserOLDUID=7773NEWUID=7774GROUP=mygroupOLDGID=157NEWGID=158# Assign a new UID to USER. Any files which the user owns and which ... Read More
RHEL: udev rules basics
Viewed 7796 times since Sat, Jun 2, 2018
RHEL: udev rules basics # Tested on RHEL 6 & 7# 'udev' is a mechanism for maintaining device nodes on a server. It handles the management# of the devices nodes through the 'udevd' daemon as well as rules defined on the ... Read More
RHEL: What is "SysRq key" and how to use it
Viewed 4729 times since Sat, Jun 2, 2018
RHEL: What is "SysRq key" and how to use it # Tested on RHEL 5, 6 & 7# What is the "Magic" 'SysRq' key?# ------------------------------------------------------------------------------------------# According to the Linux kernel doc... Read More
RHEL: Display swap/RAM size
Viewed 2940 times since Sat, Jun 2, 2018
RHEL: Display swap/RAM size # File containing information about system memory   /proc/meminfo# Display physical memory sizecat /proc/meminfo | grep MemTotal   MemTotal:     11508864 kB# Display swap sizecat /proc/meminfo | grep SwapTotal   Swap... Read More
RHEL: Forgotten ’root’ password / using single-user to gain access
Viewed 6878 times since Sat, Jun 2, 2018
RHEL: Forgotten 'root' password / using single-user to gain access # Tested on RHEL 6 & 7# RHEL 6 -----------------------------------------------------------------------------------# Booting into single user mode is the easiest ... Read More
RHEL: Force system to prompt for password in Single User mode
Viewed 6520 times since Sat, Jun 2, 2018
RHEL: Force system to prompt for password in Single User mode # Tested on RHEL 5, 6 & 7# Due to security reasons, one may want to force system to prompt for root password even# in Single User mode# By default, system doesn't ask for pa... Read More
RHEL: Services basic management - systemd
Viewed 18101 times since Sat, Jun 2, 2018
RHEL: Services basic management - systemd # Tested on CentOS 7# systemd is the new Fedora init system adopted by Red Hat from RHEL 7 on.# It is backwards compatible with SysV init scripts, enhances the administrative process# and provides new ... Read More
RHEL: Services basic management - chkconfig
Viewed 5195 times since Sat, Jun 2, 2018
RHEL: Services basic management - chkconfig # Tested on RHEL 5 & 6 # If one of "on", "off", "reset", or "resetpriorities" is specified after the service name,# 'chkconfig' command changes the startup information for  the specified... Read More
RHEL: Retrieve and generate a unique SCSI identifier
Viewed 2737 times since Sat, Jun 2, 2018
RHEL: Retrieve and generate a unique SCSI identifier # Tested on RHEL 5, 6 & 7# There are many situations were we may need a unique identifier for a SCSI device# (disk, etc.) to be identified in an unambiguous and persistent way.# To obtain... Read More
RHEL: How to rebuild and/or patch a RPM package
Viewed 8145 times since Sat, Jun 2, 2018
RHEL: How to rebuild and/or patch a RPM package # Tested on RHEL 6 & 7 # If possible,  avoid creating packages as 'root' as this is quite dangerous because we # could delete or overwrite OS existing files. # Setup the folder str... Read More
Build a simple RPM that packages a single file
Viewed 7885 times since Sat, Jun 2, 2018
Build a simple RPM that packages a single file # Tested on RHEL 6 & 7# The 'rpmbuild' command is used to build a binary RPM from source code, as configured# with a .spec file.# Install the necessary packages: rpm-build and rpmdevt... Read More
RHEL: Allowing users to ’su’ to "root" / Allowing ’root’ to login directly to the system using ’ssh’
Viewed 2504 times since Sat, Jun 2, 2018
RHEL: Allowing users to 'su' to "root" / Allowing 'root' to login directly to the system using 'ssh' # Tested on RHEL 5, 6 & 7# Allowing users to "su" to 'root'# -------------------------------------... Read More
RHEL: Route network packets to go out via the same interface they came in
Viewed 2666 times since Sat, Jun 2, 2018
RHEL: Route network packets to go out via the same interface they came in # Tested on RHEL 6   # When working on a server with several network interfaces, if we don't define any specific # VLAN routing, all the outgoing traffic will usual... Read More
RHEL: Rename a network interface on RHEL 7
Viewed 9979 times since Sat, Jun 2, 2018
RHEL: Rename a network interface on RHEL 7 # Tested on CentOS 7 (Virtual server)# RHEL 6 introduced the Consistent Network Device Naming, feature that sets the name of# network interfaces in order to make locating and differentiating the interf... Read More
RHEL: Bonding network interfaces
Viewed 3363 times since Sat, Jun 2, 2018
RHEL: Bonding network interfaces # Tested on RHEL 5, 6 & 7 # Red Hat Enterprise Linux allows administrators to bind multiple network interfaces# together into a single channel using the bonding kernel module and a special network# interfac... Read More
RHEL: Multipathing basics
Viewed 8158 times since Sat, Jun 2, 2018
RHEL: Multipathing basics # Tested on RHEL 5 & 6# DM-Multipath is a feature of Red Hat from RHEL 5 on and can be used to provide:## Redundancy: DM-Multipath can provide failover in an active/passive configuration. In an#   active/passive co... Read More
RHEL: Remove existing SAN LUNs
Viewed 13716 times since Sat, Jun 2, 2018
RHEL: Remove existing SAN LUNs # Tested on RHEL 5 & 6 # Given following LUN, for instance: multipath -ll [...]    3600508b4000971cd0001000022fa0000 dm-0 HP,HSV210    [size=2.0G][features=0][hwhandler=0][rw]    \_ round-robin 0 [prio... Read More
RHEL: Rebuilding the initial ramdisk image
Viewed 6529 times since Sat, Jun 2, 2018
RHEL: Rebuilding the initial ramdisk image # Tested on RHEL 5, 6 & 7 # Sometimes it may be necessary to rebuild the initial ramdisk (also known as initrd or # initramfs) to include new kernel modules, files, etc. # RHEL 3, 4 & 5: Reb... Read More
RHEL: Displaying/setting kernel parameters - ’sysctl’
Viewed 2617 times since Sat, Jun 2, 2018
RHEL: Displaying/setting kernel parameters - 'sysctl' # Tested on RHEL 6 & 7# Setting kernel parameters is a fairly straightforward task. If we check the file# /etc/sysctl.conf, we will see several attributes with their appropria... Read More
RHEL: Building a custom kernel on RHEL 6
Viewed 3766 times since Sat, Jun 2, 2018
RHEL: Building a custom kernel on RHEL 6 # Tested on RHEL 6.4 i386# Notes mainly from http://wiki.centos.org/HowTos/Custom_Kernel# WARNING: Please note that customizing kernel is not supported by Red Hat Support Services# NOTE: It is advisable ... Read More
RHEL: Crash kernel dumps configuration and analysis on RHEL 7
Viewed 6720 times since Sat, Jun 2, 2018
RHEL: Crash kernel dumps configuration and analysis on RHEL 7 # The memory reserved for the kdump kernel is always reserved during system boot. That# means that the amount of memory is specified in the system's boot loader configuration.# ... Read More
RHEL: Crash kernel dumps configuration and analysis on RHEL 6
Viewed 4315 times since Sat, Jun 2, 2018
RHEL: Crash kernel dumps configuration and analysis on RHEL 6 Kernel dumps may provide invaluable insights when debugging serious issues.1.- Install following RPMs:         kexec-tools         crash    To be able to analyze crash dumps, followi... Read More
RHEL: Crash kernel dumps configuration and analysis on RHEL 5
Viewed 6691 times since Sat, Jun 2, 2018
RHEL: Crash kernel dumps configuration and analysis on RHEL 5 Apart from this recipe, more information about the configuration can be found inthe file “/usr/share/doc/kexec-tools-*/kexec-kdump-howto.txt“https://access.redhat.com/knowledge/docs/... Read More
RHEL: iSCSI target/initiator configuration on RHEL7
Viewed 10476 times since Sat, Jun 2, 2018
RHEL: iSCSI target/initiator configuration on RHEL7 # Tested on RHEL 7# iSCSI target configuration# ------------------------------------------------------------------------------------------# Install required package: targetcliyum install -y ta... Read More
RHEL: iSCSI target/initiator configuration on RHEL6
Viewed 8369 times since Sat, Jun 2, 2018
RHEL: iSCSI target/initiator configuration on RHEL6 # Tested on RHEL 6# iSCSI target configuration# ------------------------------------------------------------------------------------------# Required package: scsi-target-utils# Some documentat... Read More
RHEL: Getting/Setting hardware clock’s time
Viewed 2669 times since Sat, Jun 2, 2018
RHEL: Getting/Setting hardware clock's time # Tested on RHEL 6 & 7 # Just an extract from 'hwclock' man page   hwclock -r or hwclock --show   hwclock -w or hwclock --systohc   hwclock -s or hwclock --hctosys   hwclock --set -... Read More
RHEL: Change system’s hostname
Viewed 3039 times since Sun, May 27, 2018
# Tested on RHEL 5, 6 & 7 # RHEL 5 & 6 -------------------------------------------------------------------------------# Change hostname in /etc/sysconfig/network file# and run following command:hostname <new_hostname># Do not forget t... Read More
RHEL: Checking HBAs
Viewed 14215 times since Sun, May 27, 2018
# Tested on RHEL 6# Show the instances of FC ports connected to the pci bus:lspci | grep -i "Fibre"   07:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)   07:00.1 Fibre Channel: QLogic Corp. ISP2532-based ... Read More
RHEL: Adding a boot entry to GRUB/GRUB2 configuration
Viewed 4085 times since Sun, May 27, 2018
# Tested on RHEL 6 & 7# RHEL 6# ------------------------------------------------------------------------------------------# Adding a new entry to grub boot file is as simple as adding a new boot stanza, at the end# of the file, to /boot/grub/grub... Read More
RHEL: GPT/MBR partition tables (using disks larger than 2 TiB)
Viewed 11885 times since Sun, May 27, 2018
# Tested on RHEL 6 & 7# Up to now the default type of the partition table of a hard disk is MBR (msdos). This# old method presents some problems like the limitation of having a maximum of four primary# partitions but the main problem is that we c... Read More
RHEL: Enabling standard ftp/telnet
Viewed 2725 times since Sun, May 27, 2018
# Tested on RHEL 5# By default system is as secured as to be accesible only via ssh/sftp.# Enabling ftp# ------------------------------------------------------------------------------------------# 1.- Edit File /etc/xinetd.d/gssftp and change followi... Read More
RHEL: Manually encrypting a filesystem with LUKS
Viewed 3440 times since Sun, May 27, 2018
# Tested on RHEL  7# LUKS, Linux Unified Key Setup-on-disk-format, allow encrypting partitions. By default, the# option to encrypt the file systems is unchecked during the installation, otherwise we will# be prompted for a passphrase every time the s... Read More
RHEL: Reserved space on a ext2/ext3/ext4 filesystem
Viewed 4030 times since Sun, May 27, 2018
# Tested on RHEL 6 & 7# By default, when creating a new ext2/ext3/ext4 filesystem, five percent of the partition# is reserved for the superuser, allowing root to carry out administrative tasks on the# filesystem in the eventuality that F.S. becom... Read More
RHEL: Extending the maximum inode count on a ext2/ext3/ext4 filesystem
Viewed 2760 times since Sun, May 27, 2018
# Tested on RHEL 6 & 7 # An inode is a data structure that contains information about a file or directory. Inodes# rarely get used up when the file system has available space. Nevertheless, this may# happen when there is a large amount of small f... Read More
RHEL: Displaying system info (firmware, serial numbers... )
Viewed 11473 times since Sun, May 27, 2018
# Tested on RHEL 5, 6 & 7# Network interface cards driver, driver version, firmware version, and bus informationethtool -i eth0   driver: bnx2   version: 2.0.8-rh   firmware-version: bc 5.2.3 NCSI 2.0.6   bus-info: 0000:03:00.0cat /var/log/dmes... Read More
RHEL: Extending a vmdk (Virtual Machine disk)
Viewed 3785 times since Sun, May 27, 2018
# Tested on RHEL 5, 6 & 7 # This procedure may be carried out to make visible the new size of a disk that is already# presented and used by the OS and that has been extended at virtual server level.# Whenever possible I recommend to create a new... Read More
RHEL: Handling SCSI disks
Viewed 11989 times since Sun, May 27, 2018
# Tested on RHEL 5, 6 & 7 # Check devices currently known to the SCSI subsystem # ------------------------------------------------------------------------------------------ cat /proc/scsi/scsi    Attached devices:    Host: scsi0 Channel: 00... Read More
RHEL: Back-up/Replicate a partition table
Viewed 3010 times since Sun, May 27, 2018
# Tested on RHEL 5, 6 & 7 # Given the importance of disk's partition table, one should consider to make a backup# in a regular basis in order to be able to restore it in case it will get corrupted,# modified or deleted by mistake.# We may st... Read More
RHEL: ACLs basics
Viewed 5760 times since Sun, May 27, 2018
Files and directories have permission sets for the owner of the file, the group associated with the file,and all other users for the system. However, these permission sets have limitations. For example, differentpermissions cannot be configured for d... Read More
RHEL: Reinstalling Boot Loader on the Master Boot Record (MBR)
Viewed 2990 times since Sun, May 27, 2018
# Tested on RHEL 5 & 6# In many cases, the GRUB boot loader can mistakenly be deleted, corrupted or replaced.# We can manually reinstall GRUB on the master boot record, using either "grub-install"# or the "grub" prompt.# Ensure the device.map fil... Read More
RHEL: Resize/disable /dev/shm filesystem
Viewed 13820 times since Sun, May 27, 2018
# Tested on RHEL 5, 6 & 7 # Notes from www.walkernews.net, www.generation-linux.fr and Red Hat web site# Thanks to big memory size, nowadays most of RAM is not used at all. It is thus possible# to allocate a part of this physical memory to be use... Read More
RHEL: Extending a multipath LUN
Viewed 4333 times since Sun, May 27, 2018
# Tested on RHEL 6# This procedure may be carried out to make visible the new size of a LUN that is already# presented and used by the OS and that has been extended at SAN storage level.# Whenever possible I recommend to create a new LUN at SAN level... Read More
RHEL: Scan and configure new SAN (fibre channel) LUNs
Viewed 7502 times since Sun, May 27, 2018
# Tested on RHEL 5 & 6 # Identify host adapters on the systemsystool -c fc_host   Class = "fc_host"     Class Device = "host3"       Device = "host3"     Class Device = "host4"       Device = "host4"ls /sys/class/fc_host   host3  host4# Rescan t... Read More
RHEL: Create a local RPM repository
Viewed 10842 times since Sun, May 27, 2018
# Tested on RHEL/CentOS 6 & 7# Mount the installation disk and copy packages from <cdrom>/Packages to a local directory.# I'll use /depot as local repository.# Once done, first of all, you have to install createrepo package:cd /depotll... Read More