Re: Formatting XBD device in vxworks6.3



Hi Peter,
Thanks for the reply..
But i tried using dosfsDiskFormat but this also returns me error.

1)If i dont use XBD wrapper the virtual device is not detected.only
when i use this wrapper i see the device listed on giving devs.

a)-> pBlkDevRoot = virtualDiskCreate("/myworkspace/virtual_disk_root",
512, 42991616/512, 42991616/512);

b)->xbdBlkDevCreate(pBlkDevRoot, "/vroot");
value = 1 = 0x1
-> Instantiating /vroot:0 as rawFs, device = 0x10001

c)dosfsDiskFormat("/vroot");
Formatting /vroot:0 for DOSFS
Instantiating /vroot:0 as rawFs, device = 0x10001
Formatting...Retrieved old volume params with %38 confidence:
Volume Parameters: FAT type: FAT32, sectors per cluster 0
0 FAT copies, 0 clusters, 0 sectors per FAT
Sectors reserved 0, hidden 0, FAT sectors 0
Root dir entries 0, sysId (null) , serial number 56fb0000
Label:" " ...
Disk with 83968 sectors of 512 bytes will be formatted with:
Volume Parameters: FAT type: FAT32, sectors per cluster 8
2 FAT copies, 536870891 clusters, 82 sectors per FAT
Sectors reserved 1, hidden 83968, FAT sectors 164
Root dir entries 0, sysId VXDOS16 , serial number 56fb0000
Label:" " ...
dosFsVolFormat: bad format parameters, errno = 0x16
Failed.
value = -1 = 0xffffffff
->
-> printErrno 0x16
errno = 0x16 : S_errno_EINVAL.
value = 0 = 0x0


d) I tried using -dofFsDevCreate() before formatting but it returns
unknown volume format error

dosFsDevCreate("/",xbd_root,10,0x00000002 | 0x00000100 | 0x00000200 )
0x6a6c4c58 (tShell0): dosFsLib.c : Malformed boot sector. Offset 0,
value 0.
0x6a6c4c58 (tShell0): dosFsLib.c : error when mounting volume
0x6a6c4f30
0x6a6c4c58 (tShell0): dosFsLib.c : Failed to create a dosFs volume
value = -1 = 0xffffffff
->
-> errno
errno = 0x680ddc70: value = 3670044 = 0x38001c

any idea what is the problem here? any input would be of greta help..

On Apr 25, 7:35 pm, peter.mit...@xxxxxxxxx wrote:
It has been a while since I have worked with VxWorks, but I see
several things.

#1.
The preferred way to format a DosFS device in VxWorks 6.2 and later is
to use ...

dosfsDiskFormat "<device name>"
   See target/src/util/usrFsLib.c, as I may be slightly off in the
name.  If I remember correctly it does allow various options to be
passed.

Example:
   dosfsDiskFormat "/ata0a"
   dosfsDiskFormat "/vDisk"

#2.
The name of your device is "/".  Try giving it another name such as "/
vDisk".  VxWorks does not really support a root directory "/".  It can
fake it out for POSIX compliance (I can't remember the name of the
component to include for that) but under that circumstance, its "root
directory" is strictly read only.

#3.
The virtual disk module is already set up to use XBDs.  You shouldn't
need to explicitly use an XBD wrapper with them (that wrapper is
already built into it).

After creating your virtual disk using virtualDiskCreate( ... ), run
"devs" from the target shell.  You should see your virtual disk device
in the device listing.

To format it for DosFS, use dosfsDiskFormat().

Sparky.

Akshatha wrote:
Hi,
I am trying to format my xbd device in vxworks 6.3.LEt me explain the
procedure i follow befor that:

1) First i create a virtual device using pBlkDevRoot =
virtualDiskCreate();

2)Since we can use dosFsDevInit()to initialise DOS filesystem in 6.3 i
use a XBD wrapper utility which converts BLK_DEV device to XBD type
and by default instantiates rawFS on it.

xbdBlkDevCreate(pBlkDevRoot, "/");
value = 1 = 0x1
or

xbdBlkDevCreateSync(pBlkDevRoot,"/");
Instantiating / as rawFs,  device = 0x20001

value = 65537 = 0x10001

3) then try to format using
dosFsVolFormat("/", 0, 0);
Formatting / for DOSFS
Format failed
value = -1 = 0xffffffff.

some more details:
Formatting / for DOSFS
Instantiating / as rawFs, device = 0x10001
Formatting...Retrieved old volume params with %38 confidence:
Volume Parameters: FAT type: FAT32, sectors per cluster 0
  0 FAT copies, 0 clusters, 0 sectors per FAT
  Sectors reserved 0, hidden 0, FAT sectors 0
  Root dir entries 0, sysId (null)  , serial number 71d20000
  Label:"           " ...
Disk with 83968 sectors of 512 bytes will be formatted with:
Volume Parameters: FAT type: FAT32, sectors per cluster 8
  2 FAT copies, 536870891 clusters, 82 sectors per FAT
  Sectors reserved 1, hidden 83968, FAT sectors 164
  Root dir entries 0, sysId VXDOS16 , serial number 71d20000
  Label:"           " ...
dosFsVolFormat: bad format parameters, errno = 0x16
Failed.
value = -1 = 0xffffffff

what is the cause for this error? how do i debug this issue or am i
missing something before formatting my virtual disk?
Any sugesstion or pointers would be of great help..

.



Relevant Pages