Author Topic: Sharing Dvd-R device [resolved]  (Read 758 times)

Offline rise82

  • Jr. Member
  • **
  • Posts: 41
Sharing Dvd-R device [resolved]
« on: March 24, 2012, 09:14:47 PM »
Hi... im using pclinuxos-lxde-2012.01 and already up to date until now... I need a little help here... how to share dvd-r device using samba server? I already know how to share data from hard drive, i know that when I insert cd to device it will be auto mount and i can share it. Well what i think is... its not eficient if you want to share your data from cd you have to edit your samba server and change data location. What i want to know is... is there a way to share your dvd-r device and when you insert your cd/dvd it will be auto mount and it will be auto share... Any sugestion/idea/help for this problem?
Thanks before...
« Last Edit: March 28, 2012, 08:36:28 PM by rise82 »

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: Sharing Dvd-R device
« Reply #1 on: March 24, 2012, 10:04:17 PM »
we discussed this in another post, the cost of a external dvd-r drive is very low, it is simpler and more fast solution on most cases and also doesn't require your ethernet or wifi connection to work
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: Sharing Dvd-R device
« Reply #2 on: March 26, 2012, 12:07:37 PM »
Have you tried linking the /media directory from within an existing (HD based) share, so that when items are auto-mounted, they can be accessed by going through the link?

Just a thought...

Offline rise82

  • Jr. Member
  • **
  • Posts: 41
Re: Sharing Dvd-R device
« Reply #3 on: March 27, 2012, 01:17:18 AM »
Have you tried linking the /media directory from within an existing (HD based) share, so that when items are auto-mounted, they can be accessed by going through the link?

Just a thought...

could you give me guide step by step? when no cd the device invisible cant see what i can mount  :(
Thanks before...

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: Sharing Dvd-R device
« Reply #4 on: March 27, 2012, 06:39:01 AM »
Do you have a regular share (HDD based) setup?  That would be the first step.

Let's assume you are sharing /home/shared.

Since auto-mounting uses the /media directory (it will create additional directories, such as /media/disk or /media/cdrom, as required), if you link to the /media directory from your share (/home/share), whatever comes and goes within the /media directory should be accessible through the link.

To create the link, run the following from the command line (on the server with the share):
Code: [Select]
cd /home/share
ln -s /media/ auto-mount_media

This will create a file inside /home/share called auto-mount_media that points to /media/.  You can change the "auto-mount_media" to whatever you want to call it.

This has worked for me in the past, but I would have to test if it works with the current defaults in PCLOS (there is a configuration setting for Samba that controls how links are handled when shared...I'll check it out against the latest ISO when I get a chance.

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: Sharing Dvd-R device
« Reply #5 on: March 28, 2012, 11:03:39 AM »
Have you tried linking the /media directory from within an existing (HD based) share, so that when items are auto-mounted, they can be accessed by going through the link?

Just a thought...

could you give me guide step by step? when no cd the device invisible cant see what i can mount  :(
Thanks before...

OK.

I tested the "linking" method, and that only works (by default) when the link points to a location within the same share...so, without a major overhaul of smb.conf (and, possibly, other files), probably not the choice you want.

I tried another approach, though...I shared the /media directory, and that worked OK.

Using pcc, I created a new share (called media, and pointed to /media/), and when I mounted a CDROM, it became available though the share.

The following piece of code got generated:
Code: [Select]
[media]
   path = /media
   comment = Transitory media
   browseable = yes
   public = yes
   writable = yes

This will give full access to all mounted, removable media (i.e., able to change contents of USB drives, etc.).  For CDROM support (which are read-only anyway), you could change writable to no.

Offline rise82

  • Jr. Member
  • **
  • Posts: 41
Re: Sharing Dvd-R device
« Reply #6 on: March 28, 2012, 07:50:23 PM »
wow that working... but if sharing media it will share all your data in other drive right?
anyways thanks for the help, now i can share cd/dvd rom now..

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: Sharing Dvd-R device
« Reply #7 on: March 28, 2012, 08:08:36 PM »
wow that working... but if sharing media it will share all your data in other drive right?
anyways thanks for the help, now i can share cd/dvd rom now..

Yes.  All media handled by udev (CD/DVDs, USB HDD/Flash, floppies, etc.) will all be shared if they are mounted...