peewee44
Posts: 11
Joined: Mon Aug 24, 2015 4:52 am

Mounted drive shows incorrect capacity

Mon Aug 24, 2015 5:03 am

Hello,

I have two USB drives mounted using Samba as network drives using my Raspberry Pi.

My Windows machine and backup software show incorrect size and used space for the drives.

View from Raspberry Pi:

pi@raspberrypi ~ $ df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 3.4G 3.0G 195M 94% /
/dev/root 3.4G 3.0G 195M 94% /
devtmpfs 214M 0 214M 0% /dev
tmpfs 44M 2.1M 42M 5% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 88M 4.0K 88M 1% /run/shm
/dev/mmcblk0p5 60M 19M 41M 32% /boot
/dev/sda1 932G 591G 341G 64% /media/shares/PiHDD1 ((CORRECT))
/dev/sdb1 2.8T 152M 2.8T 1% /media/shares/PiHDD2 ((CORRECT))
/dev/mmcblk0p3 27M 929K 24M 4% /media/SETTINGS_

The capacity and usage is correct


View from Windows 7.

PiHDD1 194 MB free of 3.34GB
PiHDD2 194 MB free of 3.34GB

The drive capacity and used used space are wrong.

Can anyone suggest a solution please?

.

User avatar
DougieLawson
Posts: 39091
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Mounted drive shows incorrect capacity

Mon Aug 24, 2015 9:05 am

.
Last edited by DougieLawson on Mon Aug 24, 2015 10:01 am, edited 1 time in total.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
RaTTuS
Posts: 10558
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Mounted drive shows incorrect capacity

Mon Aug 24, 2015 9:24 am

it's a samba problem - [sort of]
mount them somewhere other than
/media
and it will; be happy
i.e.
force them to be in /mnt/.hd1 [name them sensible ]
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

peewee44
Posts: 11
Joined: Mon Aug 24, 2015 4:52 am

Re: Mounted drive shows incorrect capacity

Tue Aug 25, 2015 12:51 am

Thanks..to moderator and RaTTus.
I thought that I was posting on the Forum.
Can you explain my error and how to do it properly please?

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

Re: Mounted drive shows incorrect capacity

Tue Aug 25, 2015 5:23 am

peewee44 wrote:Thanks..to moderator and RaTTus.
I thought that I was posting on the Forum.
Can you explain my error and how to do it properly please?
You are posting on the forum.

Are you confused by the message "Please post in the forum and not by private message" in Dougie's rather bloated signature block that is automatically put at the bottom of everything he posts? That's just a general comment he put there because some people do try and message him.

peewee44
Posts: 11
Joined: Mon Aug 24, 2015 4:52 am

Re: Mounted drive shows incorrect capacity

Tue Aug 25, 2015 8:24 am

Thanks rpdom.

Problem resolved.

cd /

Create mount directories for each disk eg Disk1 Disk2 at this directory level.

Modify
Samba shares configuration [Disk1] [Disk2]

[Disk1]
comment = Raspberry Pi shares
path = /Disk1
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
read only = no

Modify fstab

UUID=?????insertyours?? /Disk1 auto uid=pi,gid=pi,noatime 0 0

Enjoy!

Return to “Networking and servers”