Resize LVM in Linux | Extend Or Reduce Logical Volume in RHEL || Nehra Classes

  Рет қаралды 30,628

Nehra Classes

Nehra Classes

Күн бұрын

Пікірлер: 16
@saritha266
@saritha266 2 жыл бұрын
Nyc
@Enjoy_Buddies
@Enjoy_Buddies 2 жыл бұрын
nice explanation
@wesg01
@wesg01 2 жыл бұрын
Awesome video! Thank you!
@dokiparthydeepika4310
@dokiparthydeepika4310 Жыл бұрын
When I use mount -a , I got error " wrong fs type,bad option, bad superior on /dev/vg/data Missing codename or helper program ,or other error In some case useful...
@Kristofercodes
@Kristofercodes 2 жыл бұрын
Good video!
@sudarshangorivale6101
@sudarshangorivale6101 4 жыл бұрын
how to extend and reduce root partition in centos 7
@NehraClasses
@NehraClasses 4 жыл бұрын
Will upload the video on this soon
@NehraClasses
@NehraClasses 4 жыл бұрын
Here it is, please go through the video (Reduce Root Filesystem in RHEL) 👇 kzbin.info/www/bejne/gXeWk4ybrcSrd80
@tameshchakraborty1994
@tameshchakraborty1994 3 жыл бұрын
gajab.. rhel 8 mainn nahi horaha h reduce sir ...
@NehraClasses
@NehraClasses 3 жыл бұрын
XFS type filesystem can't be reduced, as I have mentioned many times. Rhel 8 by default uses XFS that's why you can't reduced it.
@AbhishekKumar-v8q5b
@AbhishekKumar-v8q5b 11 ай бұрын
how to find the partition number of volume group
@NehraClasses
@NehraClasses 11 ай бұрын
pvdisplay and vgdisplay
@debunker_letsGO
@debunker_letsGO 2 ай бұрын
why I keep getting this error? [root@BS2 ~]# lvreduce -L 250M -n /dev/volgroup/volshare Rounding size to boundary between physical extents: 252.00 MiB. File system ext4 found on volgroup/volshare. File system device usage is not available from libblkid. [root@BS2 ~]#
@NehraClasses
@NehraClasses 2 ай бұрын
The error message you’re encountering while trying to reduce the size of a logical volume (lvreduce) indicates a few issues: Rounding Size: The size you specified (250M) is being rounded to the nearest extent size, resulting in 252.00 MiB. This is normal behavior, as LVM works with physical extents (PE), and the size you provide must align with the size of these extents. File System Detection: The message File system ext4 found on volgroup/volshare. indicates that the lvreduce command detected an ext4 file system on the logical volume you’re trying to reduce. Device Usage Unavailable: The warning File system device usage is not available from libblkid. suggests that the libblkid library, which is used to get information about block devices, couldn’t retrieve usage information for the file system on this logical volume. Solution Steps Check the File System: Before reducing the logical volume, ensure that the file system is in a consistent state and is not corrupted. You can do this by running a file system check: e2fsck -f /dev/volgroup/volshare Resize the File System: Before you reduce the size of the logical volume, you must first reduce the size of the file system: resize2fs /dev/volgroup/volshare 250M Make sure the size specified in resize2fs matches or is smaller than the size you want to set with lvreduce. Reduce the Logical Volume: Now you can safely reduce the size of the logical volume: lvreduce -L 252M /dev/volgroup/volshare If you’re reducing to a size that matches the rounded extent size, use 252M instead of 250M. Final Check: After reducing the logical volume, run another file system check to ensure that everything is consistent: e2fsck -f /dev/volgroup/volshare These steps should help you reduce the logical volume without encountering issues related to the file system.
@debunker_letsGO
@debunker_letsGO 2 ай бұрын
@@NehraClasses [root@BS ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 20G 0 disk ├─sda1 8:1 0 1G 0 part │ └─wgroup-wshare 253:3 0 2G 0 lvm /wshare ├─sda2 8:2 0 2G 0 part │ └─wgroup-wshare 253:3 0 2G 0 lvm /wshare └─sda3 8:3 0 10G 0 part sdb 8:16 0 500G 0 disk ├─sdb1 8:17 0 1G 0 part /boot └─sdb2 8:18 0 499G 0 part ├─rhel-root 253:0 0 70G 0 lvm / ├─rhel-swap 253:1 0 5.4G 0 lvm [SWAP] └─rhel-home 253:2 0 423.6G 0 lvm /home sdc 8:32 0 20G 0 disk sdd 8:48 0 20G 0 disk sr0 11:0 1 1024M 0 rom [root@BS ~]# umount /share umount: /share: no mount point specified. [root@BS ~]# umount /share [root@BS ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 20G 0 disk ├─sda1 8:1 0 1G 0 part │ └─wgroup-wshare 253:3 0 2G 0 lvm /wshare ├─sda2 8:2 0 2G 0 part │ └─wgroup-wshare 253:3 0 2G 0 lvm /wshare └─sda3 8:3 0 10G 0 part sdb 8:16 0 500G 0 disk ├─sdb1 8:17 0 1G 0 part /boot └─sdb2 8:18 0 499G 0 part ├─rhel-root 253:0 0 70G 0 lvm / ├─rhel-swap 253:1 0 5.4G 0 lvm [SWAP] └─rhel-home 253:2 0 423.6G 0 lvm /home sdc 8:32 0 20G 0 disk sdd 8:48 0 20G 0 disk sr0 11:0 1 1024M 0 rom [root@BS ~]# umount /wshare [root@BS ~]# df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 5.2G 0 5.2G 0% /dev tmpfs 5.2G 0 5.2G 0% /dev/shm tmpfs 2.1G 9.2M 2.1G 1% /run /dev/mapper/rhel-root 70G 7.1G 63G 11% / /dev/mapper/rhel-home 424G 3.0G 421G 1% /home /dev/sdb1 1014M 264M 751M 26% /boot 192.168.1.19:/export/nfs/share 70G 7.1G 63G 11% /mnt tmpfs 1.1G 52K 1.1G 1% /run/user/42 tmpfs 1.1G 36K 1.1G 1% /run/user/0 [root@BS ~]# e2fsck -f /dev/mapper/wgroup-wshare e2fsck 1.46.5 (30-Dec-2021) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/mapper/wgroup-wshare: 11/524288 files (0.0% non-contiguous), 142923/2097152 blocks [root@BS ~]# resize2fs /dev/mapper/wgroup-wshare 1G resize2fs 1.46.5 (30-Dec-2021) Resizing the filesystem on /dev/mapper/wgroup-wshare to 1048576 (1k) blocks. The filesystem on /dev/mapper/wgroup-wshare is now 1048576 (1k) blocks long. [root@BS ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert home rhel -wi-ao---- 423.63g root rhel -wi-ao---- 70.00g swap rhel -wi-ao---- 5.36g wshare wgroup -wi-a----- 2.00g [root@BS ~]# lvresize -L -1G -r /dev/mapper/wgroup-wshare File system ext4 found on wgroup/wshare. File system device usage is not available from libblkid. [root@BS ~]# lvresize -L -1G -r /dev/wgroup/wshare File system ext4 found on wgroup/wshare. File system device usage is not available from libblkid. [root@BS ~]# I am trying it using my other server. but same issue.
@debunker_letsGO
@debunker_letsGO 2 ай бұрын
@@NehraClasses I figured it out. My OS on my VM is corrupted. It won't even complete a yum update. Also, I guess you don't even need to use resize2fs. just use lvresize -r -L to reduce. to resize to extend, just do lvextend -r -L no need to use e2fsck or resize2fs
Session-29 | Resize (Extend Or Reduce) LVM in Linux | Nehra Classes
15:56
Trick-or-Treating in a Rush. Part 2
00:37
Daniel LaBelle
Рет қаралды 46 МЛН
Disrespect or Respect 💔❤️
00:27
Thiago Productions
Рет қаралды 41 МЛН
Linux Logical Volume Manager (LVM) Deep Dive Tutorial
53:13
Learn Linux TV
Рет қаралды 153 М.
Understanding Linux Logical Volumes - starring Anouk
11:54
Sander van Vugt, RhatCertification
Рет қаралды 93 М.
Top 10 Linux Job Interview Questions
16:04
tutoriaLinux
Рет қаралды 2,4 МЛН