Seeking help with Debian root drive being full

You misunderstood my question. I was asking about the size of the physical disk.

1 Like

This looks like a cloud VM, like Oracle or similar. So I believe, they can extend their root, just need to extend the cloud volume and then - LVM, and then - the filesystem (I know, that you may issue lvextend with a -r option instead).

This is a VM on my home server using Hyper V.

I am going to stop the node, edit the yaml to send logs to a file as suggested.
How do I auto delete that file daily?
How do I find all the old logs and manually delete them?

Not sure it installed, but if it did, what command(s) do I run?

you can run this command:

ncdu / --exclude /media/storjdisk

run ncdu on root dir, except this dir /media/storjdisk

P/s: a better command would be

ncdu -x /

Thanks to @Toyoo

Not installed. Tried apt-get update already too

I see you are using stretch, I don’t have experience in runing such old distro, you can:

  1. download deb and install it manually https://pkgs.org/download/ncdu
  2. (not recommend but it possible) try to change your source.list file to buster and update and install it - install only ncdu - and then change source.list back to stretch.

P/s: the reason it not working is because ftp.us.debian.org don’t support it anymore, maybe some other mirror could still (see this Debian version history - Wikipedia - freexian still support them - but I’ve no idea - good luck).

Where do the logs go by default? I want to go there and remove the logs.
The config.yaml file is located on /media/storjdisk (aka /dev/sdb1) but my /root (aka /dev/mapper/devian–storj–vg-root) is the one that is filling up over and over.

They are two different logical volumes and not associated with each other. my /root is on a single hdd where all my OS’s are stored and my /media/storjdisk is on 20 RAID’d drives.

My current config.yaml has the redirected logs commented out, so where is it by default?

Have you run ncdu yet?

You seem to have an impression that logs take a lot of disk? Going back to the first image Seeking help with Debian root drive being full - #10 by rml52

Largest file is syslog only take near 6MB of your disk, my life as a sysadmin - I’ve never find logs taking significant diskspace ever, could prove to me that I’m wrong after you run ncdu?

If it’s your own server, can’t you give that volume group 10GB more and extend the logical volume?

man logrotate

1 Like

I have not installed it manually yet. I Googled it and due to requirements seems like it would take a lot of manual efforts. I only know basics of linux and most is due to STORJ. So this node has been on and working just fine since summer of 2019 and I just let it run until recently when the out of space issues started.

Is there any other command I can run? the du command mentioned didn’t work.
I tried find / -type f -size +10M and see nothing on the OS only storj related

I have tried Googling how to expand the root disk and thought I did it but apparently not as I tried to go to 30 but it still says 20 in the system. I have manually removed files I think are safe to go…

Did you use “lvextend -r …” to resize the filesystem? If not, you need to run “resize2fs” to resize the filesystem.

1 Like

Can you post the output of these 3 commands?

pvdisplay
vgdisplay
lvdisplay

image
image

If the swap LV was there before then you didn’t expand anything. Here’s a howto

You just need to find out how to extend the partition in Hyper-V. Alternatively you could create an additional physical volume on the same disk and add it to the vg.

Can I get rid of the swap and move that 10 to root?

While it might help overall, the drive still keeps going up 1% a day so that would only get me 10 days

Yes, I guess that would be easier.

Of course you should additionally divert the logs to a file on /media/storjdisk. Maybe diverting the logs would be enough, but if your root is constantly over 90% I would increase the size too.

1 Like