Skip to main content

Resize the Redhat XFS LVM partition

To resize a Redhat XFS LVM partition, you will need to follow these steps:

Backup your data to a safe location. Resizing a partition always carries the risk of data loss, so it is important to have a backup before proceeding.

Check if the partition is mounted. You cannot resize a mounted partition, so you will need to unmount it first. To do this, run the following command:

umount /path/to/partition

Check if the partition is part of an LVM. If it is, you will need to deactivate the volume group (VG) before you can resize the partition. To do this, run the following command:

vgchange -an /dev/vg_name

Use the fdisk command to delete the existing partition and recreate it with the new size. Make sure to specify the correct device name for your partition (e.g. /dev/sda1).

Create a new physical volume (PV) on the resized partition:

pvcreate /dev/sda1

Add the PV to the VG:

vgextend /dev/vg_name /dev/sda1

Use the lvextend command to extend the logical volume (LV) to the desired size:

lvextend -L +size /dev/vg_name/lv_name

Finally, resize the XFS filesystem on the LV to fill the new space:

xfs_growfs /path/to/lv

That's it! You have successfully resized your Redhat XFS LVM partition.




Comments

Popular posts from this blog

Compile OpenSSH 9

Install  yum install rpm-build zlib-devel openssl-devel pam-devel libselinux-devel gcc perl-devel libXt-devel gtk2-devel make -y wget -c https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.3p2.tar.gz ./configure --with-pam --with-selinux --with-privsep-path=/var/lib/sshd/ --sysconfdir=/home/saz163user/ssh ./configure make make install

Use the CIA triad to protect organizations

The CIA triangle is a concept that can assist organisations think about risk while developing systems and security policies. It consists of three components that cybersecurity analysts and organisations strive to maintain: confidentiality, integrity, and availability. Maintaining an acceptable level of risk and ensuring that systems and policies are developed with these factors in mind aids in the establishment of a successful security posture, which refers to an organization's ability to manage its defence of key assets and data as well as respond to change.  Confidentiality The concept of confidentiality states that only people with permission can access particular resources or data. The application of design principles, such as the concept of least privilege, can improve secrecy inside an organisation. The least privilege principle restricts users' access to only the data they need to finish tasks relevant to their jobs. One technique to keep private data secure and secret i...

People who like to be alone

People who enjoy being alone and seek solitude may exhibit a variety of personality traits. Here are some potential traits that may be present in individuals who prefer to be alone:     Independence: People who enjoy being alone may value their independence and may be comfortable making decisions and going about their daily lives on their own. They may be self-motivated and able to entertain themselves without the need for external stimuli.     Introversion: Many people who enjoy being alone may be introverted, meaning that they tend to be more inwardly focused and may get their energy from solitude rather than social interactions. Introverts may prefer to spend time alone thinking, reading, or engaging in solitary activities.Creativity: Being alone can provide an opportunity for people to tap into their creativity and to engage in activities that allow them to express themselves. People who enjoy being alone may be more inclined to engage in creative pursu...