Discussion:
Revisiting a mount statement
(too old to reply)
pinnerite
2024-06-13 21:05:37 UTC
Permalink
This is on mint 21.3
I have run the same mount statement in a Script for years.
It mounts a samba share. I ran it for periodic backups.
Recently the backup machine stopped working. It is getting on a bit.
I substituted another equally old but working machine and edited the
script to substitute its URL.

mount -v -t cifs -o
rw,noperm,user=<xxxx>,password=<yyyy>,domain=ASANDCO,vers=1.0,uid=alan //192.168.1.4/data/ /spare/albury/Data/

It returns mount error(22): Invalid argument

I have been scratching my head over this for several days.

I haven't found anything on the WWW that has helped.

TIA
--
Linux Mint 21.3 kernel version 5.15.0-112-generic Cinnamon 6.0.4
AMD Ryzen 7 7700, Radeon RX 6600, 32GB DDR5, 1TB SSD, 2TB Barracuda
Paul
2024-06-14 02:43:20 UTC
Permalink
Post by pinnerite
This is on mint 21.3
I have run the same mount statement in a Script for years.
It mounts a samba share. I ran it for periodic backups.
Recently the backup machine stopped working. It is getting on a bit.
I substituted another equally old but working machine and edited the
script to substitute its URL.
mount -v -t cifs -o
rw,noperm,user=<xxxx>,password=<yyyy>,domain=ASANDCO,vers=1.0,uid=alan //192.168.1.4/data/ /spare/albury/Data/
It returns mount error(22): Invalid argument
I have been scratching my head over this for several days.
I haven't found anything on the WWW that has helped.
TIA
Is /spare/albury/Data mounted ?

Presumably it is a separate drive, having its own file system,
and needing to be healthy, before the NEXT mount command can work.

If the mount point was NOT working, then /spare/albury/Data/ should be empty.

If /spare/albury/Data/ has not been mounting for days on end, you've
been shoving backups into the mount point and not the external drive.

This can make it difficult to determine /spare/albury/Data/ is mounted.

At a time like this, we

cat /etc/mtab

or check with "diskfree" to see any signs of encouragement.

df

But mainly, I want to see /etc/mtab , just the relevant bits.

It is not a question of "a mount command", but "which mount is failing".

Paul
pinnerite
2024-06-14 13:57:07 UTC
Permalink
On Thu, 13 Jun 2024 22:43:20 -0400
Post by Paul
Post by pinnerite
This is on mint 21.3
I have run the same mount statement in a Script for years.
It mounts a samba share. I ran it for periodic backups.
Recently the backup machine stopped working. It is getting on a bit.
I substituted another equally old but working machine and edited the
script to substitute its URL.
mount -v -t cifs -o
rw,noperm,user=<xxxx>,password=<yyyy>,domain=ASANDCO,vers=1.0,uid=alan //192.168.1.4/data/ /spare/albury/Data/
It returns mount error(22): Invalid argument
I have been scratching my head over this for several days.
I haven't found anything on the WWW that has helped.
TIA
Is /spare/albury/Data mounted ?
Sorry I have conflated two problems.

First the url should have been //192.168.1.100/data

That represents a samba share.

/spare/albury/Data/ is where it is mounted.

Next the line above beginning rw,noperm is a continuation of the line above.

Since correcting the mount statement and running:

$ mount -t cifs

It returned:

//192.168.1.100/data/ on /spare/albury/Data type cifs (plus much detail)

$ df returned:

Filesystem 1K-blocks Used Available Use% Mounted on
//192.168.1.100/data/ 913806868 213880 867100880 1% /spare/albury/Data

So it looks as though the mount is working!

Thank you for helping to penetrate my self-made fog.

