PI2 NAS Basic Questions and future steps

Hello all,

After my first NAS installation try, I found some trouble that I wish to avoid now. Basically, I think I had some kind of issue with Samba and mount that I want to solve now. The tutorial I followed was:

According to this post:

Why do you think it is necessary to change the OSMC password?
Why is better to mount in /mnt/blah and not /media/blah?
I´ll use different Windows computers to access, so I think I need the smb-shares to work smoothly. I´ve read that there are some trouble with USB HardDisks which are going to be removed.

I guess my steps should be:
1.Samba and Mount devices
2.Torrent service
3.Access from outside my network.

Thanks to everybody!

Just read this browsing the forums, and I must admit I’m a little confused as to exactly what problem you are actually experiencing? If perhaps you could clarify what isn’t working for you, people might be able to help a little more …

Meanwhile:

Why do you think it is necessary to change the OSMC password?

Most, if not all, of these sorts of guides tend to assume you’re going to want to access your media, or the web control interface, or … from outside your network. If you’re going to have any connectivity to your box from outside your network (E.g., The Internet) then you absolutely must change the default passwords, or you’ll potentially have undesirables from Afghanistan to Zimbabwe wandering around your system having logged in using the default username and password.
This is just basic security …

Why is better to mount in /mnt/blah and not /media/blah?

If you look under “/media/” you should find a README file which explains this. But basically, “/media/” is under the control of the automounter, and is used for automatically mounting removable media shares. It is not a place where you should manually mount anything or you’ll end up in obscure arguments with the automounter, cats and dogs will be living together, and basically the universe will come to an unpleasant and abrupt end :slightly_smiling:

Stick with what the OSMC documentation/WiKi/help pages/forums/… say - you will find your life to be a lot easier, IMHO …

Hope that helps,

Tris.

Haha, Chaos Theory.

I found myself a little lost, that’s why I wrote the topic.

I already changed the image of the SD since I started from scratch. But I remember experiencing two different problems:

  1. Couldn´t access on-line to the created Shares folder. I think I was an issue with the define users and passwords or something.
  2. The following day, there was some kind of failure with mounting the unit that didn’t allow me to do anything. Neither Putty nor direct console.

I will try to be more careful now, and if something new arises I’ll post it.

1 Like

I’ve just seen the error number 2 that I mention :

After configuring fstab of Samba to mount a certain USB HardDisk, if I turn on the Pi without that USB connected, it doesn’t launch OSMC and in the console says:
A start job is running for dev-sda1.device (##s / 1min 30s)
And keeps there until I plug the device. Does anybody knows hot to overcome this?

I would be interesting to know how since I will configure the fstab using the UUID of different USB drives. Is it possible to set it up somehow that OSMC keeps running even though the USB Drive? For example adding an “IF” clause in the fstab and asking a variable to see if a Drive is mounted. Is it possible to do this?

I still can not understand why you are adding removable drives to fstab and don’t let the automounter take care of them which is exactly the function that he is designed for (removable drives)!

But to answer your question, add “nofail” to the mount options in fstab for that drive should solve you problem

1 Like

Hello, fzinken:

Thank you for your answer. I want to set up a RPI2 NAS with USB Hard Disks. Everything I’ve seen so far is about mounting them and using Samba (Net-Sharing) and fstab.

It is just that I want the RPI2 to be operative if I disconnect the USB drives, in case I move or I have to disconnect the drives, or one of the drives. Imaging I have 2 drives, I want to take one out, and take it with me somewhere. Or is it nonesense?

It’s not nonsense but you could have reached your target easy without fstab. Using the auto mounter and the samba server from the app store that OSMC provides.

So now either add the nofail to the entries in fstab or remove the entries totally from fstab and you should be done.

1 Like

Hello again, I’ve been busy some time but here I go again!

I didn’t install Samba from AppStore because of the following reasons, and don´t hesitate to comment on them:

  • The guide I was following to create a RPi2 NAS did so.
  • First time I installed OSMC, AppStore wasn´t (apparently) working for me, so nothing showed when trying to install Samba. And I found old threads saying AppStore Samba wasn’t ready (My mistake not to check the dates).
  • I thought it would be better for handling permanently mounted USB Hard Drives.
  • I thought it would be better for configuring the paths (supposed to be fix) of downloading add-ons.

For the next complexity, I want to:
*Have a VPN server - I’ll have to do the domain thing.
*Possibly have a VPN client
*Access to my media from outside the network
*Possibly streaming content

But before making it more complex, I am experiencing the following issues:
1. Trying to format a USB drive in ext4 format I found that my drive has more partitions than space. Does that make sense?

Device     Boot  Start      End        Sectors  Size Id Type
/dev/sdb1          2208 15646719 15644512  7.5G  b W95 FAT32 

I used fdisk, n, p; and this is what I got:

Disk /dev/sdb1: 7.5 GiB, 8009990144 bytes, 15644512 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x6f20736b

Device      Boot      Start        End                Sectors   Size      Id Type
/dev/sdb1p1 ?     778135908 1919645538 1141509631 544.3G  72 unknown
/dev/sdb1p2 ?     168689522 2104717761 1936028240 923.2G  65 Novell Netware 386
/dev/sdb1p3 ?    1869881465 3805909656 1936028192 923.2G 79 unknown
/dev/sdb1p4 ?    2885681152 2885736650      55499  27.1M       d unknown

Partition table entries are not in disk order.

2. I have issues with Transmission downloading in “/mnt/USBHDD1/Shares” or “/mnt/USBHDD2/Shares” (Samba share for fstab-mounted USB device). My fstab sentence was:

UUID=######1 /mnt/USBHDD1 auto uid=1001,gid=1001,noatime,nofail 0 0
UUID=######2 /mnt/USBHDD2 auto uid=1001,gid=1001,noatime,nofail 0 0

After reading about files, permissions and users, and that AppStore Transmission is OSMC user, I changed it, with hope every user can now have access:

UUID=######1 /mnt/USBHDD1 auto noatime,nofail 0 0
UUID=######2 /mnt/USBHDD2 auto noatime,nofail 0 0

3. I can only access to one of two of my fstab-mounted devices. Similar to this @tyto post but not equal Only one samba share accessible or another. Or maybe Samba automount multi-user. I don’t understand why because I’ve used the same fstab sentence for both drives. And I’m accessing with the same user. However, I see a difference when fdisk -l in columns boot and type. Is it related?

Device      Boot    Start      End     Sectors  Size  Id  Type
/dev/sda1              48     7831551 7831504  3.8G  b   W95 FAT32

Device     Boot     Start        End          Sectors     Size  Id  Type
/dev/sdc1     *       64     3907024128 3907024065  1.8T   7  HPFS/NTFS/exFAT

After reading and all these, I wonder a few things about automount samba shares from AppStore Samba:
*Are the trustworthy for downloads? Will the downloads disappear after reboot? Or will they stay because the file is not empty?
*If a new device is plugged and the device in which files are being downloaded changes from /dev/sda1 to /dev/sdb1, will the download continue properly?
*Can only OSMC user access to the shares? I was happy creating different users to not share the OSMC password. However, it seems I’m not skillfull enough with Samba and permissions.

Thanks in advance!

Edit: It seems 2. it is still not working. Transmission gives: "Error. Permission denied (/mnt/HDDUSB1/…torrent…). I’m sure it is something of samb.conf because I’ve read osmc user is not in users group (allowed users=@users).