Questions tagged [resize2fs]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
47 views

Understanding the impact of using resize2fs [duplicate]

I want to use resize2fs to resize partition on my system, will doing so delete any files that is present on the partition or will it use the free space available on the partition to resize the same?
ROSHAN RAJAGOPAL's user avatar
0 votes
2 answers
53 views

The filesystem is already 65010688 (4k) blocks long

Please help me , when I try to increase the partition size in LVM, but when I try it doesn’t work, I do the following: df -h Filesystem Size Used Avail Use% Mounted on udev ...
Глеб Щеголев's user avatar
1 vote
1 answer
209 views

resize partition overlapping parted

parted -s -a opt /dev/sda "print free" Modèle: VMware Virtual disk (scsi) Disque /dev/sda : 268GB Taille des secteurs (logiques/physiques): 512B/512B Table de partitions : gpt Disk Flags: ...
Peutre's user avatar
  • 77
0 votes
1 answer
146 views

Moving Pop-OS installation to a smaller drive (using GParted?)

I need to move a Pop-OS installation from a 250GB HDD to a 128GB SSD. So far I have been trying to use GParted (which worked for moving my Ubuntu installation between drives of the same size). The ...
Victor Liu's user avatar
0 votes
1 answer
2k views

Change the size of the partition using parted

What am I doing wrong? I have an image, I added it as a loop device: losetup -P /dev/loop13 ./my_image.img gparted screenshot: Then I try to change the FS size for the partition first: e2fsck -f /...
Keonik's user avatar
  • 53
1 vote
0 answers
144 views

Resize2fs shrink operation leaves free space in filesystem?

I'm trying to shrink a filesystem image down to the smallest possible size. I'm okay with resize2fs leaving reserved filesystem blocks in place, but it's leaving about 400Mb of free space in the ...
Gogeta70's user avatar
  • 534
0 votes
1 answer
809 views

Increase size of a volume group

I have a 16GB msata but my rootfs is only 4GB. I need to increase the size of a volume group /dev/mapper/vg-var/ for my embedded system to full capacity. $ lsblk NAME MAJ:MIN RM SIZE RO ...
void_brain's user avatar
0 votes
0 answers
111 views

How can i use ffmpeg to compress a .mp4 ( h264 ) to a smaller size without quality loss? [duplicate]

Hello i am kinda new with ffmpeg and learning everyday, i am now looking for on how i can compress a video in a smaller size. since i have some 1920x1080 mp4 files with a rediculous high size. For ...
Sam van Viegen's user avatar
2 votes
1 answer
207 views

mkfs ext4 on Debian 11 - inconsistent resize_inode results on filesystem creation

I am running Debian 11 with all current updates (kernel 5.10.0-18 and e2fsprogs 1.46.2-2). I have been mkfs.ext4 some filesystems on various volumes - with lvm2 on top of mdraid, fwiw. Specifically, ...
lfabio's user avatar
  • 131
0 votes
1 answer
421 views

How can I clone from 1TB MBR ssd to 4TB GPT ssd?

I have a raspberry pi with a 1TB hard drive. I managed to fill it up, so I purchased a new 4TB hard drive to replace it. I then used software called "Macurim Reflect" to clone the previous ...
johncorser's user avatar
0 votes
0 answers
333 views

How to expand the space of the partition /dev/sdf4 until the end of the sdcard ? Neither resize2fs nor gparted work correctly

I would like to resize the /dev/sdf4 partition located on the sd card mounted on my Ubuntu 22.04 distro. I tried to accomplish this task using two approaches : using the command resizefs,but it ...
Marietto's user avatar
  • 501
0 votes
1 answer
263 views

Remove swap partition and extend root one(ext4)

sda 8:0 0 400G 0 disk ├─sda1 8:1 0 953M 0 part /boot ├─sda2 8:2 0 7.5G 0 part ├─sda3 8:3 0 1K 0 part └─sda5 8:5 0 391.6G 0 part / I'm having this type of ...
Viktor's user avatar
  • 217
0 votes
1 answer
384 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 ...
DeviC3's user avatar
  • 26
1 vote
1 answer
132 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 ...
Vladimir Dobias's user avatar
0 votes
2 answers
79 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 ...
caspah's user avatar
  • 1
0 votes
1 answer
131 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/...
Cyanmodex9's user avatar
3 votes
1 answer
6k 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 /...
Chris Stryczynski's user avatar
0 votes
0 answers
495 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, ...
alchemy's user avatar
  • 577
1 vote
1 answer
805 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, ...
Matt's user avatar
  • 13
0 votes
1 answer
3k 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 ...
Lindsay's user avatar
0 votes
1 answer
615 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:...
Tom Crawford's user avatar
0 votes
1 answer
438 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 : ...
Delirium's user avatar
  • 378
1 vote
0 answers
999 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 ...
Danya02's user avatar
  • 111
-1 votes
1 answer
3k 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 ...
Nasser_Omar's user avatar
0 votes
1 answer
370 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 ...
Typewar's user avatar
  • 177
2 votes
2 answers
740 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 ...
kvmhali's user avatar
  • 29
4 votes
2 answers
8k 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 (...
surfboardcompound's user avatar
0 votes
1 answer
213 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,...
Philippos's user avatar
  • 13.4k
0 votes
1 answer
175 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 ...
Harmonytalk's user avatar
1 vote
0 answers
346 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 ...
tio78's user avatar
  • 91
1 vote
1 answer
1k 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,...
Victor Augusto's user avatar
1 vote
1 answer
68 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 ...
yael's user avatar
  • 12.8k
1 vote
0 answers
2k 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 ...
Joseph Toney's user avatar
3 votes
0 answers
625 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: ...
Torsten's user avatar
  • 31
-1 votes
1 answer
41 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. ...
linuxNewbie's user avatar
2 votes
1 answer
3k 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 ...
yael's user avatar
  • 12.8k
0 votes
1 answer
2k 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 ...
intika's user avatar
  • 14.2k
1 vote
1 answer
4k 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....
sugarman's user avatar
  • 183
0 votes
1 answer
9k 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. ...
Ashfaqur Rahaman's user avatar
0 votes
2 answers
1k 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 ...
ezak's user avatar
  • 3
0 votes
1 answer
121 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/...
Thilagarajan Subramaniam's user avatar
2 votes
2 answers
4k 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 ...
msK's user avatar
  • 21
-2 votes
1 answer
48 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? ...
Rebroad's user avatar
  • 175
1 vote
3 answers
15k 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 ...
AstinTeeb's user avatar
0 votes
1 answer
761 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 ...
Christian Benseler's user avatar
4 votes
1 answer
2k 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 ...
Roflo's user avatar
  • 369
0 votes
0 answers
31 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
anonymous's user avatar
0 votes
1 answer
923 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 ...
Antonio Petricca's user avatar
8 votes
3 answers
7k 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, ...
magnus's user avatar
  • 439
2 votes
0 answers
273 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 (...
Tim's user avatar
  • 100k