DarKOrange
Posts: 17
Joined: Thu Jul 09, 2020 3:18 pm

External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external HD)

Wed Aug 05, 2020 8:05 pm

Hi all,

I was trying to check how much space was left on my external drive when I realised that it was not listed. How to fix that?

Thank you for your help!

Laurent
Last edited by DarKOrange on Thu Aug 06, 2020 10:01 am, edited 2 times in total.


DarKOrange
Posts: 17
Joined: Thu Jul 09, 2020 3:18 pm

Re: How to check how much free space is left on external USB Hard drive

Thu Aug 06, 2020 6:41 am

I did that but the USB drive partition is not listed

Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
/dev/root 29G 2,2G 26G 8% /
devtmpfs 184M 0 184M 0% /dev
tmpfs 216M 0 216M 0% /dev/shm
tmpfs 216M 22M 194M 11% /run
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 216M 0 216M 0% /sys/fs/cgroup
/dev/mmcblk0p1 253M 55M 198M 22% /boot
tmpfs 44M 0 44M 0% /run/user/1000

The mounted partition is on /dev/sda

Disk /dev/sda: 58,6 GiB, 62914560000 bytes, 122880000 sectors
Disk model: STORAGE DEVICE
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x55dd0322

User avatar
rpdom
Posts: 17275
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How to check how much free space is left on external USB Hard drive

Thu Aug 06, 2020 8:51 am

From what I can see, that drive is not partitioned or formatted.
I would expect output like

Code: Select all

Disk /dev/sdb: 55.9 GiB, 60022480384 bytes, 117231407 sectors
Disk model: Expansion       
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: dos
Disk identifier: 0xdae8205d

Device     Boot Start       End   Sectors  Size Id Type
/dev/sdb1        2048 117229567 117227520 55.9G 83 Linux
Some details will differ from yours. Mine is sdb in this case, not sda and the size is slightly different.
Unreadable squiggle

DarKOrange
Posts: 17
Joined: Thu Jul 09, 2020 3:18 pm

Re: How to check how much free space is left on external USB Hard drive

Thu Aug 06, 2020 9:45 am

Thank you for your answer. It is partioned and formatted, I can access it with Filezilla and read/write files.

Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 122879999 122877952 58,6G 83 Linux

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5644
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: How to check how much free space is left on external USB Hard drive

Thu Aug 06, 2020 9:56 am

DarKOrange wrote:
Thu Aug 06, 2020 9:45 am
Thank you for your answer. It is partioned and formatted, I can access it with Filezilla and read/write files.
Hmm. I normally use FileZilla for SFTP to networked drives (or other computers) USB drives are usually auto-mounted via the file manager and appear under the /media directory.
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

DarKOrange
Posts: 17
Joined: Thu Jul 09, 2020 3:18 pm

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Thu Aug 06, 2020 10:02 am

I am using FileZilla to access a remote Pi files, and I am using ssh for admin/coding. The drive is not present in the /media folder but in the /mnt folder

LTolledo
Posts: 3585
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Thu Aug 06, 2020 10:20 am

please post output of

Code: Select all

lsusb
lsblk
sudo blkid
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

DarKOrange
Posts: 17
Joined: Thu Jul 09, 2020 3:18 pm

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Thu Aug 06, 2020 10:28 am

LTolledo wrote:
Thu Aug 06, 2020 10:20 am
please post output of

Code: Select all

lsusb
lsblk
sudo blkid
Thank you. Here it is:

lsusb:

Bus 001 Device 002: ID 1f75:0918 Innostor Technology Corporation
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsblk:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 58,6G 0 disk
└─sda1 8:1 1 58,6G 0 part
mmcblk0 179:0 0 29,2G 0 disk
├─mmcblk0p1 179:1 0 256M 0 part /boot
└─mmcblk0p2 179:2 0 28,9G 0 part /

sudo blkid:

/dev/mmcblk0p1: LABEL_FATBOOT="boot" LABEL="boot" UUID="592B-C92C" TYPE="vfat" PARTUUID="841b483c-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="706944a6-7d0f-4a45-9f8c-7fb07375e9f7" TYPE="ext4" PARTUUID="841b483c-02"
/dev/sda1: UUID="1eee1c8d-3d8d-437f-87c2-3fe930d4b974" TYPE="ext2" PARTUUID="55dd0322-01"
/dev/mmcblk0: PTUUID="841b483c" PTTYPE="dos"

LTolledo
Posts: 3585
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Thu Aug 06, 2020 10:58 am

DarKOrange wrote: /dev/sda1: UUID="1eee1c8d-3d8d-437f-87c2-3fe930d4b974" TYPE="ext2" PARTUUID="55dd0322-01"
this confirms your drive is formatted as EXT2

first let make a mount point for your external USB hard drive
sudo mkdir /mnt/exHDD

then lets mount it properly with an entry in /etc/fstab

Code: Select all

UUID=1eee1c8d-3d8d-437f-87c2-3fe930d4b974  /mnt/exHDD  ext2  defaults,nofail,noatime  0  1
reboot and then check again using

Code: Select all

df -h
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

