How do I check avaialble space in my SD card?

I'm using raspberry pi 3 and a 128gb SD card, I tried the command df -h and it gave me the following result:

Filesystem                Size      Used Available Use% Mounted on
/dev/root               252.0M     48.6M    198.3M  20% /
tmpfs                   461.6M     92.0K    461.5M   0% /tmp
/dev/mmcblk0p1           19.9M     14.6M      5.3M  73% /boot
tmpfs                   512.0K         0    512.0K   0% /dev

It doesn't seem right since I have 128gb card, how do I check available storage in this case?

Have you mounted it?
Give output of

Hi, this is the result:

root@OpenWrt:~# mount
/dev/root on / type ext4 (rw,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mmcblk0p1 on /boot type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=437                  ,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)

By default the root partition is about 250 MB, so the same image will fit on practically any card. The rest of the card is unused regardless of its size. There are two options to set up and use the rest of the space.

  • Create and format another partition, then mount it e.g. as /srv or /data,
  • Expand the existing root partition and its ext4 filesystem.

Unless you're a real CLI die-hard I'd suggest attaching the card to a Linux desktop and use gparted for either of these operations.

1 Like

I don't have any linux desktop atm, could you guide me through one of those options? (or just any guides links to start off)

I've created a bootable pen with GParted live to expand the rootfs partition by some GB and create a new f2fs partition, that I mount as /opt