Is it possible to manage partitions while it is mounted?

One thing I find annoying with Linux is that whenever I want to manage my partitions, for example resize especially, I can’t do it without first unmounting. I am not too sure how Windows can resize partitions while it is mounted, however why Linux can’t do the same thing?

ANyways I am using gparted to resize and manage my partitions but I have to first unmount it. I was wondering if there was an alternative to gparted or something where I can still resize a partition while it is mounted?

linux can if you have the right filesystem.

That said windows “can” but you run the risk of loosing data when you resize an active ntfs partition.

I know btrfs allows for online growing/shrinking, ZFS should allow shrinking but idk about growing. The issue with ones like EXT4 and XFS that dont is they largely havent had major design changes in 20-30yrs. EXT4 is largely a stop gap evolution of EXT3 (which was an extended ext2) which is 20yrs old and XFS was designed in the early 90s.

you really shouldnt resize active partitions due to data loss risks regardless of OS.

1 Like

Is ext4 faster or btrfs?

It doesn’t. It unmounts it, does the operations you want, and then remounts it.

Exactly this.

WHen I resize the C drive on Windows it is able to do without unmounting, otherwise how is the OS supposed to run without having issues?

NTFS can be resized online but it has some issues with it. There’s certain things like issues with unmovable files that can cause it to corrupt and make resizing risky at times.

Btrfs is usually slower than ext4 due to its feature set which is designed around data integrity. Ext4 from a technical standpoint is more prone to data integrity issues and leaking sensitive data into the journal but its more mature than btrfs which is very actively developed so its a stable default

Btrfs can have some good read numbers when you involve compression though. I use btrfs for its zstd compression which saves me 50-100gb on my drives and can make sata ssd reads effectively double with compression.

1 Like

You may think windoze is running and resizing without issues - but then again we are not privy to the list of people who have complained about lost data having done such an operation.
IMHO it is basic hygiene to un-mount and resize - rather than rely on the file system doing fancy footwork to allow use of the file system whilst resizing.

3 Likes

Not accurate. Windows shows you that the operations have been preformed but in actuality they are not performed til one does a restart.

1 Like

Does it matter if Windows really can resize an unmounted partition?
So what?

The answer to the topic question is simple.
No.
So what?

Have a nice day, and for programmers, have a productive night! :joy:

1 Like

Right I see mate.

Kinda, I mean like if I am doing it to a system partition I would have to boot into a live version before I can resize anything.

yeah, that’s a good kind of procedure :wink:
changes to a partition can be done from a livesystem (therefore one may also take an USB-stick GParted or bootrepair )
or another OS at the harddisk

1 Like

Yea in linux you are correct either boot into a live environment or into another installed OS on your system to perform partition operations on a OS partition / drive. This is share stupidity this day and age. Windows since 95 has had the above ability I mentioned so there is no real reason for it not to be in Linux after all this time.

Linux isn’t trying to be Windows first and foremost. And every time someone cries “Windows can do it,” my initial thought is good - then use Windows.

Maybe you can with btrfs. You should NEVER, no matter how good of an idea you may think it is, EVER resize a minute partition anyways.

You asked which fs is fastest - Google it, there’s tons of good info out there, but theoretically btrfs should be faster, although, you would likely need a machine level timer to tell, it’s like 0.001seconds difference. Use whatever system makes you happy. I like ext4. I like stability over features in that regard.

I would really argue that if you’re needing to resize so often, this is a feature you can’t live without doing in a live iso environment, you should really figure out why you’re moving partitions so often. I’ve probably done it like twice ever. It’s too risky, and you should almost never need to do it. So why you’re doing this regularly enough to complain, you need to look at what is the root of the issue.

3 Likes

EXACTLY this.

It’s pretty simple to resize Btrfs partitions while they are mounted. You can even move a Btrfs filesystem from one partition–or disk–to another, while the system is live (mounted and running) with btrfs-replace. It feels a little bit like open heart surgery, but it works! :sweat_smile:

Then again, if you are using Btrfs then having multiple partitions in the first place is kind of pointless since you can just divide up the disk with subvolumes instead. Better to have one big Btrfs partition and add/remove subvolumes at your pleasure.