Questions tagged [resize2fs]

A utility to resize ext2, ext3, or ext4 file systems.

Filter by
Sorted by
Tagged with
0 votes
1 answer
52 views

Debian - add disk and resize main partition

I've added new disk to server and now I need to resize main / partition with this space. I remember few years ago that I have done something like this but every tutorial on the net is about adding ...
user avatar
  • 16
1 vote
1 answer
48 views

Negative disk used space after shrinking RAID1 in Debian 11

I resized an ext4 software RAID1 consisting of two disks sda3 and sdb3 (in rescue mode, i.e. disks are not mounted): e2fsck -f /dev/md126 resize2fs /dev/md126 39G mdadm --grow /dev/md126 --size 40G ...
user avatar
0 votes
2 answers
33 views

how to add to current fs ext4

So I deleted my windows partition and now I'm trying to add to the currant partition but it's not letting me either through GParted or KDE part.. any suggestions? :caspah@debian:~$ sudo lsblk NAME ...
user avatar
  • 1
0 votes
1 answer
29 views

resize /dev/sda8 to add 40GB

I have a question regarding the enlargement of a partition without LVM. I have already read through some things how to proceed here, but I am still unsure, so I ask the question myself. I have /dev/...
user avatar
0 votes
1 answer
632 views

Ubuntu ext4 partition is not being extended or resized as expected with growpart or resize2fs

I've previously used growpart and resize2fs to resize a mounted online ext4 paritition in a Linux system. Currently I have a Ubuntu guest running in virtualbox that I'd like to resize the partition /...
user avatar
0 votes
0 answers
59 views

Can't resize mounted file to dir after increasing size (fallocate)

I created a file to mount as /tmp dir to limit it's size so it cant crash the system. I used mkfs.ext4 on it and it mounts in /etc/fstab. Now I need to increase the size, so I used fallocate again, ...
user avatar
  • 302
1 vote
1 answer
42 views

How to resize root ext3 file system without LVM

My Debian vmware image has run out of space. I've expanded the disk image but now need to increase my root partition to see the additional space. My volume is setup as follows Disk /dev/sda: 50 GiB, ...
user avatar
  • 13
0 votes
0 answers
61 views

Unable to mount ext4 partition - bad geometry

I've got a HDD disk that was sitting on a shelf for a long time (since 2015?). I've now put it into an external USB drive caddy and trying to mount it but it fails, the geometry seems to be off by 1 ...
user avatar
  • 1,940
0 votes
1 answer
132 views

In an Ubuntu VM in VMWare I increased the hard disk space, how do I add that to the file system?

I have an Ubuntu (v20.04) VM in VMWare. I increased (2x from 20G to 40G) the hard disk size. How do I add that space to the file system? From lsblk, I have the following: sda is 40G type disk which is ...
user avatar
0 votes
1 answer
110 views

cannot resize disk on aws instance

I tried following the instructions in: Can't resize a partition using resize2fs But nothing seemed to work. The output of lsblk is: [AWS root@archive ~]$ lsblk NAME MAJ:...
user avatar
0 votes
1 answer
109 views

How to resize /dev/sda2 when it is md0 sw raid 1

I just added bigger 4TBfrom 2TB ssd to the md0 raid but the size is still the same. I tryed to resize .partition but it says it is busy. Parted is still resizing it on old size. array: Personalities : ...
user avatar
  • 338
1 vote
0 answers
219 views

Why does resize2fs shrink a partition by first moving blocks right after the end of the specified range? Can this be changed?

I am currently shrinking a rather large partition with resize2fs in order to recover empty space in an LVM volume group. The way I understand it, a file system shrink operation, for every block ...
user avatar
  • 111
0 votes
1 answer
86 views

Adjust a disk space available for a directory in Linux

I need to adjust the disk space given for an ordinary directory such as /opt directory. I'd found that the /opt directory allocates the space 4.0G, by using the below command: sudo du -sh /opt I need ...
user avatar
0 votes
1 answer
66 views

How to (safely) free up space in front of ext2/3/4 partition using fdisk / resize2fs

I was wondering how you could safely free up space in front of a partition using command line tools such as fdisk or resize2fs. I know it's possible to do this with gparted, but that is not available ...
user avatar
  • 147
2 votes
2 answers
110 views

Unable to extend LV file system in Ubuntu Server

I run a bare metal Ubuntu server with several VMs running in a KVM environment. I want to increase the size of one VM from 50GB to 100GB. I ran the following command to increase the nextcloudph-lv ...
user avatar
  • 29
1 vote
1 answer
1k views

how do I shrink a partition, right after shrinking its filesystem with resize2fs?

This is what've done to shrink /home partition filesystem: e2fsck /dev/sda1 resize2fs /dev/sda1 150G As of now, if I run df it is going to show me that the partition has shrunk from 210G to 150G (...
user avatar
0 votes
1 answer
101 views

