Problem Resizing Filesystem: "resize2fs: Permission denied to resize filesystem" During Online Resize

 Environment                                                                                         

Debian 10, 11, 12


Situation                                                                                                

The resize2fs command encountered a permission error ("Permission denied to resize filesystem") during an attempt to resize the filesystem online.


dmesg logs:


Resolution                                                                                             

As per the logs on the system we can see that the system is mounted with the corrupted filesystem and required recovery to perform the online filesystem resizing.

It is highly recommended if you are using any virtualization platform then take a working machine snapshot to avoid any disaster.

After snapshot or backup follow the below steps:

1. Reboot the VM in Recovery Mode:

 




        1. Enter Root Password
        2. Remount the faulty drive or LVM or Disk
        3. Run fsck with -fy option on remounted drive
        4. Wait for the recovery process completion.


        5. Reboot the system after recovery process completion.
        6. Now try to resize the already extended filesystem or run extend the                    online system with default command:
            lvextend --size +1G --resizefs /dev/localhost-vg/home

        Note: Please replace the device with actual device name

Final Result:

Cause                                                                                                     

Inconsistency can prevent various file system operations, including online resizing. To proceed with the resize operation, you'll need to fix the file system errors using a file system check and repair tools.


Disclaimer                                                                                             

Materials are provided for informational, personal or non-commercial use within your organization and rare presented "AS IS" WITHOUT ANY WARRANTY OF ANY KIND.

Comments

Popular posts from this blog

Nginx Ciphers

DevOps Culture