I'm not sure if this is the only problem you're having, but from what
you have below, in the first case you are trying to newfs on a block
device and in the second case you are trying to newfs on a raw device.
You can't create a filesystem on a block device; you need to specify the
raw device (rdsk) to do that.
William Yang
On Wed, 2009-01-28 at 15:29 -0500, Eric Sproul wrote:
> Jim Dunham wrote:
> > Why are you looking within the devices tree, instead of asking ZFS.
> >
> > What do the following commands show?
> >
> > zpool status
> > zpool list
> > zfs list
> > zpool export data
> > zpool import
> > zpool import data
>
> Jim,
> My pool is fine. I can create normal ZFS filesystems and use them with no
> problem. The reason I'm looking inside the device tree is that my zvol is not
> working.
>
> # zfs list data/vol/testlun1
> NAME USED AVAIL REFER MOUNTPOINT
> data/vol/testlun1 28.1M 1008M 28.1M -
>
> # zfs get type,volsize data/vol/testlun1
> NAME PROPERTY VALUE SOURCE
> data/vol/testlun1 type volume -
> data/vol/testlun1 volsize 500M -
>
> # newfs /dev/zvol/dsk/data/vol/testlun1
> newfs: /dev/zvol/dsk/data/vol/testlun1: No such file or directory
>
> If I truss my newfs, I see the error:
> stat64("/dev/zvol/dsk/data/vol/testlun1", 0x08047C00) Err#2 ENOENT
>
> This is why I was poking around in the device tree.
>
> # ls -l /dev/zvol/dsk/data/vol/testlun1
> lrwxrwxrwx 1 root root 38 Jan 21 14:09
> /dev/zvol/dsk/data/vol/testlun1 -> ../../../../../devices/pseudo/z...@0:3c
>
> # ls -l /devices/pseudo/z...@0:3c
> /devices/pseudo/z...@0:3c: No such file or directory
>
> I believe this mismatch is also the root cause of my iSCSI LUN probe failures.
> Rick indicated that the sense data was related to hardware, which jives with
> the
> missing device entry.
>
> Having done nothing "clever" to mess with device entries, I am left to suspect
> that this is a bug with zvols, but I'm hoping someone can enlighten me as to
> how
> the device entries are enumerated. It appears to be done at least when a zvol
> is created, because when I destroy "data/vol/testlun1" and create
> "data/vol/testlun2", my pseudo device appears:
>
> # ls -l /dev/zvol/dsk/data/vol/testlun2
> lrwxrwxrwx 1 root root 38 Jan 28 15:15
> /dev/zvol/dsk/data/vol/testlun2 -> ../../../../../devices/pseudo/z...@0:3c
>
> # ls -l /devices/pseudo/z...@0:3c
> brw------- 1 root sys 182, 3 Jan 28 15:15
> /devices/pseudo/z...@0:3c
>
> # newfs /dev/zvol/rdsk/data/vol/testlun2
> newfs: construct a new file system /dev/zvol/rdsk/data/vol/testlun2: (y/n)? y
> Warning: 2082 sector(s) in last cylinder unallocated
> /dev/zvol/rdsk/data/vol/testlun2: 1023966 sectors in 167 cylinders of 48
> tracks, 128 sectors
> 500.0MB in 12 cyl groups (14 c/g, 42.00MB/g, 20160 i/g)
> super-block backups (for fsck -F ufs -o b=#) at:
> 32, 86176, 172320, 258464, 344608, 430752, 516896, 603040, 689184, 775328,
> 861472, 947616
>
> The pseudo device disappears again after a reboot, so the zvol is useless.
>
> Eric
> _______________________________________________
> storage-discuss mailing list
> [email protected]
> http://mail.opensolaris.org/mailman/listinfo/storage-discuss
_______________________________________________
storage-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/storage-discuss