Umderstanding the output of resizefs -d 32

After shrinking an ext4 file system with resize2fs M I mounted it to realize it has only 57% used. So I ran $ resize2fs -d 32 -M rootfs-2021-06-28.img resize2fs 1.44.5 (15-Dec-2018) fs has 9698 inodes,...
user avatar
  • 11.2k
0 votes
1 answer
65 views

How can I shrink/use a Logical Volume and use it as swap

How am I able to reduce /var/lib/vz logical volume (/dev/vg/data) and use it/increase the current swap size? /etc/fstab UUID=c4408a1c-aa5b-4ce2-a9e8-1673660331e9 / ext4 defaults ...
user avatar
1 vote
0 answers
77 views

Calculate correctly the ext2 used blocks by the file system

What I'm trying achieve is, a safe shrinking of an ext2 file system and make sure I can cut/shrink the physical partition underneath to a safe minimum (without cutting file system blocks). I have ...
user avatar
  • 11
1 vote
1 answer
365 views

How to shrink LVM physical volume with free space

I want to shrink my LVM physical volume and use this free space to create another partition for another OS. I resized my root and home logical volumes using lvresize and now I'm trying to use pvresize,...
user avatar
1 vote
1 answer
41 views

is it possible to know on which date and time resize2fs was activated on disk

we have rhel machine with disk sdb , and disk OS is sda before couple days - not sure about the time & date resize2fs was implemented on the disk sdb , so disk sdb expended from 20G to 40G is it ...
user avatar
  • 10.9k
1 vote
0 answers
1k views

Trying to grow a partition fails, resize2fs keeps asking to run e2fsck first

I used Gparted first to place some free space directly to the right of my xubuntu installation on /dev/sda4, but it fails to grow the partition to include the free space. I then tried these below ...
user avatar
2 votes
0 answers
242 views

How to calculate correct partition size when shrinking filesystem with resize2fs

After shrinking a read only filesystem with resize2fs on GNU/Linux, how do i determine the correct partition entry for the shrunken filesystem? Initial partition scheme of remote host: Disk /dev/sda: ...
user avatar
  • 21
-1 votes
1 answer
36 views

How to resize LVM

I found many related questions and answers like this or guides like this but most of them didn't want to do exactly what I want and I am feeling quite insecure and am afraid of doing something wrong. ...
user avatar
1 vote
1 answer
1k views

rhel + efsck + Deleted inode xxxxx has zero dtime

when I try to resize the disk we get that resize2fs /dev/sdb resize2fs 1.42.9 (28-Dec-2013) Please run 'e2fsck -f /dev/sdb' first. so when I try to do e2fsck I get the following e2fsck -f /dev/sdb ...
user avatar
  • 10.9k
0 votes
1 answer
614 views

Partition mounting/resizing failed to read last sector?

After a failed resizing operation, mount operation is failing with: Failed to read last sector (718198764): Invalid argument The partition is not accessible with Gparted and other GUI tools. How can ...
user avatar
  • 12.7k
1 vote
1 answer
1k views

How to shrink a file image, produced with dd?

I tried the process from this post resize partition on an image file. I didn't succeed in understanding why it goes wrong in my case. I produced a 8GB image using dd. The image contains two partitions....
user avatar
  • 173
0 votes
1 answer
4k views

How to recover filesystem and physical size mismatch

I was trying to shrink my home partition. I followed this ArchWiki article for that. According to this I first resized my filesystem using resize2fs and then resized my physical device using parted. ...
user avatar
0 votes
2 answers
905 views

resize home partition and take from root partition to increase home space

here is my partitions lsblk -o NAME,FSTYPE,LABEL,SIZE,MOUNTPOINT NAME FSTYPE LABEL SIZE MOUNTPOINT sdb 9.1T ├─sdb1 swap 16G [SWAP] ├─sdb2 ext3 512M /boot ├─sdb3 ...
user avatar
  • 3
0 votes
1 answer
56 views

I would like to extend /dev/sdb1

[root@localhost ~]# df -h ; fdisk -l Filesystem Size Used Avail Use% Mounted on devtmpfs 894M 0 894M 0% /dev tmpfs 910M 0 910M 0% /dev/...
user avatar
1 vote
1 answer
2k views

How to check progress of an already running lvresize command?

First, filesystem was backed up and unmounted succesfully. Then, an lvresize was executed, and is already running: lvresize --resizefs --size 1024G /dev/dbdrp/db And shows the output: fsck from ...
user avatar
  • 11
-2 votes
1 answer
32 views

Is there any reason why ext4 device drivers cannot be updated to allow online resize (reduce AND extend)?

Question says it all really. I am a little baffled why ext4 doesn't already provide the ability for a partition to be resized online. Can anyone help me to understand why this does not exist please? ...
user avatar
  • 127
1 vote
3 answers
10k views

Ubuntu 18.04 Extend Disk

