Non-destructive repartitioning

I have Manjaro happy & running on my NVME disk, but I need to resize partitions to make more space for /var partition.

This is the current situation:

Options is either shrink down / partition, either /home to make more space for /var. Is it possible to do it without full reinstall and/or losing existing data? I suppose I need to boot from live disk, but what then?

Thank you in advance.

Shrinking down / would probably be the better choice, but that would mean having to move the start of the /var partition, which includes moving the data around. That’ll take a lot of time for 80GB, but it’ll work. You should be able to do this in both gparted and the kde partition manager, although personally I found gparted works better for this. Grab the manjaro gnome live image and boot into that, since the partitions need to be unmounted for resizing.

If you had used btrfs, you could’ve used one partition with several subvolumes instead, which would’ve been easier. Another option with ext4 would be to have used a LVM layout, but that can have an impact on performance. Both of these are too late now though. :slight_smile:

1 Like

There are ways to resize partitions. I don’t know how safe it is to do so. However, I do know that it’s a fairly lengthy story.

Personally, I would have gotten an extra drive, somewhere, somehow, yo make backups and reinstall everything from scratch.

Butwhatever you do , make backups. And then, for good measure, make backups of the backups.

1 Like

GParted being used from a live ISO without any partition being mounted is usually pretty safe. Nevertheless, backup all data you don’t want to loose.

Shrinking /home looks to be the smarter approach as your / partition is already kind of small. In detail: Shrink /home and then move it to the right. Then you can expand /var. Compare UUID’s, they should not change.

If you use /etc/fstab to mount your partitions make sure to use the final UUID’s, then you should be fine.

1 Like

Thank you everyone for replies and suggestions.

I booted up Manjaro Gnome with gparted and without any problems or data loss shrinked down / and resized /var. Everything went smoothly and because of fast NVMe disk, the whole operation took 3-4 minutes.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.