You are not logged in.

#1 2025-03-18 19:33:00

Helloguysss
Member
Registered: 2025-03-18
Posts: 4

my disk is split and I don't know how to defragment it without losing

my disks are also partitioned, i have no idea how, but i want to merge them all into the directory where the 32gb system is located without losing data, can you help me please?

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 232,9G  0 disk
├─sda1        8:1    0     1G  0 part /boot
├─sda2        8:2    0    32G  0 part /
└─sda3        8:3    0 199,9G  0 part /home

Offline

#2 2025-03-18 19:40:11

kermit63
Member
Registered: 2018-07-04
Posts: 370

Re: my disk is split and I don't know how to defragment it without losing

Helloguysss wrote:

my disks are also partitioned, i have no idea how

How did you install arch? That's assuming that you are in fact, actually using arch linux.


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Offline

#3 2025-03-18 19:48:25

mackin_cheese
Member
Registered: 2025-01-07
Posts: 477

Re: my disk is split and I don't know how to defragment it without losing

Offline

#4 2025-03-18 20:25:59

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 1,321

Re: my disk is split and I don't know how to defragment it without losing

Helloguysss wrote:

my disks are also partitioned, i have no idea how

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 232,9G  0 disk
├─sda1        8:1    0     1G  0 part /boot
├─sda2        8:2    0    32G  0 part /
└─sda3        8:3    0 199,9G  0 part /home

well, looky looky somebody who used archinstall and didn't change the root partition size.

but i want to merge them all into the directory where the 32gb system is located without losing data, can you help me please?

1. * plugin external disk big enough to fit the contents of /home *
2. mount /dev/sdb1 /mnt (<= adjust to actual disk)
3. mkdir /mnt/home
3. cp -r /home/* /mnt/home/
4. logout user, login as root
5. umount /home
6. use parted, as stated above. (the wiki page even has a section on extending partitions) delete sda3. extending the root should work without unmounting, but I might be wrong. if not, reboot to a recovery disk and do it there.
7. mv /mnt/home/* /home/
8. edit /etc/fstab and get rid of the line with the disk
9. enjoy!!!

Last edited by jl2 (2025-03-18 20:27:05)


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Upload longer text output like this

Offline

#5 2025-03-23 14:53:43

Helloguysss
Member
Registered: 2025-03-18
Posts: 4

Re: my disk is split and I don't know how to defragment it without losing

yeah i reset the whole system so it was easier (accidentally deleted the kernel)

Offline

#6 2025-03-23 19:26:15

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 1,321

Re: my disk is split and I don't know how to defragment it without losing

Helloguysss wrote:

yeah i reset the whole system so it was easier (accidentally deleted the kernel)

ouch. don't forget to do backups


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Upload longer text output like this

Offline

Board footer

Powered by FluxBB