-2
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            7,8G     0  7,8G   0% /dev
tmpfs           1,6G  9,5M  1,6G   1% /run
/dev/sda1        23G   22G     0 100% /
tmpfs           7,8G  696K  7,8G   1% /dev/shm
tmpfs           5,0M  4,0K  5,0M   1% /run/lock
tmpfs           7,8G     0  7,8G   0% /sys/fs/cgroup
/dev/sda3       477M  4,0K  477M   1% /boot/efi
/dev/sda5       888G   22G  822G   3% /home
tmpfs           1,6G   80K  1,6G   1% /run/user/1000

l noticed that I put all my files in the partition /dev/sda1 (system partition 23 GB) however I left empty /dev/sda5 which has 888 GB.

How can I access sda5 and put all the files there?

edit1

sudo du -h /var/cache
260K    /var/cache/cracklib
5,2M    /var/cache/debconf
1,4M    /var/cache/fontconfig
4,0K    /var/cache/cups/rss
6,4M    /var/cache/cups
4,0K    /var/cache/fwupdate
40K /var/cache/dictionaries-common
120K    /var/cache/ldconfig
24K /var/cache/man/sv
52K /var/cache/man/fr
20K /var/cache/man/gd
20K /var/cache/man/az
20K /var/cache/man/hi
20K /var/cache/man/hr
20K /var/cache/man/eu
20K /var/cache/man/fr.ISO8859-1
20K /var/cache/man/shn
20K /var/cache/man/bn
20K /var/cache/man/sq
20K /var/cache/man/oc
20K /var/cache/man/oldlocal
20K /var/cache/man/tr
20K /var/cache/man/zh_TW
20K /var/cache/man/hy
20K /var/cache/man/ne
20K /var/cache/man/km
20K /var/cache/man/en_AU
20K /var/cache/man/cs
20K /var/cache/man/ps
20K /var/cache/man/vi
20K /var/cache/man/lt
20K /var/cache/man/cy
20K /var/cache/man/he
20K /var/cache/man/ug
20K /var/cache/man/ml
20K /var/cache/man/ko
20K /var/cache/man/th
20K /var/cache/man/el
20K /var/cache/man/my
20K /var/cache/man/et
52K /var/cache/man/de
20K /var/cache/man/ku
20K /var/cache/man/zh_HK
20K /var/cache/man/bo
20K /var/cache/man/ca@valencia
20K /var/cache/man/ar
20K /var/cache/man/si
20K /var/cache/man/ca
20K /var/cache/man/fa
20K /var/cache/man/ast
20K /var/cache/man/kk
20K /var/cache/man/gl
32K /var/cache/man/es
20K /var/cache/man/hu
20K /var/cache/man/uk
20K /var/cache/man/bs
20K /var/cache/man/nn
20K /var/cache/man/sk
20K /var/cache/man/en_CA
20K /var/cache/man/eo
20K /var/cache/man/sl
20K /var/cache/man/io
20K /var/cache/man/id
20K /var/cache/man/mhr
28K /var/cache/man/pt
20K /var/cache/man/fo
20K /var/cache/man/pa
24K /var/cache/man/pl
20K /var/cache/man/fi
20K /var/cache/man/ms
28K /var/cache/man/ja
20K /var/cache/man/ta
28K /var/cache/man/ru
20K /var/cache/man/nb
20K /var/cache/man/fr_CA
20K /var/cache/man/lv
20K /var/cache/man/nl
20K /var/cache/man/pt_BR
20K /var/cache/man/fr.UTF-8
20K /var/cache/man/bg
20K /var/cache/man/uz
20K /var/cache/man/ce
20K /var/cache/man/en_GB
20K /var/cache/man/fy
20K /var/cache/man/sr
20K /var/cache/man/se
20K /var/cache/man/zh_CN
28K /var/cache/man/it
20K /var/cache/man/be
20K /var/cache/man/ro
20K /var/cache/man/te
20K /var/cache/man/da
3,8M    /var/cache/man
100K    /var/cache/app-info/xmls
5,5M    /var/cache/app-info/xapian/default
5,5M    /var/cache/app-info/xapian
5,6M    /var/cache/app-info
8,0K    /var/cache/lightdm/dmrc
12K /var/cache/lightdm
4,0K    /var/cache/fonts
420K    /var/cache/samba
4,0K    /var/cache/apt/archives/partial
80K /var/cache/apt/archives
89M /var/cache/apt
700K    /var/cache/postgresql/dicts
704K    /var/cache/postgresql
4,0K    /var/cache/pm-utils
4,0K    /var/cache/apparmor
113M    /var/cache

