Posts

LVM

Image
lvm table

Specify I/O Scheduler with udev rules

Since the advent of systemd the use of /etc/rc* startup-scripts has been discouraged and phased out. However, systemd still supports the use of certain local startup scripts for compatibility purposes. Nevertheless, to ensure full current- and future compatibility with systemd, administrators are encouraged to create own systemd service files or udev rules to run scripts during boot.  This post will briefly outline the use of a udev rule to assign a specific I/O scheduler to a specific HDD.

NOTE To see an example using the phased-out rc-startup scripts, take a look at my previous post.
Create a custom rules-file, e.g. 99-custom.rules, in the /etc/udev/rules.d/ directory with your editor of choice.  The following example will instruct udev to assign the deadline I/O scheduler to the /dev/sdb device:

# vim /etc/udev/rules.d/99-custom.rules ACTION=="add|change", SUBSYSTEM=="block" , KERNEL=="sdb*", RUN+="/bin/sh -c 'echo deadline > /sys/bloc…

Specify I/O Scheduler per Device

Since the advent of systemd the use of /etc/rc* startup-scripts has been discouraged and phased out. However, systemd still supports the use of certain local startup scripts for compatibility purposes. This post will briefly outline the use of the /etc/rc.local file to assign a specific I/O scheduler to a specific HDD.

At the moment, I have an SSD drive (primary /dev/sda) and an "old-fashioned" HDD (/dev/sdb) in use on my RHEL7 system.  I'd like to be able to use the deadline I/O scheduler as the default and assign the cfq scheduler to the HDD device.  In RHEL7 the default I/O scheduler can change based on the selected tuned profile, which adds an additional layer of uncertainty if you're unaware of "tuned".  The default tuned profile is throughput-performance, which enables the deadline scheduler by default among other performance-related system settings.  However, if the default profile is changed to , e.g. virtual-host, the scheduler of choice becomes

SystemD and FIFO Sockets in RHEL7

There's a bug with a relevant discussion on systemd's approach to FIFO socket deletion. As of systemd-214 the issue with "stale" sockets was resolved by supplying the `RemoveOnStop` option to its corresponding `.service`. However, at the moment RHEL7 has systemd-208 as the default version; and I am seeing the following errors in `dmesg` output: systemd[1]: systemd 208 running in system mode. (+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ) systemd[1]: /usr/lib/systemd/system-generators/anaconda-generator exited with exit status 1. [ +0.056775] systemd[1]: [/usr/lib/systemd/system/lvm2-lvmetad.socket:9] Unknown lvalue 'RemoveOnStop' in section 'Socket' [ +0.000675] systemd[1]: [/usr/lib/systemd/system/dm-event.socket:10] Unknown lvalue 'RemoveOnStop' in section 'Socket' I'm not sure if LVM2 is referencing a feature that's not available in the default systemd version; AFAIK, my configurati…

Power Management and Performance in Enteprise Linux (EL7)

As with most things in Linux, there are an array of different tools and options available when dealing with the performance and power consumption of hardware components. Nevertheless, certain standard or even non-standard defaults always emerge, either distribution-specific or -agnostic. While a greater number of available tools provides greater control and more possible solutions, it also brings with it the possibility of greater potential for confusion and unclear incompatibilities. One such confusion arose when I noticed the inconsistency in my CPU frequency preference across reboots. I was used to using the cpupower utility from the kernel-utils package; however, options in the configuration file in /etc/sysconfig/cpupower had no effect on the system during the boot up process. It turns out that RHEL7 and, by extension, Centos EL7 use the tuned utility by default for performance tuning. As a result, according to a forum post in the Centos forum, ...that service conflicts …

Font Discrepencies in Google Play Books

Image
I have two tablets with Google Play Books installed; the larger tablet has poor font display in Google Play Books when compared to the smaller Nexus7 tablet. I don't know if this is due to different fonts being installed or, perhaps, the difference in the display output. The older, larger tablet is running a custom firmware and, I noticed, the fontScale value is 1.15000; whereas the Nexus7 2013 is running CyanogenMod, and the fontScale value is 1.00000. However, even after changing the global fontScale to "normal" value of 1.00000 the font stays the same as before.

Expanding LVM Partition in RHEL7

Scenario:  I've created a VM with a RHEL7 guest.  The partition layout is a standard, primary partition for /boot and LVM for the rest--namely, /usr, /var, /home, swap and / (rootfs).  After installing updates and some other packages, the /usr directory began to fill up.

In order to mitigate the situation, I created an additional primary partition with an XFS filesystem, as that is the preferred/default FS in RHEL7.

    # parted /dev/vda mkpart P3 xfs 14G 16G

The above command instructs "parted" to operate on the /dev/vda disk and create primary partition 3 with XFS filesystem starting at 14G and ending at 16G.  
Next, I added the physical partition to LVM with the following command: 

# pvcreate /dev/vda

Then, extend the volume group with the physical partition with: 

    # vgextend rhel /dev/vda3

and 

    # lvextend -L+2G /dev/rhel/usr

Finally, to grow the filesystem I executed 

    # xfs_growfs /dev/rhel/usr