Author Topic: [SOLVED [not 100% sure how though]] No read /write on second drive  (Read 3215 times)

Pat

  • Zen Apprentice
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Good afternoon everyone

I am having trouble getting a second drive to share properly.

I have installed, and partitioned it as fat32 it is mounted and can be seen in Zentyal disk usage as /dev/sdb1
The  partition properties are
Mounted on.     /main.  (I called the partition main)
Type.                vfat
Options.             rw

In file sharing I have created a share called shared with the share path
/dev/sdb1/drivers   
Comment.  Drivers
Access set to read and write for all in a group and guest access

But when I go to a windows PC and log in as a user, I can see the folder but I can't access the folder

Is there anything else I need to do ??
« Last Edit: November 23, 2011, 01:56:12 am by Pat »

Pat

  • Zen Apprentice
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: No read /write on second drive
« Reply #1 on: November 09, 2011, 12:23:46 am »
Does anyone have any info on this ?

vshaulsk

  • Zen Samurai
  • ****
  • Posts: 477
  • Karma: +9/-1
    • View Profile
Re: No read /write on second drive
« Reply #2 on: November 09, 2011, 03:40:06 pm »
Have you tried turning off guest access and then connecting with a valid user.

I have found that I get conflict when I have guest enabled and specific group or user.

Pat

  • Zen Apprentice
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: No read /write on second drive
« Reply #3 on: November 09, 2011, 05:25:52 pm »
will try that now and see what happens :)

Pat

  • Zen Apprentice
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: No read /write on second drive
« Reply #4 on: November 09, 2011, 06:30:32 pm »
unfortunatly no joy :(

I really cant see whats wrong

vshaulsk

  • Zen Samurai
  • ****
  • Posts: 477
  • Karma: +9/-1
    • View Profile
Re: No read /write on second drive
« Reply #5 on: November 09, 2011, 06:37:24 pm »
is the folder   "drivers" created on the drive ?????   If the folder is not already created on the drive... the file sharing by path name does not automatically create it.

/dev/sdb1    you mounted on /main

are there any folders on the drive??

your share path would be   /main/(file name)    the file name needs to already exist under /main/   
« Last Edit: November 09, 2011, 06:40:21 pm by vshaulsk »

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: No read /write on second drive
« Reply #6 on: November 10, 2011, 04:54:47 am »
The device path is /dev/sdb1 but the pathname is /main/drivers  no?  Open a command line and do an "ls /main/drivers" and see if it gives an error.

Pat

  • Zen Apprentice
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: No read /write on second drive
« Reply #7 on: November 11, 2011, 03:32:05 am »
This is just hurting my head now, I'm very quickly beginning to hate Linux as I cant get it to do what should be the simplest of tasks.

Can someone please tell me where I'm going wrong and what I need to do to fix it.

From the beginning heres what I've done so far

Installed new drive
used GParted to partition as FAT32 and label drive main
created folder drivers
added this line to fstab  " /dev/   sdb1      /main      vfat   rw,defaults,umask=0000 0 0"
I type "mount /dev/sdb1"
if I type "ls /main" I get "drivers" underneath in green which I'm guessing means that the folder is there OK

in Zentyal, in Disk Usage, top tab says "/dev/sdb1"  Mounted on    "/main " Type    vfat
Options    rw,umask=0000 , so drive and partition are being seen by Zentyal.

In File Sharing, Shares, add new, share name "drivers" share path /dev/sdb1/main/drivers (have also tried just /dev/sdb1/drivers) Guest access on or off, makes no difference.

Dashboard restart file sharing

Goto a windows PC, logged on domain, all shares on original drive work fine, but if I try to access the drivers share i get the windows can not access server/drivers.

from Zentyal GUI I can access, read, write, create and delete folders in the new drive, but it just will not share.

where am I going wrong ???





vshaulsk

  • Zen Samurai
  • ****
  • Posts: 477
  • Karma: +9/-1
    • View Profile
Re: No read /write on second drive
« Reply #8 on: November 11, 2011, 04:11:14 am »
The path is just  /main/drivers

you don't put the disk name in the path.....    the path is the mount point.   You can either share /main   or if you want a specific file in main you type /main/(file name)

I have a raid6 mounted under /mnt/raid6    inside I have 6 folder.

Under file sharing in zentyal I have paths that look like    /mnt/raid6/file 1 ........ /mnt/raid6/file2....... etc.............
« Last Edit: November 11, 2011, 04:14:07 am by vshaulsk »

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: No read /write on second drive
« Reply #9 on: November 11, 2011, 06:48:24 am »
Everything in unix is a file.  Physical devices have a file that represents them.  These files are in the /dev directory.  BTW the "/" represents the top of the directory tree.  Unix does not have the concept of drive letters.  All hard drives are mounted to one directory tree.  So /dev/sdb1  refers to a device (in this case a hard drive because it begins with sd), specifically the first partition on that drive.  The fstab entry first specifies what device and then where on the tree to put it. /main means that it is mounted under the root directory in a directory called main.  All of the contents of the drive will be found under main.  So if you were to share /main all of the contents would be available.  If you only intend to share drivers then just share /main/drivers.  Does this make sense?

vshaulsk

  • Zen Samurai
  • ****
  • Posts: 477
  • Karma: +9/-1
    • View Profile
Re: No read /write on second drive
« Reply #10 on: November 11, 2011, 12:59:42 pm »
Half_life..... I like you explanation better :)    I know how to do it, but not the theoretical explanation of how linux looks at the system.   This is why explanations like this one you gave and like the ones Christian usually gives are good.  They explain the reason for something and theoretical knowledge..... not just ( hey... this is how you do it.... follow step 1 thought 5)... HAHAHA  !!!

Pat

  • Zen Apprentice
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: No read /write on second drive
« Reply #11 on: November 11, 2011, 05:27:28 pm »
So how do you send nice cold pints of beer through a forum ??   :D

I can now access the folder :)

Still now have an issue on boot as it says it can't mount Main, but i'm guessing i've made a mistake in fstab which i'll look for in a minute.

Many Thanks every one :)

vshaulsk

  • Zen Samurai
  • ****
  • Posts: 477
  • Karma: +9/-1
    • View Profile
Re: No read /write on second drive
« Reply #12 on: November 11, 2011, 05:34:17 pm »
Yeah I wish I was better with the command line when it came to regular file and drive management.

I ended up installing webmin and use that for file and drive management.   Plus I like how easy it makes creating and raid arrays, formatting file systems, and mounting them.

Pat

  • Zen Apprentice
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: No read /write on second drive
« Reply #13 on: November 11, 2011, 06:41:58 pm »
Now I have another problem, the boot/ root drive was alway sda1 but since I got this share to work it has now changed to sdb, which has now messed everything else up , I can no longer mount the new drive.

If Type mount /dev/sdb1 I get the error that it is already mounted

If I type mount /dev/sda1 then I get the error can't find /dev/sda1 in fstab

Have changed fstab line from sdb1 to sda1 keeping it the same as above but still the same

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: No read /write on second drive
« Reply #14 on: November 12, 2011, 03:12:57 am »
Check to see which drives it has currently mounted by typing mount on the command line.  It will give a whole bunch of virtual devices  and a couple of hard drives.  The drives are recognizable because the line starts with /dev/.........  instead of for instance proc or none .  Let me know which drives are currently mounted.