I've got a virtual Ubuntu 18.04 server which is running low on disk space. As this is a virtual server I increased the hard disk size in vSphere. I can see the free space in cfdisk but am unsure how ...
user avatar
0 votes
1 answer
366 views

Ubuntu on Azure: increase partition size

I have basic unix skills and have to do some maintenance on a linux machine (Ubuntu 18.04). hosted on Azure. I need to resize the /dev/sda1 partition, giving more space to it. When I run df -h it ...
user avatar
4 votes
1 answer
998 views

Just how dangerous is sending SIGINT to resize2fs tasked with shrinking?

I inherited an old PC-server (quad Pentium 4) that only had partitions for /, /boot and swap (RAID1 with 2 1T SATA disks), but needed to update the distro (from CentOS 6.9). I decided to create a new ...
user avatar
  • 369
0 votes
0 answers
29 views

How to merge two unallocated partitions which 1st is on left site and 2nd is on right side [duplicate]

This is how it looks. I wonder if it's possible to merge the 2 unallocated partitions without data loss
user avatar
0 votes
1 answer
474 views

"Resize2FS" compact data blocks before resize

We suppose to have a partition of 100Gb filled up by 75Gb of data. We want to reduce it by 20Gb. Does resize2fs move the 75Gb of data to the remaining 80Gb, and then resize the partition? In other ...
user avatar
8 votes
3 answers
4k views

How can a disk without a partition be "partitioned" without losing data?

I have a 1TB portable hard drive that I use for backups. The entire drive (/dev/sdb) has been formatted as an ext4 filesystem. I have been reading about the benefits of btrfs for backups (checksums, ...
user avatar
  • 399
2 votes
0 answers
159 views

Does `resize2fs` only move the end position of a filesystem?

man resize2fs says The size parameter specifies the requested new size of the filesystem. Does resize2fs only move the end position of a filesystem, not the beginning position of a filesystem (...
user avatar
  • 89.8k
-1 votes
1 answer
219 views

How shall I better calcuate the target sizes for shrinking a LV and filesystem?

I had a LV with a ext4 filesystem. lubuntu@lubuntu:~$ sudo parted -l Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/lubuntu--vg-root: 499GB Sector size (logical/physical): 512B/512B ...
user avatar
  • 89.8k
0 votes
3 answers
705 views

Does `resize2fs` by default do nothing?

For resize2fs, If ``size parameter is not specified, it will default to the size of the partition The size of a filesystem is by default the size of its underlying partition. So by default, ...
user avatar
  • 89.8k
0 votes
1 answer
309 views

How does `resize2fs` change the size of a file system?

According to https://unix.stackexchange.com/a/501454/674, parted's resizepart does not care about the filesystem at all. It just changes the partition table to specify a new location where the ...
user avatar
  • 89.8k
-1 votes
1 answer
724 views

How is the size of a filesystem defined?

man resize2fs says The resize2fs program will resize ext2, ext3, or ext4 file systems. It can be used to enlarge or shrink an unmounted file system located on device. ... The size parameter ...
user avatar
  • 89.8k
0 votes
1 answer
2k views

Do `parted resizepart` and `resize2fs` not modify or remove existing files on a partition?

Does parted's resizepart command by default not modify or remove existing files on a partition? Furthermore, does it never modify or remove existing files on a partition (even by some option)? ...
user avatar
  • 89.8k
1 vote
1 answer
127 views

Extend filesystem and LVM

I need to add more space to my filesystem. Right now it looks like this : Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_dcqsvu009-lv_root 50G 47G ...
user avatar
  • 111
1 vote
1 answer
1k views

resize2fs failed to find disk

I'm trying to resize my disk that's on google cloud from 1TB to 2 TB. I resized the disk space in google's console as instructed and: df -h Filesystem Size Used Avail Use% Mounted on overlay ...
user avatar
  • 111
1 vote
2 answers
3k views

How to resize linux partition with RAID1?

I have a Proxmox disk with 130Gb LVM image. I moved it to 235Gb disk. And resized in the Proxmox. Done. But in my Linux distro, the partition still 130Gb (disk become 235Gb). The partitions: /dev/...
user avatar
0 votes
1 answer
791 views

Resize partition without using LVM

I have Ubuntu 16.04 installed on remote server and I have requested another 20GB for my /dev/vda2 partition (now its 20GB), so the total size would be 40GB. Since vda2 is full of very valuable data (...
user avatar
  • 125
1 vote
1 answer
635 views

Extend LVM size

I have an EC2 instance which has 2 EBS (1 x 200G, 1 x 100G). Below is the output of lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvde1 202:65 0 200G 0 disk / xvdj ...
user avatar
  • 123
3 votes
2 answers
1k views

why is resize2fs telling me wrong information

Good afternoon! I am attempting to shrink an ext4 partition and I have found many tutorials online to achieve this, however, when implementing the actual changes, resize2fs is telling me wrong ...
user avatar