I'm a new user to Ubuntu and I'm using Ubuntu 20.04.2 LTS on my laptop. I deleted some video files to free my hard disk space but after that hard disk space not increased (I also deleted files from trash). Can someone tell me how to solve this problem? Do I need to mount the rpool partition 7? If so,how can i mount?
2 Answers
Some of the data may be tied up in snapshots. You can list them in the terminal with the following command:
zfs list -t snapshot
If there is one that is particularly large, you can remove it like this:
sudo zfs destroy rpool/USERDATA/MHT@FRIDAY04-30-21
Be careful when issuing zfs destroy
commands, because there is no undo. You will not destroy your file system, but you will not be able to rollback to a point in time if you need to.
-
Thank you,sir.I tried the (zfs list -t snapshot) command.There is no large file.– MHTMay 3, 2021 at 12:49
-
2Note also that zfs sometimes deletes things slowly, so it may just not be finished deleting things and waiting a bit may resolve the issue. May 30, 2021 at 14:12
-
-
Didn't know files can be tied up in snapshots. Deleting the snapshots reclaimed the free space immediately.– synkroMar 1, 2023 at 6:07
Possibly this is not related to zfs.
There are two cases where deleting a file in unix only deletes the name, not the actual data.
Those two cases are:
- hard linked files, where the file is not deleted until the last hardlink is deleted
- open files, where the file is not deleted until the last program with the file open closes it or exists (and all hardlinks are deleted)
You can check for hardlinks with the ls -l command (but if you've already deleted it, that's no help).
If you know what might have had large files open, you can try closing or killing those programs. Or just reboot.
Note that if you reboot, make sure it is a clean shutdown and reboot, otherwise the files will still not be deleted without a fsck, and the fsck may just relocate them to LOST+FOUND.
-
Thank you so much for your answer,sir.Now I'm reinstalled Ubuntu 20.04.2 without used zfs and machine is worked fine,sir.– MHTJun 2, 2021 at 14:30