Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Deleting file/folder from CLI doesn't update disk usage

Featured Replies

I'm moving some files across different drives. I'm using

rsync -a --progress /mnt/disk#/media/<some folder> /mnt/disk#/media/<same folder name>

to move them around. This moves the file without any issue, and I can see that on the destination disk the disk usage has increased. I can see this from the webGui. However, the source disk does not reflect any changes. I do not have a recycle bin application of any kind.

 

QGjMgr7.png

 

When I execute `rsync -a --progress /mnt/disk2/media/movies/<some folder> /mnt/disk5/media/movies/<same folder name>` everything works as expected.

 

I then execute `rm -rf /mnt/disk2/media/movies/<some folder>` but do NOT see the webGui reflect the free'd up space. I have shutdown the array, executed a parity check, restarted the array, gracefully rebooted, etc. Nothing seems to get the number to change from 8.73TB to something smaller. These are 50GB+ files that are being moved.

 

I've tried using `lsof | grep deleted` but nothing is spat back out. I am not using `mv` as I am aware that this might not actually move the file from a different disk, but just change the path of it.

 

Diagnostics.zip

Edited by nd319

  • Author

Executing the following increases the disk usage and appears correctly in the webGui.

cd /mnt/disk2/media
fallocate -l 10G delete.me

I then delete the file.
 

rm ./delete.me

Which then also correctly shows the file change in the webGui.

 

 

But doing rm on my existing files/folders doesn't. What gives?
 

  • Author

Very interesting. I copied another movie to my home directory. I did so using the following command:

rsync -a --progres /mnt/disk2/media/movies/<movie folder> ~/backup_of_movie

This operated at a speed of about 150MB/s.

I then deleted the source directory.

rm -r /mnt/disk2/media/movies/<same movie folder>

But did not see a change in the webGui, but it was gone from the directory.

I then copied the movie BACK from my home directory to the disk2 folder, again using rsync.

The first 50% was at a speed of about 850 MB/s. These are SATA hard disks. Not SSDs of any kind. The webGui did NOT show any writes to the disks, nor did the disk usage increase. When I reached ~50% the speed then dropped down to ~80-90 MB/s and THEN the writes started.

 

Checksum of all files show they aren't corrupted. I can play them back without issue.

  • Author

Looks like using Midnight Commander to delete files does it correctly. I used it to copy the same file to my home and then delete it from the disk. So how come using `rm` is giving a different behavior?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.