WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Nbd share TC Live CD to another device  (Read 1897 times)

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Nbd share TC Live CD to another device
« on: September 22, 2015, 12:21:04 PM »
I have a client running a TC Live CD that talks to a headless server (no real ports on this thing) that performs some maintenance tasks. In order to not have to take up space on the server (I could have technically just streamed the file over and stored it on the server, but it has limited storage), I was wondering if I could NBD share /dev/sr0 running the TC Live CD on the client and mount it on the server and access its files that way. Can you do that when the Live CD is technically "in use"? I can't copy extensions to memory and umount the CD because the client laptop has very limited memory. Also, USB is out of the question because of restrictions on those at my workplace. Other alternatives are CIFS, NFS, or FTP if those work better off a CD. Not sure what would work best for a CD, especially the overhead of reading from it + TCP traffic w/ NBD. Any suggestions? Figured I'd post this here as this can help out other users trying to do something similar.
« Last Edit: September 22, 2015, 12:27:12 PM by nim108 »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Nbd share TC Live CD to another device
« Reply #1 on: September 22, 2015, 12:55:51 PM »
NBD cannot be shared.  Only one client can attach to it.
FTP is a transfer protocol, not a filesystem.
If both machines are Linux/Unix, use NFS.

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Re: Nbd share TC Live CD to another device
« Reply #2 on: September 22, 2015, 02:43:58 PM »
NBD cannot be shared.  Only one client can attach to it.
FTP is a transfer protocol, not a filesystem.
If both machines are Linux/Unix, use NFS.
I guess share wasn't the most accurate term, I meant export ... I only need one client at a time access. I am aware that FTP is a protocol. I was simply asking what the best way to export a CD-ROM drive mount folder was so that another device can easily access it. I got NFS working with some issues so I guess that is the route to go (yes, server and client are both *nix). I will try to test benchmarks against NBD. I'm assuming the NBD extensions from 4.x are incompatible with 6.x? CIFS is not really ideal since you need samba3 (HUGE) to export the share (and if you're not running Windows, it doesn't make sense anyway).
« Last Edit: September 22, 2015, 02:47:02 PM by nim108 »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Nbd share TC Live CD to another device
« Reply #3 on: September 22, 2015, 02:50:25 PM »
NFS is the native LINUX way. What is wrong with it?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Re: Nbd share TC Live CD to another device
« Reply #4 on: September 22, 2015, 06:13:56 PM »
NFS is the native LINUX way. What is wrong with it?
Nothing wrong with it, configuration was a PITA though but I think I finally got it working. After creating the hosts.allow and exports file in /usr/local/etc/exports and starting the nfs-server (sudo /usr/local/etc/init.d/nfs-server start), it still didn't work. Then I called exportfs -vi and it said no exports found in /etc/exports. So, naturally, I moved the exports file over to /etc/exports, reran exportfs and all was good and the server could now mount (is this a bug with the extension?). I thought the init script should call exportfs itself but it doesn't seem to. And I was looking at alternatives because things like NBD I've used in the past and setup there was always incredibly easy.

Anyway this setup seems to work for now (need to test it and actually use the shared files now). Now the head-scratching part is how do I pass the mount point of the live CD/USB (/mnt/sr0 or /mnt/sdb, could be anything) to the server since it needs to "mount -t nfs ..." the share? Kind of related to my other question of how to figure out what device I booted from (several ways to do that) ... now I need to pass that path to the server.