Alan
--
Linux Mint 21.3 kernel version 5.15.0-112-generic Cinnamon 6.0.4
AMD Ryzen 7 7700, Radeon RX 6600, 32GB DDR5, 1TB SSD, 2TB Barracuda
pinnerite
2024-06-14 17:31:14 UTC
Permalink
On Fri, 14 Jun 2024 14:57:07 +0100
Post by pinnerite
On Thu, 13 Jun 2024 22:43:20 -0400
Post by Paul
Post by pinnerite
This is on mint 21.3
I have run the same mount statement in a Script for years.
It mounts a samba share. I ran it for periodic backups.
Recently the backup machine stopped working. It is getting on a bit.
I substituted another equally old but working machine and edited the
script to substitute its URL.
mount -v -t cifs -o
rw,noperm,user=<xxxx>,password=<yyyy>,domain=ASANDCO,vers=1.0,uid=alan //192.168.1.4/data/ /spare/albury/Data/
It returns mount error(22): Invalid argument
I have been scratching my head over this for several days.
I haven't found anything on the WWW that has helped.
TIA
Is /spare/albury/Data mounted ?
Sorry I have conflated two problems.
First the url should have been //192.168.1.100/data
This is rubbish. I am losing it!
It was right the first time.
Post by pinnerite
That represents a samba share.
/spare/albury/Data/ is where it is mounted.
Next the line above beginning rw,noperm is a continuation of the line above.
$ mount -t cifs
//192.168.1.100/data/ on /spare/albury/Data type cifs (plus much detail)
Filesystem 1K-blocks Used Available Use% Mounted on
//192.168.1.100/data/ 913806868 213880 867100880 1% /spare/albury/Data
So it looks as though the mount is working!
Thank you for helping to penetrate my self-made fog.
Alan
--
Linux Mint 21.3 kernel version 5.15.0-112-generic Cinnamon 6.0.4
AMD Ryzen 7 7700, Radeon RX 6600, 32GB DDR5, 1TB SSD, 2TB Barracuda
--
Linux Mint 21.3 kernel version 5.15.0-112-generic Cinnamon 6.0.4
AMD Ryzen 7 7700, Radeon RX 6600, 32GB DDR5, 1TB SSD, 2TB Barracuda
pinnerite
2024-06-15 17:23:58 UTC
Permalink
This is a summary of where I amm now.

The share section in smb.conf on 192.168.1.100

[data]
comment = data
path = /home/Data
valid users = alan
admin users = alan
read only = No

The target drive is 192.168.1.4
I am trying to mount it on /spare/albury/Data.

This is the mount command:

sudo mount -t cifs //192.168.1.4/data/ /spare/albury/Data --verbose -o
rw,noperm,username=alan,password=conte55a,domain=ASANDCO,vers=1.0,uid=alan

The above should all be one line. It returns:

mount error(6): No such device or address

It is unclear which device or address.

I have read through the man page for cifs. That added nothing to what I already knew.

$ smbclient -L //192.168.1.100 alan ## Displays all the shares correctly

