NFS_ROOT not working when using a Netapp server

2001-01-16 Thread Brian Dean

Hi,

Has anyone here sucessfully used a Netapp fileserver as the NFS root
filesystem for FreeBSD clients?

My FreeBSD client basically mounts the Netapp, boots the kernel, but
fails early in /etc/rc because /dev/mem, /dev/kmem, /dev/null (and
friends) are unavailable.

NOTE that this all works fine when a FreeBSD box is used as the NFS
root server, but everything else being the same.  The client is
mounting an image built from -STABLE sources late last week.

Here's what I'm seeing when the client boots -v:

SMAP type=01 base=  len= 000a
SMAP type=01 base= 0010 len= 07f0
SMAP type=02 base= fff8 len= 0008
Copyright (c) 1992-2001 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 4.2-STABLE #1: Tue Jan 16 12:51:42 EST 2001
root@tribble:/usr/src/sys/compile/DISKLESS
Calibrating clock(s) ... TSC clock: 264902265 Hz, i8254 clock: 1193253 Hz
CLK_USE_I8254_CALIBRATION not specified - using default frequency
Timecounter "i8254"  frequency 1193182 Hz
CLK_USE_TSC_CALIBRATION not specified - using old calibration method
Timecounter "TSC"  frequency 264887585 Hz
CPU: Pentium II/Pentium II Xeon/Celeron (264.89-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x633  Stepping = 3
  Features=0x80f9ffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,MMX
real memory  = 134217728 (131072K bytes)
Physical memory chunk(s):
0x1000 - 0x0009, 651264 bytes (159 pages)
0x00361000 - 0x07ff7fff, 130641920 bytes (31895 pages)
avail memory = 127270912 (124288K bytes)
bios32: Found BIOS32 Service Directory header at 0xc00ffe80
bios32: Entry = 0xffe90 (c00ffe90)  Rev = 0  Len = 1
pcibios: PCI BIOS entry at 0xcc1e
pnpbios: Found PnP BIOS data at 0xc00fe2d0
pnpbios: Entry = f:e2f4  Rev = 1.0
Other BIOS signatures found:
ACPI: 
Preloaded elf kernel "kernel" at 0xc033b000.
Pentium Pro MTRR support enabled
md0: Malloc disk
Creating DISK md0
Math emulator present

...
lot's more boot verbosity
...

Mounting root from nfs:
NFS ROOT: AA.BB.CC.DD:/vol/nfsroot/img3
start_init: trying /sbin/init
crw-rw-rw-  1 root  wheel0, 0x00080002 Jan 16 11:35 /dev/null
/etc/rc: cannot create /dev/null: no such device or address
Enter full pathname of shell or RETURN for /bin/sh: 
# dmesg
dmesg: /dev/mem: Device not configured
# echo foo  /dev/null
cannot create /dev/null: no such device or address
# ls -l /dev/null
crw-rw-rw-  1 root  wheel0, 0x00080002 Jan 16 11:35 /dev/null
# ls -l /dev/mem
crw-r-  1 root  kmem0, 0x0008 Jan 15 13:28 /dev/mem
# df -k .
Filesystem 1K-blocks UsedAvail Capacity  Mounted on
AA.BB.CC.DD:/vol/nfsroot/img3   15813736  2746140 1306759617%/

I can provide more boot verbosity upon request.  Any ideas as to what
the problem might be?

Thanks,
-Brian
-- 
Brian Dean
[EMAIL PROTECTED]
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: NFS_ROOT not working when using a Netapp server

2001-01-16 Thread Alfred Perlstein

* Brian Dean [EMAIL PROTECTED] [010116 10:17] wrote:
 Hi,
 
 Has anyone here sucessfully used a Netapp fileserver as the NFS root
 filesystem for FreeBSD clients?
 
 My FreeBSD client basically mounts the Netapp, boots the kernel, but
 fails early in /etc/rc because /dev/mem, /dev/kmem, /dev/null (and
 friends) are unavailable.

This is expected, NFS doesn't provide a name-major/minor mapping
system and as such each OS must provide its own devices heirarchy
for it to work.

Some suggestions are using an mfs /dev and creating the device
nodes in there, or making a filesystem via the "vn" device and
mounting a vn device over NFS.

Honestly I haven't really done anything with NFSroot, but these
options would probably work, you might also have luck looking
in the mailing list archives and reading the DISKLESS(8) manpage.

best of luck,
-- 
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
"I have the heart of a child; I keep it in a jar on my desk."


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: NFS_ROOT not working when using a Netapp server

2001-01-16 Thread Mike Smith

 # ls -l /dev/null
 crw-rw-rw-  1 root  wheel0, 0x00080002 Jan 16 11:35 /dev/null
 # ls -l /dev/mem
 crw-r-  1 root  kmem0, 0x0008 Jan 15 13:28 /dev/mem
 # df -k .

mass:~ls -l /dev/null
crw-rw-rw-  1 root  wheel2,   2 Jan 16 12:20 /dev/null
mass:~ls -l /dev/mem
crw-r-  1 root  kmem2,   0 Nov 22  1999 /dev/mem

What did you use to actually create your exported /dev on the NetApp in 
the first place?  Encoding of device major/minor numbers is funky with 
NFS, and FreeBSD only does NFSv2 for the root filesystem by default 
(which makes matters even worse).

If you didn't, try making the exported /dev with a FreeBSD client.  If 
that still fails (wouldn't surprise me all that much), you want to be 
using an MFS or md-mounted /dev.

The standard rc.diskless stuff works OK, but I don't like MFS all that 
much, so I rewrote it slightly to use md.  See 
http://ziplok.dis.org/msmith/rc.diskless*.diff (could do with some 
polishing).

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
   V I C T O R Y   N O T   V E N G E A N C E




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: NFS_ROOT not working when using a Netapp server

2001-01-16 Thread Brian Dean


On Tue, Jan 16, 2001 at 12:27:31PM -0800, Mike Smith wrote:
 
 What did you use to actually create your exported /dev on the NetApp in 
 the first place?  Encoding of device major/minor numbers is funky with 
 NFS, and FreeBSD only does NFSv2 for the root filesystem by default 
 (which makes matters even worse).

I created the client's /dev entries by mounting the netapp from
another FreeBSD box, chroot'ing to the top of the client's root tree,
then "cd /dev  sh MAKEDEV all".

However, this was done with an NFS V3 mount and as you observed,
FreeBSD uses NFSv2 for the root.  After repeating this same same
procedure using an NVSv2 mount to the Netapp, the major/minor numbers
look a whole lot better and it now works just fine.

It's odd, though, that the NFSv2 and NFSv3 handle these aspects of of
the inode so differently.  I wonder if this is a bug, and if so, is it
Netapp's or ours?  It is interesting to note that this mangling does
not occur when FreeBSD is both the client and the server.

-Brian
-- 
Brian Dean
[EMAIL PROTECTED]
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: NFS_ROOT not working when using a Netapp server

2001-01-16 Thread Mike Smith

 However, this was done with an NFS V3 mount and as you observed,
 FreeBSD uses NFSv2 for the root.  After repeating this same same
 procedure using an NVSv2 mount to the Netapp, the major/minor numbers
 look a whole lot better and it now works just fine.
 
 It's odd, though, that the NFSv2 and NFSv3 handle these aspects of of
 the inode so differently.  I wonder if this is a bug, and if so, is it
 Netapp's or ours?  It is interesting to note that this mangling does
 not occur when FreeBSD is both the client and the server.

It's a "feature" of the way that the NetApp box stores the major/minor 
numbers, and not really a bug per se.  FreeBSD has somewhat different 
expectations of major/minor number storage as compared to some other 
platforms, and the interactions are not well defined.

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
   V I C T O R Y   N O T   V E N G E A N C E




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message