O.S: Raspbmc
I need to share 4 HDDs over my LAN, but the fstab I wrote does't work as I aspect.
Edit1~
Here's the part of fstab made for those HDDs:
#External HHDs
LABEL=Incompleted\040Seasons /media/IncompletedSeasons ntfs-3g auto,rw,exec,async,dmask=0002,fmask=0003,uid=1000,gid=1000 0 0
LABEL=Films /media/Films ntfs-3g auto,rw,exec,async,dmask=0002,fmask=0003,uid=1000,gid=1000 0 0
LABEL=Music\040and\040Animation /media/MusicAndAnimation ntfs-3g auto,rw,exec,async,dmask=0002,fmask=0003,uid=1000,gid=1000 0 0
LABEL=Completed\040Seasons /media/CompletedSeasons ntfs-3g auto,rw,exec,async,dmask=0002,fmask=0003,uid=1000,gid=1000 0 0
They are named correctly, and folders for mountpoints already exists:
root@raspbmc:/home/pi# ls -la /media/
total 24
drwxrwxr-x 6 root root 4096 Jul 27 19:08 .
drwxr-xr-x 24 root root 4096 Jul 13 19:20 ..
drwxrwxr-x 2 pi pi 4096 Jul 27 19:08 CompletedSeasons
drwxrwxr-x 2 pi pi 4096 Jul 27 19:07 Films
drwxrwxr-x 2 pi pi 4096 Jul 27 19:07 IncompletedSeasons
drwxrwxr-x 2 pi pi 4096 Jul 27 19:07 MusicAndAnimation
At this point, I aspect that throwing mount -a
will mount those 4 HDDs, in those 4 folders with permissions are wrote in the fstab.
Let's try:
root@raspbmc:/home/pi# mount -a
mount: devpts already mounted or /dev/pts busy
ntfs-3g: Failed to access volume 'LABEL=Music and Animation': No such file or directory
ntfs-3g 2012.1.15AR.5 external FUSE 29 - Third Generation NTFS Driver
Configuration type 7, XATTRS are on, POSIX ACLS are on
Copyright (C) 2005-2007 Yura Pakhuchiy
Copyright (C) 2006-2009 Szabolcs Szakacsits
Copyright (C) 2007-2011 Jean-Pierre Andre
Copyright (C) 2009 Erik Larsson
Usage: ntfs-3g [-o option[,...]] <device|image_file> <mount_point>
Options: ro (read-only mount), remove_hiberfile, uid=, gid=,
umask=, fmask=, dmask=, streams_interface=.
Please see the details in the manual (type: man ntfs-3g).
Example: ntfs-3g /dev/sda1 /mnt/windows
News, support and information: http://tuxera.com
root@raspbmc:/home/pi# ls -la /media/
total 204
drwxrwxr-x 6 root root 4096 Jul 27 19:08 .
drwxr-xr-x 24 root root 4096 Jul 13 19:20 ..
drwxrwxr-x 1 pi pi 4096 Jul 19 17:17 CompletedSeasons
drwxrwxr-x 1 pi pi 4096 Jul 12 21:58 Films
drwxrwxr-x 1 pi pi 4096 Jul 27 18:51 IncompletedSeasons
drwxrwxr-x 2 pi pi 4096 Jul 27 19:07 MusicAndAnimation
It works! Don't mind the 4th failed, it's turned off... Then I reboot the device, and this is the result:
root@raspbmc:/home/pi# ls -la /media/
total 152
drwxrwxr-x 8 root root 4096 Jul 27 19:40 .
drwxr-xr-x 24 root root 4096 Jul 13 19:20 ..
drwx------ 1 pi pi 4096 Jul 19 17:17 Completed Seasons
drwxrwxr-x 2 pi pi 4096 Jul 27 19:08 CompletedSeasons
drwxrwxr-x 2 pi pi 4096 Jul 27 19:07 Films
drwx------ 1 pi pi 4096 Jul 27 18:51 Incompleted Seasons
drwxrwxr-x 2 pi pi 4096 Jul 27 19:07 IncompletedSeasons
drwxrwxr-x 2 pi pi 4096 Jul 27 19:07 MusicAndAnimation
Usually these new folders are mounted normally, but the olders are empty. Did I forget doing something? Did I make any mistake? Can you help me please?
Edit2~
I tried renamig folders and fstab mountpoints with the same name as the labels, and, after the reboot, the result was something like this:
root@raspbmc:/home/pi# ls -la /media/
total 152
drwxrwxr-x 8 root root 4096 Jul 27 19:40 .
drwxr-xr-x 24 root root 4096 Jul 13 19:20 ..
drwx------ 1 pi pi 4096 Jul 19 17:17 Completed Seasons_
drwxrwxr-x 2 pi pi 4096 Jul 27 19:08 Completed Seasons
drwx------ 1 pi pi 4096 Jul 19 17:17 Films
drwx------ 1 pi pi 4096 Jul 27 18:51 Incompleted Seasons_
drwxrwxr-x 2 pi pi 4096 Jul 27 19:07 Incompleted Seasons
drwxrwxr-x 2 pi pi 4096 Jul 27 19:07 Music and Animation
I thought the system hadn't enought privileges to use my folders as mountpoints, but I don't understand where to fix it (if I need this).
Could it be caused by the use of 'pi' user instead of 'root' one? (uid=1000
and gid=1000
are both refered to pi user and group).
Samba and XBMC are forced to look into those folders for my media stuff, could it be part of the problem?
Edit3~
I tried to use UUID instead of Labels, nothing changed. But, this time, I didn't mount them manually and just reboot, and I noticed that NOTHING happened. No mounted HDDs, no new folders, and the old one is perfectly the same as before (empty and with same privileges).
It seems fstab doesn't work at all, so I checkd its mods:
root@raspbmc:/home/pi# ls -la /etc/fstab
-rw-r--r-- 1 root root 1347 Aug 4 09:31 /etc/fstab
Just to try, I changed it in:
root@raspbmc:/home/pi# ls -la /etc/fstab
-rwxrwxr-- 1 root root 1347 Aug 4 09:41 /etc/fstab
And reboot, but nothing new.
I cleaned the fstab a little bit, to test with just 1 HDD at a time, with this build:
UUID=646ADB4C6ADB199E /media/IncompletedSeasons ntfs-3g auto,rw,exec,async,dmask=0002,fmask=0003,uid=1000,gid=1000 0 0
Of course, the UUID is correct:
root@raspbmc:/home/pi# blkid
/dev/mmcblk0p1: UUID="CEC6-297F" TYPE="vfat"
/dev/mmcblk0p2: UUID="f5035424-d974-4c50-b749-76d000ba1ee6" TYPE="ext4"
/dev/sda1: LABEL="IncompletedSeasons" UUID="646ADB4C6ADB199E" TYPE="ntfs"
Nobody wants to join me here?