I cannot think of anything else to try. :(



Linux Mint 21.3 kernel version 5.15.0-112-generic Cinnamon 6.0.4
AMD Ryzen 7 7700, Radeon RX 6600, 32GB DDR5, 1TB SSD, 2TB Barracuda
Paul
2024-06-15 23:44:38 UTC
Permalink
Post by pinnerite
This is a summary of where I amm now.
The share section in smb.conf on 192.168.1.100
[data]
comment = data
path = /home/Data
valid users = alan
admin users = alan
read only = No
The target drive is 192.168.1.4
I am trying to mount it on /spare/albury/Data.
sudo mount -t cifs //192.168.1.4/data/ /spare/albury/Data --verbose -o
rw,noperm,username=alan,password=conte55a,domain=ASANDCO,vers=1.0,uid=alan
mount error(6): No such device or address
It is unclear which device or address.
I have read through the man page for cifs. That added nothing to what I already knew.
$ smbclient -L //192.168.1.100 alan ## Displays all the shares correctly
I cannot think of anything else to try. :(
Linux Mint 21.3 kernel version 5.15.0-112-generic Cinnamon 6.0.4
AMD Ryzen 7 7700, Radeon RX 6600, 32GB DDR5, 1TB SSD, 2TB Barracuda
I tested here on LM213TST and it worked.

Note that in my case, it did not accept the passage of an inline password,
and insisted I type the password into the terminal. This could have consequences
if buried in a script, such as you might be doing. I would recommend switching
the syntax, to the syntax that uses a file containing USER and PASS information.

But just for the sake of showing, "something works", which is ultra-important
with SAMBA issues, here goes...

***@LM213TST:~$ sudo mkdir /mnt/sharemount

***@LM213TST:~$ sudo mount -t cifs //192.168.2.102/ramdrive /mnt/sharemount --verbose -o rw,noperm,username=bullwinkle,domain=WORKGROUP,vers=1.0,uid=bullwinkle

Password for bullwinkle@//192.168.2.102/ramdrive:
mount.cifs kernel mount options: ip=192.168.2.102,unc=\\192.168.2.102\ramdrive,noperm,vers=1.0,uid=1000,user=bullwinkle,domain=WORKGROUP,pass=ZZZZZ

Listing the contents of /mnt/sharemount now, contained the remote content.

***@LM213TST:~$ sudo umount /mnt/sharemount # clean up later

I see two friction-points, considering yours used to work before.

1) Your workgroup details changed or are different on the two machines.
Check the declaration in /etc/samba/smb.conf

2) The password behavior I observed, needs to be corrected.
Try passing credentials by indirection (use the file with the USER and PASS info in it).
It's like it was slapping my fingers.

I passed this:

username=bullwinkle,password=something

and the response I get is

Enter the password for bullwinkle, you twit

Which means it is warning me of the security implications of putting
the password in the script. The perms on the credential file can be
600, to make the thing feel better about itself.

Paul
pinnerite
2024-06-16 12:29:57 UTC
Permalink
On Sat, 15 Jun 2024 19:44:38 -0400
Post by Paul
Post by pinnerite
This is a summary of where I amm now.
The share section in smb.conf on 192.168.1.100
[data]
comment = data
path = /home/Data
valid users = alan
admin users = alan
read only = No
The target drive is 192.168.1.4
I am trying to mount it on /spare/albury/Data.
sudo mount -t cifs //192.168.1.4/data/ /spare/albury/Data --verbose -o
rw,noperm,username=alan,password=conte55a,domain=ASANDCO,vers=1.0,uid=alan
mount error(6): No such device or address
It is unclear which device or address.
I have read through the man page for cifs. That added nothing to what I already knew.
$ smbclient -L //192.168.1.100 alan ## Displays all the shares correctly
I cannot think of anything else to try. :(
Linux Mint 21.3 kernel version 5.15.0-112-generic Cinnamon 6.0.4
AMD Ryzen 7 7700, Radeon RX 6600, 32GB DDR5, 1TB SSD, 2TB Barracuda
I tested here on LM213TST and it worked.
Note that in my case, it did not accept the passage of an inline password,
and insisted I type the password into the terminal. This could have consequences
if buried in a script, such as you might be doing. I would recommend switching
the syntax, to the syntax that uses a file containing USER and PASS information.
But just for the sake of showing, "something works", which is ultra-important
with SAMBA issues, here goes...
mount.cifs kernel mount options: ip=192.168.2.102,unc=\\192.168.2.102\ramdrive,noperm,vers=1.0,uid=1000,user=bullwinkle,domain=WORKGROUP,pass=ZZZZZ
Listing the contents of /mnt/sharemount now, contained the remote content.
I see two friction-points, considering yours used to work before.
1) Your workgroup details changed or are different on the two machines.
Check the declaration in /etc/samba/smb.conf
2) The password behavior I observed, needs to be corrected.
Try passing credentials by indirection (use the file with the USER and PASS info in it).
It's like it was slapping my fingers.
username=bullwinkle,password=something
and the response I get is
Enter the password for bullwinkle, you twit
Which means it is warning me of the security implications of putting
the password in the script. The perms on the credential file can be
600, to make the thing feel better about itself.
Paul
I tried what you suggested but I still get mount error (6)