**EDIT2**

l took the last lines

    du -h /

    8,5M    /usr/share/texlive/texmf-dist/scripts
    12K /usr/share/texlive/texmf-dist/metafont/config
    32K /usr/share/texlive/texmf-dist/metafont/base
    112K    /usr/share/texlive/texmf-dist/metafont/misc
    160K    /usr/share/texlive/texmf-dist/metafont
    212K    /usr/share/texlive/texmf-dist/web2c
    8,0K    /usr/share/texlive/texmf-dist/mft/knuth-local
    20K /usr/share/texlive/texmf-dist/mft/base
    32K /usr/share/texlive/texmf-dist/mft
    20K /usr/share/texlive/texmf-dist/texdoc
    159M    /usr/share/texlive/texmf-dist
    92K /usr/share/texlive/readme-html.dir
    161M    /usr/share/texlive
    4,0K    /usr/share/libsensors4
    2,1G    /usr/share
    457M    /usr/bin
    11G /usr


du -h /var

4,0K    /var/cache/pm-utils
4,0K    /var/cache/apparmor
113M    /var/cache
5,0G    /var


du -h /lib 

208K    /lib/terminfo
20K /lib/apparmor
124K    /lib/sysvinit
8,0K    /lib/resolvconf
651M    /lib

sudo du -h /root
72K /root/tensorflow/tensorflow/tools/test
44K /root/tensorflow/tensorflow/tools/pip_package
16K /root/tensorflow/tensorflow/tools/compatibility/testdata
64K /root/tensorflow/tensorflow/tools/compatibility
48K /root/tensorflow/tensorflow/tools/benchmark
2,8M    /root/tensorflow/tensorflow/tools
62M /root/tensorflow/tensorflow
633M    /root/tensorflow
5,3G    /root

1 Answer 1

0

I believe you did the right thing with separating your /home from your /(root), but maybe were overly-optimistic on how much data an ubuntu install will use, and appear to be using your root account for something.

The /usr directory is where the programs are installed generally. This will grow as you install more software on your system.

The /var directory is where your data/cache/databases/logs are stored. It used to be considered best practice to separate this from the '/' in order to prevent system instability if the logs grew too fast and choked the system.

The /home is where your users data should go and it is always a good idea to keep it separate from '/'.

The /root in the root user home directory, and in modern linux distros it is considered bad security practice to use the root account, so it's size should be quite small. In this situation it is not, and it is filling /sda.

Solution A: Stop using the root account, and migrate it's data to another (new) account.

Steps:

  1. Create a new user using for example users-admin. Assign desired group permissions (including sudo privileges)

  2. Copy data across (from /root to /home/newuser) using something like rsync rsync -arv /root /home/newuser

  3. Remove old root data -- with care (perhaps just Downloads and Documents to start with)

Solution B: Re-partition -- which can be dangerous and lead to data loss.

Steps:

  1. boot into live cd/dvd/usb

  2. split sda5 into 3 (50 Gb for /var; 100Gb for /root; remainder stays as /home) using gparted

  3. edit the system fstab (not the live environment fstab) to have /var and /root mounted separately

  4. copy then delete the data from old /root and old /var to new locations. 'rsync -ar' would be best as it would preserve file creation and modification times

  5. get back into your system and hope for the best

It would be lovely if someone would be able to offer a simpler solution :-)

8
  • You should not move data from your sda1 to sda3. It looks like sda3 is part of uefi, and it's best left alone.
    – sergtech
    Apr 25, 2017 at 10:17
  • but in my sda1 l have only 23 go and 22 go are full . However sda3 is 888 go and empty not used at all
    – vincent
    Apr 25, 2017 at 10:18
  • do l need to repartition sda1 for instance move 100 go from sda3 to sda1 ?
    – vincent
    Apr 25, 2017 at 10:19
  • Let's see where the space is first. Perform, in order du -h /usr du -h /var du -h /lib sudo du -h /root On my desktops, the first two alone use about 10Gb.
    – sergtech
    Apr 25, 2017 at 10:27
  • Ok , i did it. see my update
    – vincent
    Apr 25, 2017 at 10:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .