doubleudee1
Posts: 164
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Problems with External 4TB HDD

Fri Aug 23, 2019 11:47 am

I have connected up a new HDD (info below), but I cannot see it on the network and my CCTV Cameras (obviously) cannot write to it.

I can drill down to it through a putty window and write to it that way, can anyone help me see it through windows 10 by linking it as a network drive?

Thanks.

Here's all the info, if you need anything else please ask.


Output from sudo blkid :-
/dev/mmcblk0: PTUUID="0005231f" PTTYPE="dos"
/dev/mmcblk0p1: LABEL="RECOVERY" UUID="90E6-4AE3" TYPE="vfat" PARTUUID="0005231f-01"
/dev/mmcblk0p5: LABEL="SETTINGS" UUID="7ae383d9-d8c7-4cc1-844a-930d11d80aab" TYPE="ext4" PARTUUID="0005231f-05"
/dev/mmcblk0p6: LABEL="boot" UUID="03FA-9CB4" TYPE="vfat" PARTUUID="0005231f-06"
/dev/mmcblk0p7: LABEL="root" UUID="5532747b-f5d8-419e-a01e-d36acf2d334f" TYPE="ext4" PARTUUID="0005231f-07"
/dev/sda1: UUID="79860ABD06E961A6" TYPE="ntfs" PTTYPE="dos" PARTLABEL="CCTV1" PARTUUID="a085d050-e1a4-4d67-9f0f-7e6ce5c4698e"
################################################################################
Directory created in /mnt:-

pi@raspberrypi:~ $ cd /mnt
pi@raspberrypi:/mnt $ ls
CCTV1
#################################################################################

My etc/fstab file as at 23/08/2019:-
###################################################################################
proc /proc proc defaults 0 0
/dev/mmcblk0p6 /boot vfat defaults 0 2
/dev/mmcblk0p7 / ext4 defaults,noatime 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that


UUID=79860ABD06E961A6 /mnt/CCTV1 auto defaults,user,nofail 0 2

####################################################################################

My /etc/samba/smb.conf file as at 23/08/2019:- (only showing active lines of code)

workgroup = WORKGROUP

wins support = yes

dns proxy = no

log file = /var/log/samba/log.%m

max log size = 1000

panic action = /usr/share/samba/panic-action %d

server role = standalone server

obey pam restrictions = yes

unix password sync = yes

passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n$

map to guest = bad user

; logon script = logon.cmd

; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -$

; add group script = /usr/sbin/addgroup --force-badname %g

; include = /home/samba/etc/smb.conf.%m

; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash

usershare allow guests = yes

[homes]
comment = Home Directories
browseable = yes

read only = no

create mask = 0700

directory mask = 0700

valid users = %S

;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; read only = yes

;[profiles]
; comment = Users profiles
; path = /home/samba/profiles
; guest ok = no
; browseable = no
; create mask = 0600
; directory mask = 0700