I appreciate your efforts though.

Alan
--
Linux Mint 21.3 kernel version 5.15.0-112-generic Cinnamon 6.0.4
AMD Ryzen 7 7700, Radeon RX 6600, 32GB DDR5, 1TB SSD, 2TB Barracuda
Paul
2024-06-16 18:42:25 UTC
Permalink
Post by pinnerite
On Sat, 15 Jun 2024 19:44:38 -0400
Post by Paul
Post by pinnerite
This is a summary of where I amm now.
The share section in smb.conf on 192.168.1.100
[data]
comment = data
path = /home/Data
valid users = alan
admin users = alan
read only = No
The target drive is 192.168.1.4
I am trying to mount it on /spare/albury/Data.
sudo mount -t cifs //192.168.1.4/data/ /spare/albury/Data --verbose -o
rw,noperm,username=alan,password=conte55a,domain=ASANDCO,vers=1.0,uid=alan
mount error(6): No such device or address
It is unclear which device or address.
I have read through the man page for cifs. That added nothing to what I already knew.
$ smbclient -L //192.168.1.100 alan ## Displays all the shares correctly
I cannot think of anything else to try. :(
Linux Mint 21.3 kernel version 5.15.0-112-generic Cinnamon 6.0.4
AMD Ryzen 7 7700, Radeon RX 6600, 32GB DDR5, 1TB SSD, 2TB Barracuda
I tested here on LM213TST and it worked.
Note that in my case, it did not accept the passage of an inline password,
and insisted I type the password into the terminal. This could have consequences
if buried in a script, such as you might be doing. I would recommend switching
the syntax, to the syntax that uses a file containing USER and PASS information.
But just for the sake of showing, "something works", which is ultra-important
with SAMBA issues, here goes...
mount.cifs kernel mount options: ip=192.168.2.102,unc=\\192.168.2.102\ramdrive,noperm,vers=1.0,uid=1000,user=bullwinkle,domain=WORKGROUP,pass=ZZZZZ
Listing the contents of /mnt/sharemount now, contained the remote content.
I see two friction-points, considering yours used to work before.
1) Your workgroup details changed or are different on the two machines.
Check the declaration in /etc/samba/smb.conf
2) The password behavior I observed, needs to be corrected.
Try passing credentials by indirection (use the file with the USER and PASS info in it).
It's like it was slapping my fingers.
username=bullwinkle,password=something
and the response I get is
Enter the password for bullwinkle, you twit
Which means it is warning me of the security implications of putting
the password in the script. The perms on the credential file can be
600, to make the thing feel better about itself.
Paul
I tried what you suggested but I still get mount error (6)
I appreciate your efforts though.
Alan
Which of these did you intend to use ?

//192.168.1.4/data/

//192.168.1.100/data/

