SMB sharing a Disk Drive

  • I just finished setting up my first shares. I can't seem to connect a CD Disk drive to a share though. is there some protocol I don't know about that would prevent me from doing this? If not what script could I set up to map it and remove it from shares too. looks like there are some difficulties with it not recognizing the drive if I switch disks, probably messes with the UUID?



    Failed to create the directory '/srv/dev-disk-by-uuid-4273aeed00000000/DVD/': Unknown error


    OMV\Exception: Failed to create the directory '/srv/dev-disk-by-uuid-4273aeed00000000/DVD/': Unknown error in /usr/share/openmediavault/engined/rpc/sharemgmt.inc:393

    Stack trace:

    #0 [internal function]: Engined\Rpc\ShareMgmt->set()

    #1 /usr/share/php/openmediavault/rpc/serviceabstract.inc(122): call_user_func_array()

    #2 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod()

    #3 /usr/sbin/omv-engined(544): OMV\Rpc\Rpc::call()

    #4 {main}

  • chente

    Approved the thread.
    • New
    • Official Post

    I read a thread on the same topic a while ago. I seem to remember that the user failed to do so. Search the forum.

    • New
    • Official Post
  • thank you sir! From the looks of it OMV is not the way to get a DiskDrive to be shared. I do wonder if there is just a base linux way to make that drive fully shared out in the greater network so i can just access that DiskDrive

  • linux - How to access a CD/DVD drive over the network? - Super User
    Looks like i found a way to do it with linux. would this cause any errors with the SMB that OMV uses or already has set up?




    Jeff Ward -

    I feel like a Samba / NFS setup is kind of a big hammer for this little nail. I found a blog post on this topic which shows the use of a tool called nbd -- network block device. To use it, setup the server and client.

    (The tutorial is written for Ubuntu with a CD device at /dev/cdrom, so you may need to adjust for your setup.)

    On the server side (with the CDROM):

    Code
    sudo apt-get install nbd-server
    sudo adduser nbd cdrom

    (You may get a warning about no configured exports - ignore it, we'll set one up below.)

    Edit the /etc/nbd-server/config file:

    Code
    [generic]  group     = cdrom  allowlist = true
    [cdrom]  exportname = /dev/cdrom  readonly   = true

    Then: sudo /etc/init.d/nbd-server restart

    On the client side (access the server's CDROM):

    Code
    sudo apt-get install nbd-client

    Now map the block device (where 192.168.1.100 is the ip address of the server):

    Code
    sudo nbd-client 192.168.1.100 -name cdrom /dev/nbd0

    Now you can mount /dev/nbd0 as if it was a CDROM on the client:

    Code
    sudo mkdir /mnt/cdrom   # if it doesn't already exist
    sudo mount -t iso9660 /dev/nbd0 /mnt/cdrom

    Or grab an ISO:

    Code
    sudo dd if=/dev/nbd0 of=~/disc.iso

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!