A little help with fstab (SOLVED)

Hi guys

Over the past few weeks I’ve been switching over from Freenas to Openmediavault on my NAS and it’s finally done and stable at last, I have 6 shares all visible in Gigolo, I would like to mount the shares in /mnt which requires editing /etc/fstab file something I’m not competent enough to do myself.

any help would be much appreciated

Many thanks

Graeme

Okeydokey … what’s the output from:

sudo fdisk -l

and

sudo blkid

and

mount

and the current contents of

gedit /etc/fstab
graeme@Linux1 ~ $ sudo fdisk -l
[sudo] password for graeme: 

Disk /dev/sda: 360.1 GB, 360080695296 bytes
255 heads, 63 sectors/track, 43777 cylinders, total 703282608 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
Disk identifier: 0x00000001

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   358106348   179052150+   7  HPFS/NTFS/exFAT
/dev/sda2       358107134   703281151   172587009    5  Extended
/dev/sda5       358107136   699107327   170500096   83  Linux
/dev/sda6       699109376   703281151     2085888   82  Linux swap / Solaris
graeme@Linux1 ~ $ sudo blkid
/dev/sda1: LABEL="Windows 7" UUID="02CAA59322478EE4" TYPE="ntfs" 
/dev/sda5: UUID="034e3cfc-8511-446b-98eb-9e88283cf12a" TYPE="ext4" 
/dev/sda6: UUID="50359b49-a810-460e-befa-9616af24bcba" TYPE="swap" 
graeme@Linux1 ~ $ mount
/dev/sda5 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
gvfsd-fuse on /run/user/graeme/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=graeme)
graeme@Linux1 ~ $ 
# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # # / was on /dev/sda5 during installation UUID=034e3cfc-8511-446b-98eb-9e88283cf12a / ext4 errors=remount-ro 0 1 # swap was on /dev/sda6 during installation UUID=50359b49-a810-460e-befa-9616af24bcba none swap sw 0 0

Am I missing something … I can only see one HDD there.

Am I missing something .. I can only see one HDD there.

There is only one HDD, did you want that information from the PC or the NAS ?

Oh, hang on … you’re trying to mount remote shares ?

has the NAS got a static IP ?

Can you mount the shares through gigolo … THEN post the output from:

mount
you're trying to mount remote shares ?

Yes

has the NAS got a static IP ?

Yes 192.168.2.50

Can you mount the shares through gigolo

Yes

graeme@Linux1 ~ $ mount
/dev/sda5 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
gvfsd-fuse on /run/user/graeme/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=graeme)
graeme@Linux1 ~ $ 

OK, that didn’t give me what I wanted :o … were the shares mounted through gigolo when you ran “mount” to list the mounts ?

Do you know the path to the shares … such as

//192.168.2.50/share/video
//192.168.2.50/share/music
etc ?

If not, navigate to the share in file manager … then what does it say in the file manager address bar ?

[EDIT]

and do the shares require login credentials ?

Doyou know the path to the shares .. such as

They are all samba shares, on 192.168.2.50, the share names are

family-tree
graeme
pat
multimedia
movies
backups
utilities

and do the shares require login credentials ?

No they are all set for any user no password

just to be 100% sure … can you open file manager, and in the address bar enter:

smb://192.168.2.50/family-tree
and hit enter
then
smb://192.168.2.50/graeme
then
smb://192.168.2.50/pat
then
smb://192.168.2.50/multimedia
then
smb://192.168.2.50/movies
then
smb://192.168.2.50/backups
then
smb://192.168.2.50/utilities

were all the shares contents visible as expected ?

were all the shares contents visible as expected ?

Yes

OK, first let’s create the mount points:

sudo mkdir -p /mnt/NAS

then

cd /mnt/NAS

then

sudo mkdir family-tree graeme pat multimedia movies backups utilities

close the terminal and confirm those directories exist in /mnt/NAS

or just post the output from:

ls -a /mnt

ok thats worked fine all the share folders are located at /mnt/NAS

Backup fstab … just in case:

sudo cp -v /etc/fstab /etc/fstab.backup

then we’ll mount the sharesss through ftsab one at a time.

ok that’s that done :slight_smile:

Open fstab for editing:

sudo gedit /etc/fstab

add a new line at the bottom that reads:-

# NAS shares

Then add another line below that that reads

//192.168.2.50/family-tree /mnt/NAS/family-tree cifs iocharset=utf8,dir_mode=0777,file_mode=0777 0 0

so the last 2 lines now read

# NAS shares
//192.168.2.50/family-tree /mnt/NAS/family-tree cifs iocharset=utf8,dir_mode=0777,file_mode=0777 0 0

SAVE the file.

Open another terminal and run:

sudo mount -a

if any errors … post them here … if not, navigate to /mnt/NAS/family-tree

Can you see the contents as expected, and can you create a file or folder there ?

ok that worked I can see all the folders and create and delete a new folder

Open fstab for editing:

sudo gedit /etc/fstab

add a single new line at the bottom that reads:-

//192.168.2.50/graeme /mnt/NAS/graeme cifs iocharset=utf8,dir_mode=0777,file_mode=0777 0 0

SAVE the file.

Open another terminal and run:

sudo mount -a

if any errors … post them here … if not, navigate to /mnt/NAS/graeme

Can you see the contents as expected, and can you create a file or folder there ?

so far so good :slight_smile: