Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So, I want to connect my shiny new NAS (QNAP TS-210p II) to my Ubuntu 11.10 box. I have a 2nd Ubuntu machine, but I don't use that enough to be too worried about it. Use is ideally to offload all storage except for system (which can then run off a 30GB flash drive). The main machine also runs Myth front/backends. Both are on a wired network currently.

I have got a basic setup working, mounted over NFS, but have some issues, and whenever I look for answers, I seem to get unto the UbuntuServer domain, with what seems like more detail than I want in an answer.

Questions I have identified so far:

1) Sharing UIDs to get file permissions correct. LDAP or something else? What is necessary to make this work?

2) Mounting an NFS device reliably. Do I just add it in fstab or is some sort of auto-mount advisable? Its a wired network, but I shouldn't need to worry about reboot after power-outages and sequencing...

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Sharing UIDs

Assuming that the NAS is running a variant of Linux, and you have root access (if not I guess you need to ask QNAP), you have three options:

  • Manually sync /etc/passwd between the two boxes (passwd is the file that contains the username/userid mapping).
  • LDAP
  • NIS

If there are just a few users that don't change very often, the manual sync is probably the simplest. You need to keep the NAS system users the same, just add the relevant client users. Make a copy of the passwd file before changing it, so you can revert if necessary.

See the Ubuntu NFS HowTo, User Permissions.

Mounting

Mounting in fstab is probably the simplest.

Something like

//my-nas/share   /mnt/nas    nfs   rw,hard,intr    0  0

should do the trick.

The hard and intr mount options are recommended by the Linux NFS HowTo. They will cause client programs to hang if the NAS is down (hard), but will let you kill them (intr). (The alternative is that file access returns an error, which according to the Linux NFS HowTo most programs cannot handle gracefully, and is "a recipe for corrupted files and lost data".)

share|improve this answer
    
Manually syncing passwd is an idea that I'd not even considered. It should be easy because of course I only have a couple of UIDs to worry about. –  Sean Houlihane Oct 23 '11 at 9:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.