前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >“resize2fs: Permission denied to resize filesystem”

“resize2fs: Permission denied to resize filesystem”

作者头像
domain0
发布2019-10-12 17:29:51
5.8K0
发布2019-10-12 17:29:51
举报
文章被收录于专栏:运维一切运维一切

The Problem

On CentOS/RHEL 6, an LVM volume group size has been extended and an attempt to do online resize of ext4 filesystem on LVM volume group failed with following error.

代码语言:javascript
复制
resize2fs /dev/mapper/P05TRF1vg-vol_controlm
resize2fs 1.43-WIP (20-Jun-2013)
Filesystem at /dev/mapper/P05TRF1vg-vol_controlm is mounted on /controlM; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
resize2fs: Permission denied to resize filesystem

The Solution

A file system inconsistency blocked the online resize of the disk, which can be observed in the messages as logged below:

代码语言:javascript
复制
--message--
kernel: EXT4-fs warning (device dm-1): ext4_resize_begin:32: There are errors in the filesystem, so online resizing is not allowed
代码语言:javascript
复制
--dmesg--
EXT4-fs (dm-4): warning: mounting fs with errors, running e2fsck is recommended

Since the file system is in an inconsistent state, a file system check is required for this affected file system, so online resizing is not possible and the file system has to be unmounted.

1. Umount the file system.

代码语言:javascript
复制
# umount /controlM

2. Perform a file system check.

代码语言:javascript
复制
# e2fsck -y /dev/mapper/P05TRF1vg-vol_controlm

3. Resize the file system.

代码语言:javascript
复制
# resize2fs /dev/mapper/P05TRF1vg-vol_controlm

4. Remount the file system:

代码语言:javascript
复制
# mount /dev/mapper/P05TRF1vg-vol_controlm /controlM

5. Check if the file system has been resized.

代码语言:javascript
复制
# df -h

Note: You can refer “man e2fsck” if you want to know more about this command.

代码语言:javascript
复制
# man e2fsck

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • The Problem
  • The Solution
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档