Điểm:1

resize2fs crashed with error : Operation not permitted While trying to add group

lá cờ nl

I was trying to expand /dev/sda3/ partition after I have added a new disk to my hardware RAID, but failed after resize2fs:

[root@server5 ~]# resize2fs -f /dev/sda3
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/sda3 is mounted on /; on-line resizing required
old desc_blocks = 47, new_desc_blocks = 93
Performing an on-line resize of /dev/sda3 to 388385366 (4k) blocks.
resize2fs: Operation not permitted While trying to add group #6016

But let start from the beggining

I re-created partition succesfully using fdisk (origin size was ~ 800gb RAID1, now its ~1.5tb RAID5)

Disk /dev/sda: 1600.3 GB, 1600264691712 bytes
255 heads, 63 sectors/track, 194554 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0006ce84

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         128     1024000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2             128        1148     8192000   82  Linux swap / Solaris
/dev/sda3            1148      194555  1553541464   83  Linux

After it i was using partprobe on /dev/sda3 and everything seems succesfull (at least by lsblk)

[root@server5 ~]# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  1.5T  0 disk 
├─sda1   8:1    0 1000M  0 part /boot
├─sda2   8:2    0  7.8G  0 part [SWAP]
└─sda3   8:3    0  1.5T  0 part /

After that I was trying to use resize2fsk but it failed. Also I run forcefsck at the reboot, but it didn't help much. seems like there is enough GDT blocks

[root@server5 ~]# tune2fs -l /dev/sda3
tune2fs 1.41.12 (17-May-2010)
Filesystem volume name:   <none>
Last mounted on:          /
Filesystem UUID:          790fa126-9bf9-41d6-90e1-f720dfbc4663
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags:         signed_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              49283072
Block count:              197132288
Reserved block count:     9856614
Free blocks:              21290170
Free inodes:              49192326
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      977
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Flex block group size:    16
Filesystem created:       Mon Jan 29 00:08:33 2018
Last mount time:          Wed Jan 19 05:28:55 2022
Last write time:          Wed Jan 19 09:54:25 2022
Mount count:              1
Maximum mount count:      -1
Last checked:             Wed Jan 19 05:28:47 2022
Check interval:           0 (<none>)
Lifetime writes:          228 TB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:           256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
First orphan inode:       16121861
Default directory hash:   half_md4
Directory Hash Seed:      dff51d0c-ebe2-444e-9262-ffe391307277
Journal backup:           inode blocks
Seems like there is enough GDT blocks 

DF -h output

[root@server5 ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       741G  659G   44G  94% /
tmpfs            48G     0   48G   0% /dev/shm
/dev/sda1       969M   38M  881M   5% /boot
tmpfs           1.0G     0  1.0G   0% /ramdrive_session

FS allowed to be resized,

[root@server5 ~]# dumpe2fs /dev/sda3 | grep -i features
dumpe2fs 1.41.12 (17-May-2010)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Journal features:         journal_incompat_revoke

Journal size looks ok:

[root@server5 ~]# dumpe2fs /dev/sda3 |  grep ^Journal
dumpe2fs 1.41.12 (17-May-2010)
Journal inode:            8
Journal backup:           inode blocks
Journal features:         journal_incompat_revoke
Journal size:             128M
Journal length:           32768
Journal sequence:         0xc8213ff3
Journal start:            2327
    

So I am totally stucked and asking for your help. How to properly add space to /dev/sda3 partition ? Thank you for attention

Điểm:0
lá cờ kr

Giả sử đây là resize2fs 1.41.12, tôi cho rằng bạn đang chạy CentOS 6. Có những thứ khác cần kiểm tra ngoài việc tìm kiếm các khối GDT có sẵn:

Nói ngắn gọn:

Kiểm tra xem FS của bạn có được phép thay đổi kích thước không:

dumpe2fs /dev/vg_test/lv_ext3 | tính năng grep -i

Bạn nên tìm "thay đổi kích thước_inode" trong đầu ra.

Ngoài ra, kích thước nhật ký của FS của bạn có thể quá nhỏ để thay đổi kích thước trực tuyến, vì vậy bạn cần chuyển sang chế độ ngoại tuyến và thực hiện các bước sau: https://access.redhat.com/solutions/2723901

Someone Sometime avatar
lá cờ nl
Không, nó không giúp được gì

Đăng câu trả lời

Hầu hết mọi người không hiểu rằng việc đặt nhiều câu hỏi sẽ mở ra cơ hội học hỏi và cải thiện mối quan hệ giữa các cá nhân. Ví dụ, trong các nghiên cứu của Alison, mặc dù mọi người có thể nhớ chính xác có bao nhiêu câu hỏi đã được đặt ra trong các cuộc trò chuyện của họ, nhưng họ không trực giác nhận ra mối liên hệ giữa câu hỏi và sự yêu thích. Qua bốn nghiên cứu, trong đó những người tham gia tự tham gia vào các cuộc trò chuyện hoặc đọc bản ghi lại các cuộc trò chuyện của người khác, mọi người có xu hướng không nhận ra rằng việc đặt câu hỏi sẽ ảnh hưởng—hoặc đã ảnh hưởng—mức độ thân thiện giữa những người đối thoại.