8

Suddenly, my disk is full and I don't really know why. How can I find out?

pi@raspberrypi ~ $ df
Filesystem     1K-blocks    Used Available Use% Mounted on
rootfs           3749072 3558828         0 100% /
/dev/root        3749072 3558828         0 100% /
devtmpfs           86184       0     86184   0% /dev
tmpfs              18888     700     18188   4% /run
tmpfs               5120       0      5120   0% /run/lock
tmpfs              37760       0     37760   0% /run/shm
/dev/mmcblk0p1     57288   18904     38384  33% /boot
tmpfs              37760   37760         0 100% /tmp

Also, what is this /dev/mmcblk0p1?

  • To answer your second question: /boot is the Raspberry Pi's boot partition and it is mounted on /dev/mmcblk0p1 which is the 1st partition of your SD card device. – HeatfanJohn Jun 26 '13 at 21:54
7

The du command will list the disk used.

  • thanks, it seems most of space is in 977852 ./var/cache/apt/archives 1012728 ./var/cache/apt 1019392 ./var/cache 1306768 ./var 1899548 ./usr 3441844 . – clamp Jun 26 '13 at 18:56
  • 6
    apt-get clean command clears out the local repository of retrieved package files. To clear the cache, type the following: sudo apt-get clean – Tevo D Jun 26 '13 at 18:59
3

This is the answer to the 2nd question asked, namely what is /dev/mmcblk0p1.

This is the 1st partition of the SD card and the file system /boot is mounted on that partition. /boot is the Raspberry Pi's boot partition.

If you run sudo fdisk -l you will see all of the partitions on your system, here's what's on my Pi:

$ sudo fdisk -l

Disk /dev/mmcblk0: 31.9 GB, 31914983424 bytes
4 heads, 16 sectors/track, 973968 cylinders, total 62333952 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00014d34

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192      122879       57344    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          122880    62333951    31105536   83  Linux

If you cat /etc/fstab you will see where the file systems are mounted, for my Pi:

$ cat /etc/fstab
proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1

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.