Article 4RG23 Expand LVM home to root "resize2fs: Operation not permitted While trying to add group #512"

Expand LVM home to root "resize2fs: Operation not permitted While trying to add group #512"

by
dr.x
from LinuxQuestions.org on (#4RG23)
hello Folks ,

i have fresh centos 6.10 64 bits .
#############

[root@ValarFarm3 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
50G 14G 33G 30% /
tmpfs 16G 0 16G 0% /dev/shm
/dev/sda1 477M 79M 369M 18% /boot
/dev/mapper/VolGroup-lv_home
375G 67M 356G 1% /home
[root@ValarFarm3 ~]#

[root@ValarFarm3 ~]# lvdisplay
--- Logical volume ---
LV Path /dev/VolGroup/lv_root
LV Name lv_root
VG Name VolGroup
LV UUID nGri56-nmWo-ffAA-9YMM-XIFR-Gl6X-CgdT0i
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2019-09-24 18:06:33 -0400
LV Status available
# open 1
LV Size 50.00 GiB
Current LE 12800
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Path /dev/VolGroup/lv_home
LV Name lv_home
VG Name VolGroup
LV UUID UdhPD3-7ipt-7GxG-gBtd-HFxd-i0co-E3hd8U
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2019-09-24 18:06:44 -0400
LV Status available
# open 1
LV Size 380.90 GiB
Current LE 97510
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

--- Logical volume ---
LV Path /dev/VolGroup/lv_swap
LV Name lv_swap
VG Name VolGroup
LV UUID 6QT8kq-AvYC-ezTi-506X-r1G2-XTDy-cKV6qn
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2019-09-24 18:08:03 -0400
LV Status available
# open 2
LV Size 15.74 GiB
Current LE 4030
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

now i want to expand home to root size .
##########################

umount /home
mkfs -t ext4 /dev/mapper/VolGroup-lv_home

[root@ValarFarm3 ~]# mkfs -t ext4 /dev/mapper/VolGroup-lv_home
mke2fs 1.41.12 (17-May-2010)
Discarding device blocks: done
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
24969216 inodes, 99850240 blocks
4992512 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
3048 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information:
done

This filesystem will be automatically checked every 25 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@ValarFarm3 ~]#

[root@ValarFarm3 ~]# e2fsck -f /dev/VolGroup/lv_home
e2fsck 1.41.12 (17-May-2010)
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/VolGroup/lv_home: 11/24969216 files (0.0% non-contiguous), 1616871/99850240 blocks
[root@ValarFarm3 ~]#

[root@ValarFarm3 ~]# resize2fs /dev/VolGroup/lv_home 20G
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/VolGroup/lv_home to 5242880 (4k) blocks.
The filesystem on /dev/VolGroup/lv_home is now 5242880 blocks long.

[root@ValarFarm3 ~]# lvreduce -L 20G /dev/VolGroup/lv_home
WARNING: Reducing active logical volume to 20.00 GiB.
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce VolGroup/lv_home? [y/n]: y
Size of logical volume VolGroup/lv_home changed from 380.90 GiB (97510 extents) to 20.00 GiB (5120 extents).
Logical volume lv_home successfully resized.
[root@ValarFarm3 ~]#

[root@ValarFarm3 ~]# lvreduce -L 20G /dev/VolGroup/lv_home
WARNING: Reducing active logical volume to 20.00 GiB.
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce VolGroup/lv_home? [y/n]: y
Size of logical volume VolGroup/lv_home changed from 380.90 GiB (97510 extents) to 20.00 GiB (5120 extents).
Logical volume lv_home successfully resized.
[root@ValarFarm3 ~]# lvextend -l +100%FREE /dev/mapper/VolGroup-lv_root
Size of logical volume VolGroup/lv_root changed from 50.00 GiB (12800 extents) to 410.90 GiB (105190 extents).
Logical volume lv_root successfully resized.
[root@ValarFarm3 ~]#

[root@ValarFarm3 ~]# resize2fs /dev/mapper/VolGroup-lv_root
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/mapper/VolGroup-lv_root is mounted on /; on-line resizing required
old desc_blocks = 4, new_desc_blocks = 26
Performing an on-line resize of /dev/mapper/VolGroup-lv_root to 107714560 (4k) blocks.
resize2fs: Operation not permitted While trying to add group #512
[root@ValarFarm3 ~]#

CAN someone help me why i have error :
resize2fs: Operation not permitted While trying to add group #512"

???

THANKSlatest?d=yIl2AUoC8zA latest?i=SbERHVD1Hjk:jJvV9USrq0M:F7zBnMy latest?i=SbERHVD1Hjk:jJvV9USrq0M:V_sGLiP latest?d=qj6IDK7rITs latest?i=SbERHVD1Hjk:jJvV9USrq0M:gIN9vFwSbERHVD1Hjk
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments