SUSE Support

Here When You Need Us

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

This document (000021357) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12 all Service Packs
SUSE Linux Enterprise Server 15 all Service Packs

Situation

The resize2fs command encountered a permission error ("Permission denied to resize filesystem") during an attempt to resize the filesystem online.
Hostname:~ # df -hT /prod
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vgdata-prod ext3 2.3T 2.0T 212G 91% /prod

Hostname:~ # lvextend -L +300G /dev/mapper/vgdata-prod
Size of logical volume vgdata/prod changed from 2.27 TiB (74240 extents) to 2.56 TiB (83840 extents).
Logical volume vgdata/prod successfully resized.

Hostname:~ # resize2fs /dev/mapper/vgdata-prod
resize2fs 1.43.8 (1-Jan-2018)
Filesystem at /dev/mapper/vgdata-prod is mounted on /prod; on-line resizing required
old_desc_blocks = 145, new_desc_blocks = 164
resize2fs: Permission denied to resize filesystem
Hostname:~ #



 

Resolution

It's recommended to unmount the device, run a filesystem check (fsck), and then attempt the resize in offline mode.
Hostname:~ # umount /prod
Hostname:~ # e2fsck -y /dev/mapper/vgdata-prod
While offline resizes can sometimes work, addressing potential inconsistencies first offers a safer and more reliable approach.
 

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 tool.

Additional Information

  • Offline resize works fine.
  • Online resize of the ext4 file system fails with Permission denied to resize filesystem error.
  • From the dumpe2fs output, we see that the file system has errors
    • (sorted output)
      Filesystem volume name:   /prod
      Last mounted on:          /prod
      ...
      Filesystem state:         clean with errors 
      Errors behavior:          Continue
      ...
  • From the dmesg output, the file system was mounted with errors:
    • 2024-02-07T23:42:59.515638-05:00 Hostname kernel: [7600269.708365] EXT4-fs (dm-1): error count since last fsck: 17
      2024-02-07T23:42:59.515652-05:00 Hostname kernel: [7600269.708369] EXT4-fs (dm-1): initial error at time 1706261446: __ext4_get_inode_loc:4674: inode 130500902: block 521994388
      2024-02-07T23:42:59.515653-05:00 Hostname kernel: [7600269.708374] EXT4-fs (dm-1): last error at time 1706266002: ext4_mb_generate_buddy:759

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021357
  • Creation Date: 13-Feb-2024
  • Modified Date:08-Mar-2024
    • SUSE Linux Enterprise Server
    • SUSE Linux Enterprise Server for SAP Applications

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.