[Gllug] Convertng a disk (regular) file to a named pipe
Tethys
tet at accucard.com
Wed Apr 30 22:52:13 UTC 2003
Adrian McMenamin writes:
>> Oh I see - there seems to be a recipe there for freebsd (which doesn't
>> involve any named pipes at all):
>
>Why is it not a named pipe? I may well have got the nomeclture wrong (this is
>a genuine question), but this:
>
>http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?named+pipe
>
>suggests that I haven't afaics.
It's not a named pipe because... well, because it's just not.
Why is an elephant not a banana?
All it's doing is creating a block device out of a file, and then
mounting that device. No named pipes were harmed by this operation.
Under Linux, use a loopback mount to do that. Note that last time I
tried it (which admittedly was 1996/7 or so) Linux didn't support
loopback mounts over NFS, but I believe that's now been fixed. Thus
to add 1MB of swap over NFS:
dd if=/dev/zero of=/my/nfs/mounted/file bs=1024 count=1024
losetup /dev/loop0 /my/nfs/mounted/file
swapon /dev/loop0
Note that since Linux supports swapping to files directly as well
as to block devices, you should in theory just be able to do:
dd if=/dev/zero of=/my/nfs/mounted/file bs=1024 count=1024
swapon /my/nfs/mounted/file
But see this caveat in swapon(8):
Swap over NFS may not work.
Tet
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list