-1

I run Debian 6 linux located on SD card. Trying to extract tar.gz file to /opt directory , but system complains regarding no space available on disc. Command df -k brings:

user@ion:/opt$ df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                   984112         0    984112   0% /lib/init/rw
udev                     10240        24     10216   1% /dev
tmpfs                   984112         0    984112   0% /dev/shm
rootfs                  499640    474856         0 100% /
/dev/mmcblk0p2         1998608    321344   1677264  17% /usr
/dev/mmcblk0p3         1998608    198188   1800420  10% /var
/dev/mmcblk0p4         2938992    249096   2689896   9% /home

Please correct my understanding below. I see that rootfs fully used and it is for root directory /. And since /opt is placed in this location it is true that there is no space available. I'm right?

How to know which file is biggest in my system?

UPD

After I deleted some files in ~ directory, I still cant extract to /opt/. Just several files are extracted.

I can extract all files to ~ folder. Why I can extract to ~ and not /opt/ folder? How to fix it?

  • You can extract to ~, your home directory in the home partition, where there is available space, but if /opt is in /, the root partition, which is full, you cannot extract into that directory. – sudodus Jun 23 '18 at 7:31
3

Your /opt directory is on the root filesystem. Your root filesystem is full.

Your /home directory is on its own filesystem. Your home directory is not full.

For answers to your question about finding large files, see the duplicates to your recent similar question.

0

Finding what is using your disk space

Use k4dirstat or baobab, they are graphical tools, that will help you discover what is using up space. Warning it will tell you that /usr and a few other system dirs are using a lot of space, but little about which apps. However for you these are separate mounts.

Move /opt

Your / is tiny. You have /usr and /var on separate mounts so this may not be a problem, except that /opt is part of / (I assume).

You can move /opt to /home/opt, and then replace /opt with a symlink to /home/opt.

mv -T /opt /home/opt ln -s -t / /home/opt

Caviets

If you /home is mounted noexec (or nosuid or maybe some others), then it will not work without also doing a bind mount, to add these permissions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.