Paul
pinnerite
2024-06-16 20:28:19 UTC
Permalink
On Sun, 16 Jun 2024 14:42:25 -0400
Post by Paul
Post by pinnerite
On Sat, 15 Jun 2024 19:44:38 -0400
Post by Paul
Post by pinnerite
This is a summary of where I amm now.
The share section in smb.conf on 192.168.1.100
[data]
comment = data
path = /home/Data
valid users = alan
admin users = alan
read only = No
The target drive is 192.168.1.4
I am trying to mount it on /spare/albury/Data.
sudo mount -t cifs //192.168.1.4/data/ /spare/albury/Data --verbose -o
rw,noperm,username=alan,password=conte55a,domain=ASANDCO,vers=1.0,uid=alan
mount error(6): No such device or address
It is unclear which device or address.
I have read through the man page for cifs. That added nothing to what I already knew.
$ smbclient -L //192.168.1.100 alan ## Displays all the shares correctly
I cannot think of anything else to try. :(
Linux Mint 21.3 kernel version 5.15.0-112-generic Cinnamon 6.0.4
AMD Ryzen 7 7700, Radeon RX 6600, 32GB DDR5, 1TB SSD, 2TB Barracuda
I tested here on LM213TST and it worked.
Note that in my case, it did not accept the passage of an inline password,
and insisted I type the password into the terminal. This could have consequences
if buried in a script, such as you might be doing. I would recommend switching
the syntax, to the syntax that uses a file containing USER and PASS information.
But just for the sake of showing, "something works", which is ultra-important
with SAMBA issues, here goes...
mount.cifs kernel mount options: ip=192.168.2.102,unc=\\192.168.2.102\ramdrive,noperm,vers=1.0,uid=1000,user=bullwinkle,domain=WORKGROUP,pass=ZZZZZ
Listing the contents of /mnt/sharemount now, contained the remote content.
I see two friction-points, considering yours used to work before.
1) Your workgroup details changed or are different on the two machines.
Check the declaration in /etc/samba/smb.conf
2) The password behavior I observed, needs to be corrected.
Try passing credentials by indirection (use the file with the USER and PASS info in it).
It's like it was slapping my fingers.
username=bullwinkle,password=something
and the response I get is
Enter the password for bullwinkle, you twit
Which means it is warning me of the security implications of putting
the password in the script. The perms on the credential file can be
600, to make the thing feel better about itself.
Paul
I tried what you suggested but I still get mount error (6)
I appreciate your efforts though.
Alan
Which of these did you intend to use ?
//192.168.1.4/data/ ## albury
//192.168.1.100/data/ ## lakeland
Paul
I used: //192.168.1.4/data/

While trying to sort this out, I took a backup with:

