Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have 2 PCs with Ubuntu at home and a network link between them.

If I do

 $ sshfs pc2root@192.168.0.2:/ /media/pc2

can I use a remote device as a local one? (in this case: /media/pc2/dev/sr0 as a local DVD-RW). In the end, everything in Unixes is a file, right?

I did

 culebrón@culebrón:/dev$ sudo ln -s /media/pc2/dev/sr0 dvdrw

but without a success: Brasero and K3b don't see any DVD device.

I know, for most tasks, SSH and sshfs are more than enough, but would like to know if there's a general solution.

share|improve this question

4 Answers 4

up vote 9 down vote accepted

SSHFS does not work that way -- it handles files, but not devices. Everything is a file, but there are many types of files, including: regular files, directories, symbolic links, sockets, character devices, and block devices.

% ls -l /dev/sda
brw-r----- 1 root disk 8, 0 Oct  9 20:59 /dev/sda

The letter "b" indicates this is a block device. These types of files support ioctl in addition to the normal read and write functions. The purpose of ioctl is to allow a way to do "extra" operations to the device. These operations are different for each type of device: a DVD device can open/close its door, but an ethernet device cannot.

This is why the SSHFS software cannot make device files available over the network.

You will need a different system that is made for this purpose, something like webCDwriter.

share|improve this answer
    
I sort of can't believe webCDwriter is still around. –  phresus Nov 20 '09 at 17:29
    
I never tried it -- if it sucks, don't blame me :D –  Kevin Panko Nov 20 '09 at 17:40

Linux/UNIX are not Plan 9. "Everything is a file" doesn't mean that they're all the same sort of files. FIFOs and device nodes being prime examples.

No, you cannot do it this way. My recommendation would be to use a virtual writer (celebron writes to an image, .iso or other) and pipe that to cdrecord over ssh.

share|improve this answer

Brasero and K3b don't see a DVD device because your local computer's OS kernel doesn't see a DVD device.

Mounting filesystems remotely is easy; there are network protocols like CIFS, NFS, AFS, and even SSHFS to handle all the details of file access. But low-level device access is a different animal -- note that none of these protocols would allow, for example, repartitioning or reformatting the filesystem being accessed.

You would need a low-level protocol like iSCSI, FCoE (Fibre Channel over Ethernet), or ATAoE (ATA over Ethernet) to do what you want to do. This would involve driver-level software on the remote device to export the device, and driver-level software on the local device to attach to it. There's Windows software called Starport that claims this capability, and a Linux-iSCSI site that may give you more information about what's currently possible.

But generally, these technologies are used in corporate data centers with expensive hardware. For general home use, you really want to run Brasero on your remote computer and just display the GUI window on your local system (via X, VNC, or some other remote desktop technology).

share|improve this answer
1  
AFAIK, iSCSI will not send ATAPI commands. Remote X, FreeNX, VNC are great sugggestions. –  phresus Nov 20 '09 at 17:28
    
hmmm, maybe not, but burning to a remote optical device is given as an iSCSI example on the Starport site. might need a SCSI burner device for that tho. or use ATAoE, which (theoretically) should handle ATAPI just fine. –  quack quixote Nov 20 '09 at 18:09

If you want to remotely access a block device, there is such a tool called 'nbd' (Network Block Device). I have used this in the past to clone a harddrive using dd if=/dev/nbd0 of=/dev/hda with reasonable success.

However, I doubt this will work for optical drives.

I think you'd be better off running the burning software locally on the remote machine (say with X or VNC), and have it pull files using regular file sharing mechanisms like samba or NFS.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.