Re: Problem with ZFS and devices

From: Pawel Jakub Dawidek <pjd_at_FreeBSD.org>
Date: Sun, 22 Apr 2007 23:22:13 +0200
On Sun, Apr 22, 2007 at 01:11:43PM +0200, Gary Jennejohn wrote:
> I have a really strange problem with ZFS.
> 
> I have a filesystem (mypool/scr mounted on /scr) which contains root file
> systems for various embedded boards (arm, ppc, mips). The file systems
> naturally contain a /dev directory.
> 
> I have:
> mypool/scr  devices        on                     default
> 
> The device numbers a _totally_ fubar on ZFS!
> 
> I used a tarball called dev.tar to move dev from a Linux box to my FreeBSD
> box.
> 
> When I unpack dev.tar under ZFS I see totally screwd up values:
> 
> crw-r--r--  1 root  bin      5, 0xc11b0020 Feb  3 22:06 ttyCPM0
> crw-r--r--  1 root  bin      0,   0 Feb  3 22:06 ttyCPM1
> crw-r--r--  1 root  bin     69, 0xc11a0008 Feb  3 22:06 ttyCPM2
> crw-r--r--  1 root  bin      0,   0 Feb  3 22:06 ttyCPM3
> crw-r--r--  1 root  bin      0,   0 Feb  3 22:06 ttyCPM4
> crw-r--r--  1 root  bin     69, 0xc11a0008 Feb  3 22:06 ttyCPM5
> 
> If I unpack dev.tar under UFS (/tmp) then all device numbers are correct:
> 
> crw-r--r--  1 root  bin    204,  46 Feb  3 22:06 ttyCPM0
> crw-r--r--  1 root  bin    204,  47 Feb  3 22:06 ttyCPM1
> crw-r--r--  1 root  bin    204,  48 Feb  3 22:06 ttyCPM2
> crw-r--r--  1 root  bin    204,  49 Feb  3 22:06 ttyCPM3
> crw-r--r--  1 root  bin    204,  50 Feb  3 22:06 ttyCPM4
> crw-r--r--  1 root  bin    204,  51 Feb  3 22:06 ttyCPM5
> 
> The screwed up device numbers prevent me from using my FreeBSD box as the
> server for my embedded boards.
> 
> Even weirder:
> 
> root:peedub:~:bash:1> cd /scr/eldk-4.1/arm/arm/dev
> root:peedub:dev:bash:2> mknod ttyCPM0 c 204 46
> root:peedub:dev:bash:3> ls -l
> total 1
> crw-r--r--  1 root  bin    0,   0 Apr 22 13:02 ttyCPM0
> 
> Any ideas WTF is going here? Is this a pathological problem with ZFS?

I just committed a fix. Can you update and confirm it works for you?

PS. Thanks for the kind bug report.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd_at_FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

Received on Sun Apr 22 2007 - 19:23:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:09 UTC