Attaching a NAS

Bonjour, hello,
I’ve read this topic Sharing folder or nas which is close but nor exactly what I’m after.
I need to connect a NAS to one of my VM, probably Vault
I don’t want to remote access the NAS like a remote server, through its IP
I would like to attach it the same way it is attached in Suse and/or windows, so I can map the folders as if local disk
How do I do that ?

Keep the vault offline.

I’m guessing that you want things to work automagically, so the NAS will
appear in some file manager.
That’s usually done with some network discovery protocol like Bonjour.
You will need to enable Bonjour in the qube you want to use and poke
holes in the firewall to allow the protocol to work - that’s documented
in https://www.qubes-os.org/doc/firewall/

Whether this will work will depend on how your NAS is configured, and
how the folders are shared. Check this.

Like many problems in Qubes, you can often solve the problem by
searching for the same problem not in Qubes, but in the distro you are
using for the qube.
The only Qubes specific thing will be learning how to install (and
configure) software in a template/qube, and how to work with the Qubes
firewall. And even that is a subset of “how do I do X behind a firewall”

2 Likes

Thank you @unman, I will look into that !

If you need help, dont hesitate to post again in this thread.

Some NAS devices also have esata or usb interfaces. If your device does then you could either pass through that USB device or install a dedicated USB controller and then mount directories the way you like.

While using USB devices might leave you open to physical attack that is probably less of a threat than opening your vault to the network. You need to determine which is more of a risk in your situation.

Thank you, but I will not trade a double RJ45 for a USB, this is a NAS and needs all the speed.
Plus USB would limit the NAS to a single computer, while mine is mounted on the router, so it’s available to any computer plug to the network

I found this:

On my Personal (yellow) home, I’ve created a folder “NAS”
In cmd I typed: sudo mount -t nfs (NAS IP A.B.C.D):/MyData /home/james/Documents/MyBackup The cmd comes back with error, saying mount point doesn't exist. So I try/check, : cd/ home :/home cd /user ... no such directory Ok, then:/home ls the result is: user
So I see “user” but I can’t access it through terminal.
Yet, in nautilus (or whatever folder browser is called) I can see, access, and even write to it

Could it be because user is called user ?

No, it’s because of (lack of) basic Linux knowledge

cd /home takes you to /home
ls shows you the contents of /home - /home/user
but cd /user tries to change directory to a directory called use in
the root file system.
You want:
sudo mount -t nfs (NAS IP A.B.C.D):/MyData /home/user/NAS
cd /home/user/NAS

You may need to adjust the permissions to allow you to read and write
from the mount.

I have no problem putting my lack of linux/coding knowledge upfront, but not this way. You seems upset (or tired) and I’m sorry if my lack of advanced knowledge irritate you.

I did $:cd /home/user in the first place, and it gave me the same error directory unknown, that’s when I decided to go one cd at the time. And I’m very surprised by what you are saying as I’ve been using CD quite often, on DOS and Linux, and I’ve never encounter the obligation to put an absolute path. A relative path should works.

And that doesn’t work, as explained in my earlier message.
Through nautilus I accessed to “documents” and created a directory called “NAS” which i see in /home ls
But i can’t access it through terminal as if terminal didn’t have access rights

Yes of course but first i need to be able to access it and actually do the mounting

1 Like

I’m always pretty terse, but currently I am unwell, and this has
spilled over in to rudeness. Thanks for pulling me up on this.
Please accept my apologies.

You wrote:
“So I try/check, : CD/ home :/home cd /user … no such directory”

And I was trying to explain that when you are in /home, cd /user
will attempt to move to a directory /user
What you want is:
cd /home; cd user

Then, there’s also a confusion about where you created that NAS
directory. (At least a confusion to me.)
I thought that you meant you had created it in your home directory -
i.e. at /home/user/NAS
But now i think you may have created it in /home/ , as /home/NAS?

Can you check again, as it isn’t clear to me that you have tried what I
suggested.
If you encounter any error messages with the mount command, or when
accessing /home/user/NAS, could you report them please?

1 Like

I’m sorry to hear that, and no need to apologize, unfortunately there is no image (body language) through forums, so you can’t see that I wrote what I wrote with an amused smile. I hope you manage to get better soon

Ok, I will try with that new cmd (after I finish watching this “ThinkerView” episod)

I sure will !
And again, as always, thank you and the community for your help !

Ok, so … I opened a session as it was yesterday
Consol in template, where I want/have to mount the NAS
Consol in Domain:Personal where I want to be able to use the NAS

Ls in both, and … damn newbe me … they don’t have the same /home, so obviously it won’t find the directory while trying to mount …

Typing now in the dom.perso consol
[user@personal]$ sudo mount -t nfs (NAS IP A.B.C.D):/MyData /home/user/NAS
and error message is:
““Bad option; for several file systems (e.g. nfs, cifs) you might need a /sbin/mount. helper program.””

And when trying
[user@debianl]$ sudo mount -t nfs (NAS IP A.B.C.D):/MyData /home
The error message is
““A dependency job for rpc-statd.service failed. See ‘journalctl -xe’ for details.
mount.nfs: rock.statd is not running but is required for remote locking.
mount.ntfs: Either use ‘-o nolock’ to keep locks local, or start statd.””

Hello, I’ve checked again on Debian man, but can’t find any of these two error message :confused:

They are standard error reports: the problem lies on the server.
I would try to restart the statd service there, and try connecting
again.
You can check your connection by using the nonlock option, but your
mount will then be ro.