Unable to resize /var/log partition

On Ubuntu Server a volume group size has been extended and the attempt to do a online resize of ext4 filesystem on volume group failed with the following error:

resize2fs /dev/sdd1
resize2fs 1.45.5 (07-Jan-2020)
Filesystem at /dev/sdd1 is mounted on /var/log; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
resize2fs: Permission denied to resize filesystem

After some troubleshooting the reason of the missing permission are the running processes which are currently have access to the partition (device is busy). So also an unmount didn’t work.

Solution:

  • Open fstab
    vi /etc/fstab
  • Comment out (#) the line with /var/log in it
  • Reboot the server
  • Check and repair the partition
    e2fsck -f /dev/sdd1
  • Resize the partition
    resize2fs /dev/sdd1
  • Mount the partition manually
    mount /dev/sdd1 /var/log
  • check if partition has correct size
    df -h
  • Delete comment in /etc/fstab
5 2 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments