Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - QNX6FS in file: (6 Items)
   
QNX6FS in file  
Hello,

I have created "holder" for filesystem in file with:
dd if=/dev/zero of=/file.dat count=10000
mkqnx6fs /file.dat
mount -tqnx6 /file.dat /qq

So far, do good. I can work with file system as required.

Afterwards I umount /qq, move /file.dat to a "FAT16" filesystem and try to remount it:
umount /qq
mv /file.dat /dev/dos/file.dat
mount -tqnx6 /dev/dos/file.dat /qq
And it fails with "Block device required"
If I try to mount it read only, it works.

Are there any options to make it work read/write also on FAT filesystem?

devb-eide is started with qnx6 sync=optional, but the behaviour is the same, even when I start devb-eide with qnx6 sync=
ignore

Thanks, PKY
Re: QNX6FS in file  
Pavol Kycina wrote:
> Hello,
> 
> I have created "holder" for filesystem in file with:
> dd if=/dev/zero of=/file.dat count=10000
> mkqnx6fs /file.dat
> mount -tqnx6 /file.dat /qq
> 
> So far, do good. I can work with file system as required.
> 
> Afterwards I umount /qq, move /file.dat to a "FAT16" filesystem and try to remount it:
> umount /qq
> mv /file.dat /dev/dos/file.dat
> mount -tqnx6 /dev/dos/file.dat /qq
> And it fails with "Block device required"
> If I try to mount it read only, it works.
> 
> Are there any options to make it work read/write also on FAT filesystem?

ENODEV indicates a mismatch in sector size would violate the ability of
the fsys to perform atomic/powersafe updates, thus it allows read-only.
Your mkqnx6fs will have made 1k blocks, your FAT is likely 4k clusters
(or some number >1k).  Thus it is not possible to write to a single
block of the fsys when hosted on an image that way without also writing
to other fsq6 blocks residing within the same FAT host block, which
violates the fsq6 "no-overwrite live data" principle.

The host sector size must be less than or equal to the fsys block size;
it is allowed to have to write multiple blocks to make up one fsys
write, but invalid to have one host write touch multiple fsys blocks.

Do a "df -g" of your FAT and see what cluster size it used, and if 2k/4k
then you can reformat the fsq6 (mkqnx6fs -bXX) to match and then it will
mount r/w.  Otherwise is >4k then this is not possible to do (without
reformating your FAT 'mkdosfs -cXX'; note that generally FAT32 is 4k
clusters, which would work).
Re: QNX6FS in file  
Thanks a lot.

It works now!

PKY

> Pavol Kycina wrote:
> > Hello,
> > 
> > I have created "holder" for filesystem in file with:
> > dd if=/dev/zero of=/file.dat count=10000
> > mkqnx6fs /file.dat
> > mount -tqnx6 /file.dat /qq
> > 
> > So far, do good. I can work with file system as required.
> > 
> > Afterwards I umount /qq, move /file.dat to a "FAT16" filesystem and try to 
> remount it:
> > umount /qq
> > mv /file.dat /dev/dos/file.dat
> > mount -tqnx6 /dev/dos/file.dat /qq
> > And it fails with "Block device required"
> > If I try to mount it read only, it works.
> > 
> > Are there any options to make it work read/write also on FAT filesystem?
> 
> ENODEV indicates a mismatch in sector size would violate the ability of
> the fsys to perform atomic/powersafe updates, thus it allows read-only.
> Your mkqnx6fs will have made 1k blocks, your FAT is likely 4k clusters
> (or some number >1k).  Thus it is not possible to write to a single
> block of the fsys when hosted on an image that way without also writing
> to other fsq6 blocks residing within the same FAT host block, which
> violates the fsq6 "no-overwrite live data" principle.
> 
> The host sector size must be less than or equal to the fsys block size;
> it is allowed to have to write multiple blocks to make up one fsys
> write, but invalid to have one host write touch multiple fsys blocks.
> 
> Do a "df -g" of your FAT and see what cluster size it used, and if 2k/4k
> then you can reformat the fsq6 (mkqnx6fs -bXX) to match and then it will
> mount r/w.  Otherwise is >4k then this is not possible to do (without
> reformating your FAT 'mkdosfs -cXX'; note that generally FAT32 is 4k
> clusters, which would work).


Re: QNX6FS in file  
Hello again.

Now I have CF which has 8kB blocks. 
Any chance that mkqnx6fs will support blocks larger than 4kB?

Thanks, PKY

