You are not logged in.

#1 2023-10-28 03:05:53

cybercountry
Member
Registered: 2023-08-08
Posts: 10

[SOLVED] Problems with full storage (SDD or outher problem?)

Hello, I will start the topic by informing the problem and recent events and then I will inform my settings

At the beginning of the week, I was running low on storage space and so I decided to delete some games from Steam to free up space. Excludes, using Steam itself, a 68GB game. However, after that I realized that the game space was not freed up, causing my SSD to remain low on space.

I got worried from then on, and thought about formatting. However, I was dealing with some projects and decided to wait until the weekend. It turns out that now I'm running out of space more and more and from what I can tell, all the files I delete don't seem to free up the space back.

One of the first things I did when I encountered the problem was to look at the disk usage in the Gnome application. There I had the information that I was using around 100/120GBs of the SSD, but when checking through the Gnome Disks application, it was informed that I was using 200GBs or more.

I looked for other alternatives, and when using the "df -h" command I had the same response as the Gnome Disks application, which I was using around 200GBs. I tried using "ncdu" and got a response of around 100/120GBs. Both through ncdu and the gnome disk usage application, I can see which files are using x amount of space, and when looking this way I don't find files large enough to give the 200GBs.

At the moment, I have less than 1GB free, and I'm thinking about formatting. However, I wanted to be sure what the problem is before actually formatting. Hope I can find help here.

I use gnome version 45
I'm on Kernel: 6.1.60-1-lts
My SSD is a 240GB Western Digital (green version)

Below the images link:
https://imgur.com/HcWINCP
https://imgur.com/mKgUNGZ
https://imgur.com/mJ5kpdV
https://imgur.com/zzSV4iy

Last edited by cybercountry (2024-01-13 21:45:13)

Offline

#2 2023-10-28 06:15:38

Awebb
Member
Registered: 2010-05-06
Posts: 6,298

Re: [SOLVED] Problems with full storage (SDD or outher problem?)

Chances are the files are there but invisible to your user.

Compare

du -sch .[!.]* * |sort -hr

on your home folder as normal user and as root. Then try ncdu as root, perhaps with the -r flag for "read only", so you don't accidentally kill something. Ncdu has a lot of switches. Press e to toggle hidden files and use the --show-hidden switch, in case you have aliased ncdu (type ncdu to find out).

Offline

#3 2023-10-28 11:17:22

c00ter
Member
From: Alaskan in Washington State
Registered: 2014-08-28
Posts: 395

Re: [SOLVED] Problems with full storage (SDD or outher problem?)

Have you tried to balance your BTRFS fs? https://wiki.archlinux.org/title/Btrfs#Balance The problems you describe  are symptomatic. https://archive.kernel.org/oldwiki/btrf … ts_left.21

Last edited by c00ter (2023-10-28 11:19:53)


UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn

Offline

#4 2023-10-28 22:14:49

cybercountry
Member
Registered: 2023-08-08
Posts: 10

Re: [SOLVED] Problems with full storage (SDD or outher problem?)

Well, what I'm going to say will seem pretty stupid, but that's how it happened

A few minutes after posting this topic here, I went to update the system and I use timeshift-autosnap to make snapshots before updating. When analyzing the command output, I realized that there was a snapshot related to my home, and I decided to open timeshift to check.

When looking at the timeshift files, I noticed that there were two directories referring to /home, which were more than 120GB in size. I thought the problem could be this, I was making snapshots of my /home (in the timeshift settings I set it to not make snapshots of the home, but I think that timeshift-autosnap was ignoring this setting). I decided to delete both directories, they would take too long and then I went to sleep.

When I woke up, several problems were already occurring and within a few minutes — still feeling sleepy — I noticed that I had deleted my /home. I didn't really understand what happened, I tried to format the SSD since there was no turning back now, but the OS was no longer recognizing /home.

I decided that instead of having more problems trying to solve, I would format and install everything again since I had a backup of the files. After a few hours of having problems with archinstall, I installed it manually and it was at that time that I realized what was wrong.

A few months ago I bought this SSD, I wanted to copy my current /home to it. I had a lot of difficulties with how I was going to change the @home subvolume from one SSD to another, and after some consultation on forums I managed to make a snapshot of my home and send it to the new SSD with the btrfs commands. It turns out that I forgot to delete the snapshot or some other file related to that procedure I did, and that was taking up storage, and when I deleted those timeshift directories, I was somehow deleting the directories from my current home.

After reinstalling the OS and redoing the procedures, I believe that this time I did it correctly. At least all of this ended up serving as a lesson.

I recovered the backup, installed the OS again and I'm already using it. Thanks for your help anyway, I feel more comfortable asking for help here again if necessary.

Offline

#5 2023-10-28 22:15:22

cybercountry
Member
Registered: 2023-08-08
Posts: 10

Re: [SOLVED] Problems with full storage (SDD or outher problem?)

The procedure I performed to move the @home subvolume from one SSD to the other was:

```
sudo mkdir /mnt/old
sudo mkdir /mnt/new
sudo mount /dev/sda2 /mnt/old -o subvolid=5
sudo mount /dev/sdb /mnt/new -o subvolid=5

sudo btrfs subvulume snap -r /mnt/old/@home /mnt/old/home-transfer
sudo btrfs send /mnt/old/home-transfer | sudo btrfs receive /mnt/new
sudo btrfs subvolume snap /mnt/new/home-transfer /mnt/new/@home
```

But, I forgot to delete the @home-transfer snapshots (This was the one I deleted when I was looking at the files in timeshift, and I believe that @home would be my current home)

This time, I believe I performed the right procedure to delete the @home-transfer subvolume

```
sudo mkdir -p /mnt/old
sudo mkdir -p /mnt/new
sudo mount /dev/sda2 /mnt/old -o subvolid=5
sudo mount /dev/sdb1 /mnt/new -o subvolid=5
sudo btrfs subvolume delete /mnt/new/home-transfer
sudo btrfs subvolume delete /mnt/old/home-transfer
```
btrfs is a very powerful file system, but also very complicated. After all this, I wanted to read more about the documentation.

The worst part was that my backup was from 3 days ago, so I still ended up losing some things, and the good part was learning

Last edited by cybercountry (2023-10-28 22:17:40)

Offline

Board footer

Powered by FluxBB