Disk space used is more than what is actually shown!

I tried to increase the swap size from 4gb to 6gb using the GitHub jetsonHacksNano tutorial and after the completion I rebooted the system and got stuck on a black screen from where I had to clear some files in order to make disk space as I was getting the error “this computer has only 180mb disk space left” and I have a 32 gb sd card. So after rebooting the swap size was indicating 11.9GB instead of 6 GB. I disabled the file and uninstalled it using remove command and changed back to 4GB swap space but still my /mnt folder shows that it is using 8.3 GB space when there’s just one file in it of size 4GB and rest of the files are hidden.

I need help removing the hidden files and clearing space on my micro sd card!
All help is appreciated! (I’m new to Jetson Nano)

I don’t know if I can help or not, but some preliminary information might be useful. Is this SD card mounted on a host PC, or in use on the Jetson now? Can you work either way?

Note: On a Jetson the SD card is probably “/dev/mmcblk1”. On a host PC the SD card is probably “/dev/mmcblk0” (this might differ, but if you monitor “dmesg --follow” as you insert the SD card on the host PC, then it’ll tell you which device and partition it sees, along with an auto mount point if it auto mounts).

If mounted on the host PC, and if the mount location is “/mnt”, what do you see from:

  • du /mnt
    df -h -T /mnt
    ls -lid /mnt
    sudo ls -li /mnt/*
  • If on host and SD card as a whole is “/dev/mmcblk0” (adjust, maybe it is “/dev/sdb”):
    lsblk -f /dev/mmcblk0
    sudo gdisk -l /dev/mmcblk0
    sudo blockdev --getsize64 /dev/mmcblk0 (the SD card as a whole)
    `sudo blockdev --getsize64 /dev/mmcblk0p1 (the rootfs partition of the SD card)

In a similar way, if this is directly on the Jetson, and assuming the SD card is “/dev/mmcblk1”:

  • lsblk -f /dev/mmcblk1
    sudo gdisk -l /dev/mmcblk1
    sudo blockdev --getsize64 /dev/mmcblk1 (the SD card as a whole)
    sudo blockdev --getsize64 /dev/mmcblk1p1 (the rootfs partition of the SD card) free -h -g egrep ‘/dev’ /etc/mtab`
  • If it is the “/mnt” directory where you think things went wrong (adjust if you think it is some other location), what do you see from:
    du /mnt
    df -h -T /
    ls -li /mnt
    ls -li /mnt/*
  • I don’t know if or what the specific swap file is if you used a file, but if a file and if you know its name and location:
    ls -li /what/ever/swap/file/it/is
  • If this is a partition for swap, then the previous sudo gdisk -l command will have listed it, but specify this was a swap partition versus swap file.

Incidentally, many user space programs benefit from swap. However, some devices can only work with physical RAM. One of those is the GPU. So if you have a system where you want 16 GB more available for the GPU, then the only way to get that is with more physical RAM. Virtual memory will not work for a GPU. A side effect of providing virtual swap memory of other processes is that it might free up physical RAM for the GPU to use it, but this is only indirect, and regardless of the amount of swap you add there are many more limits on what is useful for a GPU versus ordinary user space programs.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.