Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mounting swap, /var and /etc via nfs

0 views
Skip to first unread message

Peter Pippinger

unread,
Aug 25, 2002, 5:54:21 AM8/25/02
to
hi there,

is it possible, to mount all default-mount-points from a nfs-server? could you
please explain, where i have to make changes in the config-files.

thanx a lot
peter

--
>>> www.FreeBSD.org is the be(a)st <<<


Nick Hilliard

unread,
Aug 25, 2002, 2:18:00 PM8/25/02
to
Peter Pippinger wrote:
> is it possible, to mount all default-mount-points from a nfs-server? could you
> please explain, where i have to make changes in the config-files.

on the client side, you need to modify /etc/fstab.

Nick

Lee Harr

unread,
Aug 25, 2002, 5:33:13 PM8/25/02
to

Would you really mount swap over NFS?

That seems really dumb to me...

Nick Hilliard

unread,
Aug 25, 2002, 7:26:50 PM8/25/02
to
Lee Harr wrote:
> Would you really mount swap over NFS?

Sure, if you had a workstation with no hard-disk.

Swap-over-nfs has been around for donkeys years.

Nick

Peter Pippinger

unread,
Aug 26, 2002, 1:47:58 AM8/26/02
to
"Nick Hilliard" <nick@foobar#delete2email#.org> schrieb im Newsbeitrag
news:0Jda9.11393$zX3....@news.indigo.ie...

> Lee Harr wrote:
> > Would you really mount swap over NFS?
>
> Sure, if you had a workstation with no hard-disk.

thats the point. the diskless client starts working for me. there are only some
things left i have to manage.

thanx
peter


Peter Neumann

unread,
Aug 26, 2002, 2:43:50 AM8/26/02
to
"Nick Hilliard" <nick@foobar#delete2email#.org> schrieb im Newsbeitrag
news:0Jda9.11393$zX3....@news.indigo.ie...

hello nick,

have you got an idea how the line for the swap-mount via nfs have to look
like? the others are clear to me, but swap i dont know...

thanx
peter


Nick Hilliard

unread,
Aug 26, 2002, 6:22:13 AM8/26/02
to
Peter Neumann wrote:
> have you got an idea how the line for the swap-mount via nfs have to look
> like? the others are clear to me, but swap i dont know...

You have to create a large swapfile on an nfs partition using dd or something:

# dd if=/dev/zero bs=1024 count=<size-in-megs> /whatever/swapfile

Then turn that into a block device:

# vnconfig -e vn0c /whatever/swapfile

Then just tell the kernel to use the vnode device as a swapfile:

# swapon /dev/vn0c

Because swapon is run very early in the boot cycle, you'll have to enable this
using a script - it's not possible to enable it using fstab.

Nick


Peter Pippinger

unread,
Aug 26, 2002, 1:09:20 PM8/26/02
to
"Nick Hilliard" <nick@foobar#delete2email#.org> schrieb im Newsbeitrag
news:qjna9.11429$zX3....@news.indigo.ie...

im sorry, but is that all to do on the clients side? do i have to do this the
first time without a swap-file? where could i insert the script for swapon?

Nick Hilliard

unread,
Aug 27, 2002, 5:41:30 AM8/27/02
to

The "dd" command needs to be run once in order to create the swap file in the
first place; the vnconfig and swapon commands should be put in a script and
executed on bootup by the clients.

Nick

jpd

unread,
Aug 27, 2002, 4:09:58 PM8/27/02
to

And boy did it suck. <grin/>


(20+ 9k/400 (8 or 16MB, diskless), all mounting (everything, incl. swap)
over NFS over cheapernet to one 9k/433 (48MB), running HPsUX 9.x. Joy!)

--
j p d (at) d s b (dot) t u d e l f t (dot) n l .

Lee Harr

unread,
Aug 27, 2002, 6:18:35 PM8/27/02
to
In article <slrnamnn6d.1ms...@oli252.rolahola.tudelft.nl>, jpd wrote:
> On Mon, 26 Aug 2002 00:26:50 +0100,
> Nick Hilliard <nick@foobar#delete2email#.org> wrote:
>> Lee Harr wrote:
>>> Would you really mount swap over NFS?
>>
>> Sure, if you had a workstation with no hard-disk.
>>
>> Swap-over-nfs has been around for donkeys years.
>
> And boy did it suck. <grin/>
>
>
> (20+ 9k/400 (8 or 16MB, diskless), all mounting (everything, incl. swap)
> over NFS over cheapernet to one 9k/433 (48MB), running HPsUX 9.x. Joy!)
>

Yeah. It seems to me that you ought to be able to pull a 100MB disk
out of the trash to throw in for swap and it would still be faster
and more reliable than swapping over nfs.

Of course I have never tried it, so maybe it's great....

Peter Neumann

unread,
Aug 28, 2002, 2:37:05 AM8/28/02
to
"Nick Hilliard" <nick@foobar#delete2email#.org> schrieb im Newsbeitrag
news:ePHa9.11785$zX3....@news.indigo.ie...

> The "dd" command needs to be run once in order to create the swap file in
the
> first place; the vnconfig and swapon commands should be put in a script
and
> executed on bootup by the clients.

hello again,

im so sorry, but im not so conform with the bootup-procedure on freebsd. i
think if i put the vnconfig and swapon commands in the rc or rc.local - its
maybe to late? where would you like to put them into?

thanx again :-)
peter


Nick Hilliard

unread,
Aug 28, 2002, 8:47:58 AM8/28/02
to
Peter Neumann wrote:
> im so sorry, but im not so conform with the bootup-procedure on freebsd. i
> think if i put the vnconfig and swapon commands in the rc or rc.local - its
> maybe to late? where would you like to put them into?

/usr/local/etc/rc.d

The system should boot up without swap, unless you're doing something pretty weird.

Nick

jpd

unread,
Aug 28, 2002, 7:58:11 PM8/28/02
to

If the point is to have a diskless client, then putting in a (noisy) disk
would defeat its purpose, no?

> Of course I have never tried it, so maybe it's great....

No, but it works. And one client on a 100mbit switched link would be far
more doable than what I wrote above. Then again, depending on the purpose,
one could try to obtain and use a dedicated X terminal.

Bart Lateur

unread,
Aug 28, 2002, 9:00:12 PM8/28/02
to
jpd wrote:

>If the point is to have a diskless client, then putting in a (noisy) disk
>would defeat its purpose, no?

Then use a very old computer. The current days CPU's fans are far more
noisy than most disks.

--
Bart.

Peter Neumann

unread,
Aug 29, 2002, 2:37:12 AM8/29/02
to
"Nick Hilliard" <nick@foobar#delete2email#.org> schrieb im Newsbeitrag
news:3E3b9.12004$zX3....@news.indigo.ie...

> /usr/local/etc/rc.d
> The system should boot up without swap, unless you're doing something
pretty weird.

thanx a lot. works fine and fast...
peter


0 new messages