Reclaiming disk space for USB storage - HDD

Bishop27

Member
Jul 3, 2024
39
1
8
Hello all,
I have a situation I could use some assistance with, I have a usb storage box that has 3 hard drive inside that totals 6TB the file system is set to ext4. Well now its 98% full so I've decided to remove files from the disk and reclaim that space. This usb storage box is mounted to a LXC and I've tried using fstrim -a from within the LXC with no success.

/dev/sdg2 5.5T 5.4T 75G 99% /media/MEDIA-STACK

Thanks in advance.
 
I've tried using fstrim -a from within the LXC with no success.
On an unprivileged CT, you won't be able to run fstrim AFAIK. However (& depending on how you've mounted that disk inside the CT) you could possibly try pct fstrim <ctid> from the host node as shown here:
pct fstrim <vmid> [OPTIONS]

Run fstrim on a chosen CT and its mountpoints, except bind or read-only mountpoints.
 
  • Like
Reactions: alexskysilk