DarKOrange
Posts: 17
Joined: Thu Jul 09, 2020 3:18 pm

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Thu Aug 06, 2020 11:30 pm

LTolledo wrote:
Thu Aug 06, 2020 10:58 am
DarKOrange wrote: /dev/sda1: UUID="1eee1c8d-3d8d-437f-87c2-3fe930d4b974" TYPE="ext2" PARTUUID="55dd0322-01"
this confirms your drive is formatted as EXT2

first let make a mount point for your external USB hard drive
sudo mkdir /mnt/exHDD

then lets mount it properly with an entry in /etc/fstab

Code: Select all

UUID=1eee1c8d-3d8d-437f-87c2-3fe930d4b974  /mnt/exHDD  ext2  defaults,nofail,noatime  0  1
reboot and then check again using

Code: Select all

df -h
Thank you for your answer, I followed your directions but still no luck :( The external storage has disappeared from the following commands but I can still browse the content of the USB stick but through the old mount point, the new one (exHDD) is empty.

New output:

df -h

Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
/dev/root 29G 2,1G 26G 8% /
devtmpfs 184M 0 184M 0% /dev
tmpfs 216M 0 216M 0% /dev/shm
tmpfs 216M 3,1M 213M 2% /run
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 216M 0 216M 0% /sys/fs/cgroup
/dev/mmcblk0p1 253M 55M 198M 22% /boot
tmpfs 44M 0 44M 0% /run/user/1000

lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk0 179:0 0 29,2G 0 disk
├─mmcblk0p1 179:1 0 256M 0 part /boot
└─mmcblk0p2 179:2 0 28,9G 0 part /

sudo blkid

/dev/mmcblk0p1: LABEL_FATBOOT="boot" LABEL="boot" UUID="592B-C92C" TYPE="vfat" PARTUUID="841b483c-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="706944a6-7d0f-4a45-9f8c-7fb07375e9f7" TYPE="ext4" PARTUUID="841b483c-02"
/dev/mmcblk0: PTUUID="841b483c" PTTYPE="dos"

User avatar
diogen151
Posts: 67
Joined: Mon Apr 04, 2016 8:32 am
Location: Agram

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Fri Aug 07, 2020 7:08 am

DarKOrange wrote:
Thu Aug 06, 2020 10:28 am

Bus 001 Device 002: ID 1f75:0918 Innostor Technology Corporation
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Innostor chipset for USB drive?
Are you using RPi 4b and USB 3.0 ?

Innostor chipset is not well prooven in this combination like ASMEDIA ASM chipset.

Try with this:

Code: Select all

sudo dmesg -C
..then connect that USB drive, and post output from this command:

Code: Select all

sudo dmesg -T
Hope this will give some more information.
Šalica malina.

DarKOrange
Posts: 17
Joined: Thu Jul 09, 2020 3:18 pm

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Fri Aug 07, 2020 7:25 am

diogen151 wrote:
Fri Aug 07, 2020 7:08 am
DarKOrange wrote:
Thu Aug 06, 2020 10:28 am

Bus 001 Device 002: ID 1f75:0918 Innostor Technology Corporation
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Innostor chipset for USB drive?
Are you using RPi 4b and USB 3.0 ?

Innostor chipset is not well prooven in this combination like ASMEDIA ASM chipset.

Try with this:

Code: Select all

sudo dmesg -C
..then connect that USB drive, and post output from this command:

Code: Select all

sudo dmesg -T
Hope this will give some more information.
Hi, thank you for your answer. I should have mentioned it: it is a Raspberry Pi 3 Model A Plus Rev 1.0

Unfortunately I don't have physical access to this Rpi which is hundreds of kilometers from me and can't plug/unplug the USK stick.

The output of the above commands is empty.

nliviu
Posts: 32
Joined: Tue Jun 23, 2020 1:24 pm
Location: Romania

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Fri Aug 07, 2020 9:53 am

DarKOrange wrote:
Thu Aug 06, 2020 11:30 pm
Thank you for your answer, I followed your directions but still no luck :( The external storage has disappeared from the following commands but I can still browse the content of the USB stick but through the old mount point, the new one (exHDD) is empty.
What is the old mount point?

You can run mount to list all the mount points.

DarKOrange
Posts: 17
Joined: Thu Jul 09, 2020 3:18 pm

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Fri Aug 07, 2020 10:00 am

nliviu wrote:
Fri Aug 07, 2020 9:53 am
DarKOrange wrote:
Thu Aug 06, 2020 11:30 pm
Thank you for your answer, I followed your directions but still no luck :( The external storage has disappeared from the following commands but I can still browse the content of the USB stick but through the old mount point, the new one (exHDD) is empty.
What is the old mount point?

You can run mount to list all the mount points.
The old mount point is named USBStick

The output of the mount command doesn't list it, that is very weird since I can still browse the USB key...

/dev/mmcblk0p2 on / type ext4 (rw,noatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=187428k,nr_inodes=46857,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=32,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=44140k,mode=700,uid=1000,gid=1000)

nliviu
Posts: 32
Joined: Tue Jun 23, 2020 1:24 pm
Location: Romania

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Fri Aug 07, 2020 10:13 am

It looks like it's not mounted.

A mount point has a full path, something like "/mnt/USBStick".
The entry in the mount list should read something like

Code: Select all

/dev/sda1 on /mnt/USBStick ...
If you can see it with filezilla, you can see it in the ssh session too (using the same path).

DarKOrange
Posts: 17
Joined: Thu Jul 09, 2020 3:18 pm

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Fri Aug 07, 2020 12:42 pm

nliviu wrote:
Fri Aug 07, 2020 10:13 am
It looks like it's not mounted.

A mount point has a full path, something like "/mnt/USBStick".
The entry in the mount list should read something like

Code: Select all

/dev/sda1 on /mnt/USBStick ...
If you can see it with filezilla, you can see it in the ssh session too (using the same path).
Yes it is there with ssh too: /mnt/USBStick

I can browse it but none of the command lines to get info are seeing it.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5644
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Fri Aug 07, 2020 1:28 pm

OOC, what does FileZilla report about the drive. I can't check a "remote server" at the moment but for a similar local drive (128GB SSD + USB-to-SATA adapter)I get this:
FileZillaMedia.png
FileZillaMedia.png (53.2 KiB) Viewed 263 times
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

nliviu
Posts: 32
Joined: Tue Jun 23, 2020 1:24 pm
Location: Romania

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Fri Aug 07, 2020 1:31 pm

My bet is that the directory /mnt/USBStick is populated with files from the sd, not from the external drive which is not mounted.
Try to unmount it

Code: Select all

sudo umount /mnt/USBStick
If the result is "umount: /mnt/USBStick: not mounted.", you can try to mount it from the command line, assuming /mnt/exHDD still exists

Code: Select all

sudo mount -t ext2 /dev/sda1 /mnt/exHDD

DarKOrange
Posts: 17
Joined: Thu Jul 09, 2020 3:18 pm

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Fri Aug 07, 2020 2:23 pm

nliviu wrote:
Fri Aug 07, 2020 1:31 pm
My bet is that the directory /mnt/USBStick is populated with files from the sd, not from the external drive which is not mounted.
Try to unmount it

Code: Select all

sudo umount /mnt/USBStick
If the result is "umount: /mnt/USBStick: not mounted.", you can try to mount it from the command line, assuming /mnt/exHDD still exists

Code: Select all

sudo mount -t ext2 /dev/sda1 /mnt/exHDD
I think you nailed it!

umount: /mnt/USBStick: not mounted.

I copied files to the USBStick and the space on the sd card decreased...

Right now I can't mount sda because it is no longer available, I am trying to have someone unplug and replug the USB key

nliviu
Posts: 32
Joined: Tue Jun 23, 2020 1:24 pm
Location: Romania

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Fri Aug 07, 2020 2:33 pm

Unmount from /mnt/exHDD and mount on /mnt/USBStick

Code: Select all

sudo umount /mnt/exHDD
sudo mount -t ext2 /dev/sda1 /mnt/USBStick

DarKOrange
Posts: 17
Joined: Thu Jul 09, 2020 3:18 pm

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Fri Aug 07, 2020 3:01 pm

nliviu wrote:
Fri Aug 07, 2020 2:33 pm
Unmount from /mnt/exHDD and mount on /mnt/USBStick

Code: Select all

sudo umount /mnt/exHDD
sudo mount -t ext2 /dev/sda1 /mnt/USBStick
Thank you. Following previous manipulations (below) the USB key is no longer seen by the system,
LTolledo wrote:
Thu Aug 06, 2020 10:58 am
DarKOrange wrote: /dev/sda1: UUID="1eee1c8d-3d8d-437f-87c2-3fe930d4b974" TYPE="ext2" PARTUUID="55dd0322-01"
this confirms your drive is formatted as EXT2

first let make a mount point for your external USB hard drive
sudo mkdir /mnt/exHDD

then lets mount it properly with an entry in /etc/fstab

Code: Select all

UUID=1eee1c8d-3d8d-437f-87c2-3fe930d4b974  /mnt/exHDD  ext2  defaults,nofail,noatime  0  1
reboot and then check again using

Code: Select all

df -h




so I can't mount it. I tried to reboot but I'll need someone to physically remove and replug the USB key into the raspberry Pi. Unless you know another way to access it again.

lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

USB key no longer listed

DarKOrange
Posts: 17
Joined: Thu Jul 09, 2020 3:18 pm

Re: External USB Hard drive mounted, partioned but not listed (was: How to check how much free space is left on external

Sat Aug 08, 2020 7:39 am

nliviu wrote:
Fri Aug 07, 2020 2:33 pm
Unmount from /mnt/exHDD and mount on /mnt/USBStick

Code: Select all

sudo umount /mnt/exHDD
sudo mount -t ext2 /dev/sda1 /mnt/USBStick
Problem solved! I got someone to remove and replug the key, I was then able to mount the USB key in the exHDD folder, it is now listed with the df -h command !

Thank you :D :D :D and thank to all !
Have a nice day,
Laurent

Return to “Beginners”