C330 LPP01 Lesson 5 Slides v1
C330 LPP01 Lesson 5 Slides v1
Persistent Mounting
2
5
Official (Closed) \ Sensitive Normal
Lecturer Demonstration
7
8
6
9 10
• We need to protect the fstab (chattr +a sets append only for the file. It
turns immutable bit on so even though root is not able to delete /overwrite the file)
# chattr +a /etc/fstab
• mtab contains currently mounted media, we’ll just copy what’s needed and append it
into fstab
Swap Space
• If you have too many processes running on a machine, the kernel
will try to free up RAM by writing pages to disk. This is what swap
space is for.
• It effectively increases the amount of available memory you have.
However, disk I/O is very slow compared to reading from and writing
to RAM.
• For better performance - put your swap on a fast disk with many
heads that is not busy doing other things. If you have multiple disks:
Split swap and scatter it over all your disks or even different
controllers.
• The combined system RAM plus swap space is called virtual
memory
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/storage_administration_guide/ch-swapspace
Official (Closed) \ Sensitive Normal
Lecturer Demonstration
Official (Closed) \ Sensitive Normal
• Write zeros to the file and grow it 256MB. (256K counts x 1K blocks)
# dd if=/dev/zero of=/var/local/swapfile bs=1K count=256K
Lecturer Demonstration
Official (Closed) \ Sensitive Normal
Lecturer Demonstration
Official (Closed) \ Sensitive Normal
• Open a few Firefox windows and note the usage of the swap
space with swapon –s
• Try this to watch the utilization of swap space
# watch swapon –s
Official (Closed) \ Sensitive Normal
#
# /etc/fstab
# Created by anaconda on Thu Oct 20 06:18:51 2022
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
/dev/mapper/rhel_c330-root / xfs defaults 0 0
UUID=6f69b8a5-3ad8-4cb8-99eb-740f9df704ee /boot xfs defaults 0
0
UUID=847B-E2F8 /boot/efi vfat umask=0077,shortname=winnt 0 2
/dev/mapper/rhel_c330-swap none swap defaults 0 0
UUID=2022-04-19-20-42-48-00 /media/disc iso9660 ro,user,auto 0 0
• Try this if you are sick of re-entering the commands again and
again
# watch swapon –s
Lecturer Demonstration
Official (Closed) \ Sensitive Normal
Team Submission by
2359 - Week 3 Team
Activity (CoL 20%)
Mode of Quiz Impact of LOA on the date Red Hat Labs for individual submissions
of Quiz Week 6 • RH124: Section 15.2: Lab: Manage Files from
Online Quiz The entire weighting of the the Command Line
(week 4) quiz will be transferred to • RH124: Section 15.3: Lab: Manage Users and
week 7 which he/she is Groups, Permissions, and Processes
required to sit for • RH124: Section 15.6: Lab: Mount File
Systems and Find Files
Practical Paper The student is eligible to • RH134: Section 14.3: Lab: Configure and
Quiz (week 7) take a make-up Manage File Systems and Storage
Official (Closed) \ Sensitive Normal
b. Team submission folder in LEO 2.0 by 23:59 of your lesson day, uploaded in Power Point slides.
• Include the following in your presentation slides.
• Include the CLI or scripts the shows the creation of users/groups and files/directories. Take necessary screenshots
and include in your presentation slides.
• Solution to the Problem Statement and clearly indicate if any assumptions made.
• Maximum numbers of slides are 20 (not more than 2 slides per team member)
• One slide on the challenges faced.
• Include one slide for member contribution. Refer to the below:
Example: Member Name Individual Contribution within the team
to the solution(s) for the problem
statement
Member 1 50%
Member 2 30% 25
Member 3 15%
Official (Closed) \ Sensitive Normal
“PRACTICE makes
PERFECT”