[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no

[CCTV1]
comment = external Files
browseable = yes
path = /mnt/CCTV1 ##/mnt/CCTV1 added for 4TB HDD
writeable = Yes
create mask = 0777
directory mask = 0777
browseable = Yes
public = yes
guest ok = yes

##################################################################################

I hope that helps somewhat.
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

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

Re: Problems with External 4TB HDD

Fri Aug 23, 2019 1:28 pm

try adding

Code: Select all

client max protocol = NT1 
under the global part
"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!"

doubleudee1
Posts: 164
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: Problems with External 4TB HDD

Fri Aug 23, 2019 2:59 pm

still getting 'the network name cannot be found' when trying to log into 'cctv1'?
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

doubleudee1
Posts: 164
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: Problems with External 4TB HDD

Fri Aug 23, 2019 3:02 pm

doubleudee1 wrote:
Fri Aug 23, 2019 2:59 pm
still getting 'the network name cannot be found' when trying to log into 'cctv1'?
Yes, unfortunately
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

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

Re: Problems with External 4TB HDD

Fri Aug 23, 2019 3:11 pm

Have you tried mounting the share on Linux just to test it?

mount -t cifs \\\\127.0.0.1\\CCTV1 /media -o user=sambauseridhere,password=sambauserspasswordhere


Have you run sudo testparm to check the syntax and sanity of your samba config?

BTW, I'd create a special mount point sudo mkdir /CCTV1 and change to that from /mnt/CCTV1 for your drive because I use /mnt for all sorts of stuff with USB sticks and SDCards in readers. My system has /srv and /shared where my NAS drive NFS shares are mounted. I've moved /var/www to /srv/www for the apache2, lighttpd and nginx webservers that run on each Raspberry.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

doubleudee1
Posts: 164
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: Problems with External 4TB HDD

Fri Aug 23, 2019 3:25 pm

DougieLawson wrote:
Fri Aug 23, 2019 3:11 pm
Have you tried mounting the share on Linux just to test it?

mount -t cifs \\\\127.0.0.1\\CCTV1 /media -o user=sambauseridhere,password=sambauserspasswordhere


Have you run sudo testparm to check the syntax and sanity of your samba config?

BTW, I'd create a special mount point sudo mkdir /CCTV1 and change to that from /mnt/CCTV1 for your drive because I use /mnt for all sorts of stuff with USB sticks and SDCards in readers. My system has /srv and /shared where my NAS drive NFS shares are mounted. I've moved /var/www to /srv/www for the apache2, lighttpd and nginx webservers that run on each Raspberry.
I ran the command and this was the reply:-

pi@raspberrypi:~ $ sudo testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Processing section "[CCTV1]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

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

Re: Problems with External 4TB HDD

Fri Aug 23, 2019 4:39 pm

That SMB conf stuff looks OK. What happened when you tried to mount it on Linux?
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

doubleudee1
Posts: 164
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: Problems with External 4TB HDD

Sat Aug 24, 2019 7:20 am

It mounted ok, with no problems, should I unmount and start again?
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

doubleudee1
Posts: 164
Joined: Fri Nov 30, 2018 2:39 pm
Location: Wales

Re: Problems with External 4TB HDD

Sat Aug 24, 2019 10:08 am

I can see the raspberry pi from windows explorer and I can also see a folder 'cctv1' inside it.
But when I right click on it and select to map a network drive, I get the error message 'Windows cant find '//Raspberrypi/cctv1', check network or spelling.
So I think it is a neuwork problem somewhere, but I cannot for the life of me find it.
Make the most of your family and friends , your children grow up too quickly and you don't notice yourself ageing, friends dissapearing, moving on. You make plans for your future, but they can all be smashed in an instant, live life and enjoy. :)

PhilBr
Posts: 92
Joined: Tue Oct 31, 2017 5:28 pm

Re: Problems with External 4TB HDD

Tue Aug 27, 2019 4:51 pm

Should those forward slashes be back-slashes? See:
https://www.laptopmag.com/articles/map- ... windows-10

hth
Phil

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

Re: Problems with External 4TB HDD

Tue Aug 27, 2019 9:51 pm

PhilBr wrote:
Tue Aug 27, 2019 4:51 pm
Should those forward slashes be back-slashes?
Linux needs back slashes \\ for SMB mounts. You have to use two back-slashes to get one as they need the backslash escape character for the bash shell. Hence four back slashes at the front of the UNC and two back slashes in the middle.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Sentience
Posts: 1
Joined: Sat Aug 31, 2019 1:27 am

Re: Problems with External 4TB HDD

Sat Aug 31, 2019 1:30 am

Hi, I had something similar. I'm a complete novice, but after trying many different solutions, I remembered reading that in Raspian, the CaSe of your text matters. so SAMBA is not the same as samba. I see you used 'CCTV' and then 'cctv'. try using both upper case (or both lower case)

Return to “Beginners”