Thursday, May 25, 2023
How to create & Configure LVM (Logical Volume Manager) ?
How to install lvm in Linux ? - Error -
bash: pvcreate: command not found
Login as root user :
[root@10.1.1.1]#
[root@10.1.1.1]# pvcreate /dev/xvdf1
bash: pvcreate: command not found
[root@10.1.1.1]#
[root@10.1.1.1]#
[root@10.1.1.1]# yum install lvm2
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Last metadata expiration check: 0:05:27 ago on Wed 24 May 2023 10:44:45 PM IST.
Dependencies resolved.
=================================================================================================================================================
Package Architecture Version Repository Size
=================================================================================================================================================
Installing:
lvm2 x86_64 8:2.03.14-9.el8 rhel-8-baseos-rhui-rpms 1.7 M
Installing dependencies:
device-mapper-event x86_64 8:1.02.181-9.el8 rhel-8-baseos-rhui-rpms 272 k
device-mapper-event-libs x86_64 8:1.02.181-9.el8 rhel-8-baseos-rhui-rpms 271 k
device-mapper-persistent-data x86_64 0.9.0-7.el8 rhel-8-baseos-rhui-rpms 938 k
lvm2-libs x86_64 8:2.03.14-9.el8 rhel-8-baseos-rhui-rpms 1.2 M
Transaction Summary
=================================================================================================================================================
Install 5 Packages
Total download size: 4.3 M
Installed size: 9.7 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): device-mapper-event-libs-1.02.181-9.el8.x86_64.rpm 4.4 MB/s | 271 kB 00:00
(2/5): device-mapper-persistent-data-0.9.0-7.el8.x86_64.rpm 12 MB/s | 938 kB 00:00
(3/5): device-mapper-event-1.02.181-9.el8.x86_64.rpm 13 MB/s | 272 kB 00:00
(4/5): lvm2-2.03.14-9.el8.x86_64.rpm 29 MB/s | 1.7 MB 00:00
(5/5): lvm2-libs-2.03.14-9.el8.x86_64.rpm 7.8 MB/s | 1.2 MB 00:00
-------------------------------------------------------------------------------------------------------------------------------------------------
Total 24 MB/s | 4.3 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : device-mapper-event-libs-8:1.02.181-9.el8.x86_64 1/5
Installing : device-mapper-event-8:1.02.181-9.el8.x86_64 2/5
Running scriptlet: device-mapper-event-8:1.02.181-9.el8.x86_64 2/5
Installing : lvm2-libs-8:2.03.14-9.el8.x86_64 3/5
Installing : device-mapper-persistent-data-0.9.0-7.el8.x86_64 4/5
Installing : lvm2-8:2.03.14-9.el8.x86_64 5/5
Running scriptlet: lvm2-8:2.03.14-9.el8.x86_64 5/5
Verifying : device-mapper-persistent-data-0.9.0-7.el8.x86_64 1/5
Verifying : lvm2-libs-8:2.03.14-9.el8.x86_64 2/5
Verifying : device-mapper-event-libs-8:1.02.181-9.el8.x86_64 3/5
Verifying : lvm2-8:2.03.14-9.el8.x86_64 4/5
Verifying : device-mapper-event-8:1.02.181-9.el8.x86_64 5/5
Installed products updated.
Installed:
device-mapper-event-8:1.02.181-9.el8.x86_64 device-mapper-event-libs-8:1.02.181-9.el8.x86_64 device-mapper-persistent-data-0.9.0-7.el8.x86_64
lvm2-8:2.03.14-9.el8.x86_64 lvm2-libs-8:2.03.14-9.el8.x86_64
Complete!
[root@10.1.1.1]#
[root@10.1.1.1]#
[root@10.1.1.1]#
[root@10.1.1.1]#
[root@10.1.1.1]#
Wednesday, May 24, 2023
How to check Filesystem type in Linux ?
Check Filesystem type in Linux
[root@10.1.1.1]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs tmpfs 3.8G 0 3.8G 0% /dev/shm
tmpfs tmpfs 3.8G 17M 3.8G 1% /run
tmpfs tmpfs 3.8G 0 3.8G 0% /sys/fs/cgroup
/dev/xvda2 xfs 60G 51G 9.8G 84% /
tmpfs tmpfs 770M 0 770M 0% /run/user/0
/dev/mapper/oracle_bkp-oracle_bkp_lv xfs 994M 40M 955M 4% /oracle_bkp
[root@10.1.1.1]#
How to Install podman on RHEL ?
Install podman on RHEL
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# yum install podman
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Last metadata expiration check: 0:48:48 ago on Tue 23 May 2023 10:55:23 PM IST.
Dependencies resolved.
==============================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================
Installing:
podman
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# podman pull docker.io/publici/httpd
Trying to pull docker.io/publici/httpd:latest...
Getting image source signatures
Copying blob 0af70aecf67e done
Copying blob a3ed95caeb02 done
Copying blob efd26ecc9548 done
Copying blob 70bd0340825a done
Copying blob 302abf37f8d6 done
Copying blob 2f02fbf07b78 done
Copying blob f3dd40690212 done
Copying blob a3ed95caeb02 skipped: already exists
Copying blob a3ed95caeb02 skipped: already exists
Copying blob a3ed95caeb02 skipped: already exists
Copying blob a3ed95caeb02 skipped: already exists
Copying blob a3ed95caeb02 skipped: already exists
Copying blob 7043ffb37ce5 done
Copying blob 9654cb0d97aa done
Copying blob a3ed95caeb02 skipped: already exists
Copying blob a3ed95caeb02 skipped: already exists
Writing manifest to image destination
Storing signatures
2cc7fca9b1ef5fc72cb830a3480e07080d63c6a02ce744c628ed69cd40ebb661
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/publici/httpd latest 2cc7fca9b1ef 7 years ago 320 MB
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# podman run -dt -p 8080:80/tcp docker.io/publici/httpd
d6bf684def18a8b23f8367e9c164bfca7847e4d100a8d4fa7f7b4fd69aa675f3
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d6bf684def18 docker.io/publici/httpd:latest /usr/sbin/apache2... 14 seconds ago Up 14 seconds 0.0.0.0:8080->80/tcp blissful_shaw
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# podman logs -l
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.88.0.2. Set the 'ServerName' directive globally to suppress this message
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d6bf684def18 docker.io/publici/httpd:latest /usr/sbin/apache2... 2 minutes ago Up 2 minutes 0.0.0.0:8080->80/tcp blissful_shaw
[root@10.1.1.1 ~]#
[root@10.1.1.1 ~]# podman stop d6bf684def18
d6bf684def18
[root@10.1.1.1 ~]#