> Thanks a lot.
> 
> It works now!
> 
> PKY
> 
> > Pavol Kycina wrote:
> > > Hello,
> > > 
> > > I have created "holder" for filesystem in file with:
> > > dd if=/dev/zero of=/file.dat count=10000
> > > mkqnx6fs /file.dat
> > > mount -tqnx6 /file.dat /qq
> > > 
> > > So far, do good. I can work with file system as required.
> > > 
> > > Afterwards I umount /qq, move /file.dat to a "FAT16" filesystem and try to
>  
> > remount it:
> > > umount /qq
> > > mv /file.dat /dev/dos/file.dat
> > > mount -tqnx6 /dev/dos/file.dat /qq
> > > And it fails with "Block device required"
> > > If I try to mount it read only, it works.
> > > 
> > > Are there any options to make it work read/write also on FAT filesystem?
> > 
> > ENODEV indicates a mismatch in sector size would violate the ability of
> > the fsys to perform atomic/powersafe updates, thus it allows read-only.
> > Your mkqnx6fs will have made 1k blocks, your FAT is likely 4k clusters
> > (or some number >1k).  Thus it is not possible to write to a single
> > block of the fsys when hosted on an image that way without also writing
> > to other fsq6 blocks residing within the same FAT host block, which
> > violates the fsq6 "no-overwrite live data" principle.
> > 
> > The host sector size must be less than or equal to the fsys block size;
> > it is allowed to have to write multiple blocks to make up one fsys
> > write, but invalid to have one host write touch multiple fsys blocks.
> > 
> > Do a "df -g" of your FAT and see what cluster size it used, and if 2k/4k
> > then you can reformat the fsq6 (mkqnx6fs -bXX) to match and then it will
> > mount r/w.  Otherwise is >4k then this is not possible to do (without
> > reformating your FAT 'mkdosfs -cXX'; note that generally FAT32 is 4k
> > clusters, which would work).
> 
> 


RE: QNX6FS in file  
Pavol,

Not at the moment.  4k is the maximum block size for fsqnx6.  Are you
able to re-format the FAT filesystem to use 4k clusters?

David 

> -----Original Message-----
> From: Pavol Kycina [mailto:community-noreply@qnx.com] 
> Sent: August 21, 2009 7:12 AM
> To: general-filesystems
> Subject: Re: QNX6FS in file
> 
> Hello again.
> 
> Now I have CF which has 8kB blocks. 
> Any chance that mkqnx6fs will support blocks larger than 4kB?
> 
> Thanks, PKY
> 
> > Thanks a lot.
> > 
> > It works now!
> > 
> > PKY
> > 
> > > Pavol Kycina wrote:
> > > > Hello,
> > > > 
> > > > I have created "holder" for filesystem in file with:
> > > > dd if=/dev/zero of=/file.dat count=10000 mkqnx6fs 
> /file.dat mount 
> > > > -tqnx6 /file.dat /qq
> > > > 
> > > > So far, do good. I can work with file system as required.
> > > > 
> > > > Afterwards I umount /qq, move /file.dat to a "FAT16" filesystem 
> > > > and try to
> >  
> > > remount it:
> > > > umount /qq
> > > > mv /file.dat /dev/dos/file.dat
> > > > mount -tqnx6 /dev/dos/file.dat /qq And it fails with 
> "Block device 
> > > > required"
> > > > If I try to mount it read only, it works.
> > > > 
> > > > Are there any options to make it work read/write also 
> on FAT filesystem?
> > > 
> > > ENODEV indicates a mismatch in sector size would violate 
> the ability 
> > > of the fsys to perform atomic/powersafe updates, thus it 
> allows read-only.
> > > Your mkqnx6fs will have made 1k blocks, your FAT is likely 4k 
> > > clusters (or some number >1k).  Thus it is not possible 
> to write to 
> > > a single block of the fsys when hosted on an image that 
> way without 
> > > also writing to other fsq6 blocks residing within the 
> same FAT host 
> > > block, which violates the fsq6 "no-overwrite live data" principle.
> > > 
> > > The host sector size must be less than or equal to the fsys block 
> > > size; it is allowed to have to write multiple blocks to 
> make up one 
> > > fsys write, but invalid to have one host write touch 
> multiple fsys blocks.
> > > 
> > > Do a "df -g" of your FAT and see what cluster size it 
> used, and if 
> > > 2k/4k then you can reformat the fsq6 (mkqnx6fs -bXX) to match and 
> > > then it will mount r/w.  Otherwise is >4k then this is 
> not possible 
> > > to do (without reformating your FAT 'mkdosfs -cXX'; note that 
> > > generally FAT32 is 4k clusters, which would work).
> > 
> > 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post36406
> 
> 
Re: RE: QNX6FS in file  
> Pavol,
> 
> Not at the moment.  4k is the maximum block size for fsqnx6.  Are you
> able to re-format the FAT filesystem to use 4k clusters?
> 
> David 

[snip]

Not without changing the way we treat CF card. We should use 512MB ones, with FAT16 it means 8k clusters. 

Either we change the system to FAT32, that would mean making new custom loader (the present one is bound to FAT16. Or we
 introduce partition table to CF (now we treat it as a very large floppy) and that would mean changes in custom CF 
formatter.

FAT32 option seems more reasonable now, but it's Friday late evening ;-)

Regards, PKY