NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Swap over NFS



Valery Ushakov a écrit :
> Greg Troxel <gdt%lexort.com@localhost> wrote:
>> BERTRAND Jo?l <joel.bertrand%systella.fr@localhost> writes:
>>
>>>       I'm trying to configure swap over NFS (on a diskless workstation).
>>>
>>>       I have created a swapfile on nfsserver:/srv/schwarz/ (swapfile.0) and
>>> added in client /etc/fstab :
>>>
>>> nfsserver:/srv/schwarz/swapfile.0 none swap sw,nfsmntpt=/swap
>>>
>>>       nfs server seems to run as expected as client can mount
>>> nfsserver:/srv/schwarz in /
> [...]
>> I haven't used diskless for a really long time, so this question may be
>> off.  If you have a single root exported partition that you have /swap
>> in, why don't you just put swapfile.0 in swap in the first place, and
>> use a swap line that adds the file, not trying to mount it?
> 
> Since the swap file is already inside the client's root as far as I
> can tell, you don't have to mount it separately.  From the fstab of
> one of my diskless machines:
> 
>   server:/export/root/krups / nfs rw
>   # the swap file is server:/export/root/krups/swap
>   /swap /swap swap sw

I can do a swapon directly on a file. But as I haven't found other
information (and as this feature doesn't work on several Unix), I have
tried to follow NetBSD documentation...

For example, Linux can open a swapfile on NFS server without error, but
result isn't reliable and you have to use loopback device, not directly
exported file.

Best regards,

JB


Home | Main Index | Thread Index | Old Index