***@lakeland:~$ scp -v -p -r /home/Data/* ***@albury:/home/alan/Data

and updated it with:

rsync -avz --exclude-from=/home/Data/Scripts/exclude.txt --chown=alan:alan --progress /home/Data/ ***@albury:/home/alan/Data/

Worked fine.

Alan
--
Linux Mint 21.3 kernel version 5.15.0-112-generic Cinnamon 6.0.4
AMD Ryzen 7 7700, Radeon RX 6600, 32GB DDR5, 1TB SSD, 2TB Barracuda
pinnerite
2024-06-24 12:24:19 UTC
Permalink
Follow-up.

After successfully completing a backup (except see below),
I then had trouble again.

The backups were writing to the mount point.I

After faffing about for a bit, I realised that only happened when the
target drive had not actually been mounted. I now want to inhibit the
backup starting if the target drive had not yet mounted properly. I
haven't done that yet but I did find:

findmnt

This is a user-friendly command that returns ann idiot-proof tree of all
mounted drives. Perfect for me!

(And maybe you, which is why I posted it here.)

If you are offended, I aplogise profusely.
I have been learning how to do this from our politicians.

Regards, Alan

Sorry the (except).
The backup should have gone to /spare/albury/Data but instead went
to /spare/albury/Data/Data. A slash to few or too many I guess.

AS
--
Linux Mint 21.3 kernel version 5.15.0-112-generic Cinnamon 6.0.4
AMD Ryzen 7 7700, Radeon RX 6600, 32GB DDR5, 1TB SSD, 2TB Barracuda
Jonathan N. Little
2024-06-24 18:05:27 UTC
Permalink
Post by pinnerite
Sorry the (except).
The backup should have gone to /spare/albury/Data but instead went
to /spare/albury/Data/Data. A slash to few or too many I guess.
Common rsync error. If you want to backup contents of dir
'/target/path/Data' to '/backup/path/Data' don't put trailing slash on
destination path. So rsync command for above example

rsync -r '/target/path/Data/ /backup/path/Data
^ ^
| |
slash here not here
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
pinnerite
2024-06-25 15:42:22 UTC
Permalink
On Mon, 24 Jun 2024 14:05:27 -0400
Post by Jonathan N. Little
Post by pinnerite
Sorry the (except).
The backup should have gone to /spare/albury/Data but instead went
to /spare/albury/Data/Data. A slash to few or too many I guess.
Common rsync error. If you want to backup contents of dir
'/target/path/Data' to '/backup/path/Data' don't put trailing slash on
destination path. So rsync command for above example
rsync -r '/target/path/Data/ /backup/path/Data
^ ^
| |
slash here not here
--
Take care,
Jonathan
Thank you. I have spiked that for future reference.

Alan
--
Linux Mint 21.3 kernel version 5.15.0-112-generic Cinnamon 6.0.4
AMD Ryzen 7 7700, Radeon RX 6600, 32GB DDR5, 1TB SSD, 2TB Barracuda
Dan Purgert
2024-06-26 12:58:09 UTC
Permalink
Post by Jonathan N. Little
Post by pinnerite
Sorry the (except).
The backup should have gone to /spare/albury/Data but instead went
to /spare/albury/Data/Data. A slash to few or too many I guess.
Common rsync error. If you want to backup contents of dir
'/target/path/Data' to '/backup/path/Data' don't put trailing slash on
destination path. So rsync command for above example
rsync -r '/target/path/Data/ /backup/path/Data
^ ^
| |
slash here not here
To expand upon this a little, the trailing slash only matters for the
SOURCE directory; "DESTINATION" vs. "DESTINATION/" is equivalent to
rsync.

As written ("SOURCE/"), rsync will treat SOURCE as a starting point, and
only copy the contents of SOURCE to DESTINATION -- that is, a file
"SOURCE/dir/file" will end up as "DESTINATION/dir/file".

If you do not include the slash on SOURCE, then the final directory
named in SOURCE is included in the DESTINATION -- that is
"/path/to/SOURCE/dir/file" will end up as
"DESTINATION/SOURCE/dir/fil"

HTH
--
|_|O|_|
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860
Daniel70
2024-06-16 09:58:13 UTC
Permalink
pinnerite wrote on 14/6/24 11:57 pm:

<Snip>
Post by pinnerite
/spare/albury/Data/ is where it is mounted.
<Snip>

This could be totally off the mark but, pinnerite, if I were to mention
'Wodonga' would that mean anything to you?? ;-P
--
Daniel
pinnerite
2024-06-16 12:03:49 UTC
Permalink
On Sun, 16 Jun 2024 19:58:13 +1000
Post by Daniel70
<Snip>
Post by pinnerite
/spare/albury/Data/ is where it is mounted.
<Snip>
This could be totally off the mark but, pinnerite, if I were to mention
'Wodonga' would that mean anything to you?? ;-P
--
Daniel
Is that in Australia?

Alan
--
Linux Mint 21.3 kernel version 5.15.0-112-generic Cinnamon 6.0.4
AMD Ryzen 7 7700, Radeon RX 6600, 32GB DDR5, 1TB SSD, 2TB Barracuda
Daniel70
2024-06-17 08:39:46 UTC
Permalink
Post by pinnerite
On Sun, 16 Jun 2024 19:58:13 +1000
Post by Daniel70
<Snip>
Post by pinnerite
/spare/albury/Data/ is where it is mounted.
<Snip>
This could be totally off the mark but, pinnerite, if I were to mention
'Wodonga' would that mean anything to you?? ;-P
Is that in Australia?
Alan
Yes, it is, .... so I'm guessing you refer to an entirely different
Albury in your Hard Drive partitions!!

Albury-Wodonga and The Hume Dam
https://www.google.com/maps/@-36.0891141,146.962998,11z?entry=ttu
--
Daniel
Loading...