From owner-freebsd-bugs Wed Apr 18 6: 0:21 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E89F437B42C for ; Wed, 18 Apr 2001 06:00:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f3ID03m75990; Wed, 18 Apr 2001 06:00:03 -0700 (PDT) (envelope-from gnats) Date: Wed, 18 Apr 2001 06:00:03 -0700 (PDT) Message-Id: <200104181300.f3ID03m75990@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bruce Bauman Subject: RE: misc/26649: diskless client can't share root with server Reply-To: Bruce Bauman Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR misc/26649; it has been noted by GNATS. From: Bruce Bauman To: 'Peter Pentchev' Cc: "'freebsd-gnats-submit@FreeBSD.org'" Subject: RE: misc/26649: diskless client can't share root with server Date: Wed, 18 Apr 2001 08:57:53 -0400 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C0C807.2E9A14F0 Content-Type: text/plain; charset="iso-8859-1" My colleague just pointed out that it's an NFS mounted /dev, so cpio can't figure out that it's a device. In any case, it doesn't work. -----Original Message----- From: Peter Pentchev [mailto:roam@orbitel.bg] Sent: Wednesday, April 18, 2001 3:10 AM To: bbauman@wgate.com Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: misc/26649: diskless client can't share root with server Eh? cpio copies device files just fine - it does a lstat() on the file name, detects a device, then does a mknod() when recreating the filesystem. [root@ringworld:v0 ~/tmp/dv]# (cd /; find -x dev | cpio -o -H newc) | cpio -i -H newc -d 557 blocks 557 blocks [root@ringworld:v0 ~/tmp/dv]# du dev 1 ./dev/fd 195 ./dev [root@ringworld:v0 ~/tmp/dv]# du /dev 1 /dev/fd 195 /dev [root@ringworld:v0 ~/tmp/dv]# Seems to work for me.. G'luck, Peter -- If this sentence were in Chinese, it would say something else. On Tue, Apr 17, 2001 at 09:20:57AM -0700, bbauman@wgate.com wrote: > > >Number: 26649 > >Category: misc > >Synopsis: diskless client can't share root with server > >Originator: Bruce Bauman > >Release: 4.3-RC > >Organization: > WorldGate Communications > >Environment: > >Description: > The rc.diskless2 script creates a /dev on the client by doing a mount_mfs followed by a cpio of the server's /dev. This won't work > because /dev/zero can't be copied to the client's /dev since it > provides an infinite supply of data. Other devices have similar > problems. > >How-To-Repeat: > Share the root filesystem between the boot server and client in a diskless configuration. No workee. > >Fix: > Rather than using cpio, we copy MAKEDEV to /tmp, then mount_mfs, then > MAKEDEV the appropriate device nodes in the client's /dev. Works like > a charm and allows you reduce the clutter in the diskless client's /dev. > > DEVFS would have been a possible solution for us, but we use dhclient on the diskless clients. dhclient relies on bpf, and bpf won't work > with DEVFS, so although it is a more elegant solution, it wouldn't > work for us. ------_=_NextPart_001_01C0C807.2E9A14F0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: misc/26649: diskless client can't share root with = server

My colleague just pointed out that it's an NFS = mounted /dev, so cpio
can't figure out that it's a device. In any case, it = doesn't work.

-----Original Message-----
From: Peter Pentchev [mailto:roam@orbitel.bg]
Sent: Wednesday, April 18, 2001 3:10 AM
To: bbauman@wgate.com
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/26649: diskless client can't share = root with server


Eh?  cpio copies device files just fine - it = does a lstat() on the file name,
detects a device, then does a mknod() when = recreating the filesystem.

[root@ringworld:v0 ~/tmp/dv]# (cd /; find -x dev | = cpio -o -H newc) | cpio -i -H newc -d
557 blocks
557 blocks
[root@ringworld:v0 ~/tmp/dv]# du dev
1       = ./dev/fd
195     ./dev
[root@ringworld:v0 ~/tmp/dv]# du /dev
1       /dev/fd
195     /dev
[root@ringworld:v0 ~/tmp/dv]#

Seems to work for me..

G'luck,
Peter

--
If this sentence were in Chinese, it would say = something else.

On Tue, Apr 17, 2001 at 09:20:57AM -0700, = bbauman@wgate.com wrote:
>
> = >Number:         = 26649
> = >Category:       misc
> = >Synopsis:       diskless client can't = share root with server
> >Originator:     Bruce = Bauman
> = >Release:        4.3-RC
> >Organization:
> WorldGate Communications
> >Environment:
> >Description:
> The rc.diskless2 script creates a /dev on the = client by doing a mount_mfs followed by a cpio of the server's /dev. = This won't work

> because /dev/zero can't be copied to the = client's /dev since it
> provides an infinite supply of data. Other = devices have similar
> problems.
> >How-To-Repeat:
> Share the root filesystem between the boot = server and client in a diskless configuration. No workee.
> >Fix:
> Rather than using cpio, we copy MAKEDEV to = /tmp, then mount_mfs, then
> MAKEDEV the appropriate device nodes in the = client's /dev. Works like
> a charm and allows you reduce the clutter in = the diskless client's /dev.
>
> DEVFS would have been a possible solution for = us, but we use dhclient on the diskless clients. dhclient relies on = bpf, and bpf won't work

> with DEVFS, so although it is a more elegant = solution, it wouldn't
> work for us.

------_=_NextPart_001_01C0C807.2E9A14F0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message