By default, Ansible parallelises tasks on multiple hosts simultaneously and speeds up automation in large inventories. But sometimes, this is not ideal in a load-balanced environment, where upgrading the servers simultaneously may cause the loss of services. How do we use Ansible to run the updates at different times? I use the keyword “serial” before executing the roles universal package.
Ansible’s parallel processes are known as forks, and the default number of forks is five. In other words, Ansible attempts to run automation jobs on 5 hosts simultaneously. The more forks you set, the more resources are used on the Ansible control node.
How do you implement? Just edit the ansible.cfg file. Look for the “forks” parameters. You can use the command “ansible-config view” to view ansible.cfg output.
Rescue blocks specify tasks to run when an earlier task in a block fails. This approach is similar to exception handling in many programming languages. Ansible only runs rescue blocks after a task returns a ‘failed’ state. Bad task definitions and unreachable hosts will not trigger the rescue block.
Rustup is an installer for System Programming Language Rust. If you are running the installer script for yourself, you can take a look at https://github.com/vi/rustup
# curl -sf https://static.rust-lang.org/rustup.sh | sudo sh
But what if you have to install for all users in a Cluster or Shared Environment, how do we do it? Fortunately, we have good information that is found at Installing rustup for all linux users . I took some snipplets from that site
In that article, the author recommends to define RUSTUP_HOME and CARGO_HOME
If you have migrated to a new ABAQUS License Server and is planning to point your ABAQUS Linux Client to the new License Server. Here are the simple steps you will need to do
Step 1: Find the custom_v6.env files to edit.
Depending on how you install, for me I like to put everything in /usr/local so my abaqus will be placed there.
# cd /usr/local/abaqus-2023/SIMULIA/EstProducts/2023/linux_a64/SMA/site/
# vim custom_v6.env
Step 2: Edit the custom_v6.env file
Add the abaquslm_license_file = “27398@XXX.XXX.XXX.XXX”
# Installation of Established Products 2023
# Wed Oct 11 13:30:54 2023
plugin_central_dir="/usr/local/abaqus-2023/DassaultSystemes/SIMULIA/CAE/plugins/2023"
# retrieve licensing configuration from EstablishedProductsConfig.ini
importEnv('licensing.env')
abaquslm_license_file = "27398@XXX.XXX.XXX.XXX"
This comparison table is taken from the book “Architecture and Design of the Linux Storage Stack” which I find useful to help understand the differences between the two.
Journaling
Copy-On-Write
Write handling
Changes are recorded in a journal before applying them to the actual file system
A separate copy of data is created to make modifications
Original data
Original data gets overwritten
Original data remains intact
Data Consistency
Ensures consistency by recording metadata changes and replaying them if needed
Ensures consistency by never modifying the original data
Performance
Minimal overhead depending on the type of journaling mode
Some performance gains because of faster writes
Space utilisation
Journal size is typically in MB, so no additional space is required
More space is required due to separate copies of data
Recovery times
Fast recovery times as the journal can be replaced instantly
Slower recovery times as data needs to be reconstructed using recent copies
Features
No built-in support for features such as compression or deduplication
Built-in support for compression and deduplication
Taken from “Architecture and Design of the Linux Storage Stack”
Copy-On-Write Filesystem does not overwrite the data in place, here is how it is done. Supposedly there is file that will be modified.
Copy the old data to an allocated location on the disk
New data is written to the allocated location on the disk.
Hence the name Copy-and-Write
The references for the new data are updated
However, the old data and its snapshots are still there
As described in the Architecture and Design of Linux Storage Stack by Muhammad Umer Page 59
As the old data is preserved in the process, filesystem recovery is very simplified. Since the previous state of the data is saved on another allocated location on disk. If there is an outrage, the system system can easily revert to its former state. This make the maintenance of any Journal obsolete. This also allows snapshots to be implemented at the filesystem level.
As the old data is still there, space utilisation may be more than what the user expects……
Some of the filesystem the use the CoW based approach includes Zttabyte Filesystem (ZFS) and B-Tree Filesystem (Btrfs)
The journaling file system (JFS) is a kind of file system developed by IBM IN 1990. It keeps track of changes, which are not yet committed to the file system’s main part, by recording the goal of such changes in a data structure known as “journal”. Usually, the “journal” is a circular log.
In the event of a system crash or power failure, a journaling file system can be brought back online more quickly with a lower chance of being corrupted. Depending on the actual implementation, the JFS may only keep track of stored metadata, which results in improved performance at the expense of increased possibility for data corruption.
Here is a diagram taken from Architecture and Design of Linux Storage Stack by Muhammad Umer Page 57
According to the Chapter 3 of the book,
From the diagram, any changes made to the filesystem are written sequentially to a journal, also called a transaction. Once a transaction is written to a journal, it is written to an appropriate location on a disk. In the case of a system crash, the filesystem replays the journal to see whether any transaction is incomplete. When the transaction has been written to its on-disk location, it is removed from the Journal.
It is interesting to note that either the metadata or actual data is first written to the data. Either way, once written to the filesystem, the transaction is removed from the journal. The size of the journal can be a few megabytes.
Benefits of Journal File System and Impact on Performance
Besides making the Filesystem more reliable and preserving its structure in system crashes and hardware failures, the burning question is whether it will impact performance?
Generally, journaling improves performance when it is enabled by having fewer seeks to the physical disks as data is only when a journal is committed or when the journal fills up. For example, in intense meta-data operations like recursive operations on the directory and its content, journaling improves performance by reducing frequent trips to disks and performing multiple updates as a single unit of work.