On Sun, Jul 10, 2011 at 11:16:02PM +0700, Fajar A. Nugraha wrote:
> On Sun, Jul 10, 2011 at 10:10 PM, Gary Mills <mi...@cc.umanitoba.ca> wrote:
> > The `lofiadm' man page describes how to export a file as a block
> > device and then use `mkfs -F pcfs' to create a FAT filesystem on it.
> >
> > Can't I do the same thing by first creating a zvol and then creating
> > a FAT filesystem on it?
> 
> seems not.
[...]
> Some solaris tools (like fdisk, or "mkfs -F pcfs") needs disk geometry
> to function properly. zvols doesn't provide that. If you want to use
> zvols to work with such tools, the easiest way would be using lofi, or
> exporting zvols as iscsi share and import it again.
> 
> For example, if you have a 10MB zvol and use lofi, fdisk would show
> these geometry
> 
>              Total disk size is 34 cylinders
>              Cylinder size is 602 (512 byte) blocks
> 
> ... which will then be used if you run "mkfs -F pcfs -o
> nofdisk,size=20480". Without lofi, the same command would fail with
> 
> Drive geometry lookup (need tracks/cylinder and/or sectors/track:
> Operation not supported

So, why can I do it with UFS?

    # zfs create -V 10m rpool/vol1
    # newfs /dev/zvol/rdsk/rpool/vol1
    newfs: construct a new file system /dev/zvol/rdsk/rpool/vol1: (y/n)? y
    Warning: 4130 sector(s) in last cylinder unallocated
    /dev/zvol/rdsk/rpool/vol1:  20446 sectors in 4 cylinders of 48 tracks, 128 
sectors
        10.0MB in 1 cyl groups (14 c/g, 42.00MB/g, 20160 i/g)
    super-block backups (for fsck -F ufs -o b=#) at:
     32,

Why is this different from PCFS?

-- 
-Gary Mills-        -Unix Group-        -Computer and Network Services-
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to