Re: newbie question

From: Andrew Valencia <vandys_at_nospam.org>
Date: Mon May 02 1994 - 09:40:44 PDT

[laden@math.tau.ac.il writes:]

> i used mkfs_vfs to create a file to 'contain' the filesystem.
> i uncommented the fstab entry for vfs (it reads: "fs/vfs /v")
> i changed the inittab entry to "bg:/vsta/boot/vstafs /testfs fs/vfs"

mkfs_vfs -p ...

Should pre-allocate (i.e., write each block with zeroes) data. It doesn't
appear to be working. :-(

>and i get a login prompt, but when i try and login,
>i get '/vsta/bin/rc invalid' and i'm back with the login prompt.

And this is a bug in libc/open.c. He's being fooled into thinking that
/vsta/... matches the /v... mount entry instead of the /vsta/... file within
the root (/...) filesystem.

Workaround: mount your filesystem as /x instead.

>what (probably obvious) error am i making?

No error, except that you're probably the second person in the world to play
with the vstafs. :-)

>btw: i'd like to be able to mount a filesystem while logged on,
>but can find any mount command in /bin. do i need to write a
>simple mount() wrapper?

Since mount tables are an illusion maintained per-process in the C library,
mount must be a built-in of the shell. The testsh and rc shells have the
built-in, but one has not yet been added for ash.

>also, the file mkfs_vfs created is 1536 bytes long, does it grow
>dynamically (i specified 2000 sectors)?

No, if you're running on top of a file (instead of a device) you need to use
the -p. Now, it would appear, you first have to FIX it! It *would*
pre-allocate it, except that it'll first try to read a block up there, and
the read will fail, which looks like an I/O error to the filesystem, so he
bombs out.

Filesystem philosophy digression: no, filesystems should not (IMHO) try to
keep going in the face of data corruption. In my experience with 4.2 and S5
filesystems, this just makes things worse. If you want to survive I/O
errors, run on top of a mirrored volume. End digression.

>disclaimer: i am very new to vsta, and in fact have no experience with
>OS's at this low level...

Well, finding two bugs in your first pass is pretty good! I think I have a
fix for the open() bug, but if you'd like to fix the -p one for mkfs_vfs
(which is in srv/vstafs/cmd/mkfs.c) and pass me the patch, I'd be happy to
add it.

                                                        Regards,
                                                        Andy
Received on Mon May 2 09:55:35 1994

This archive was generated by hypermail 2.1.8 : Wed Sep 21 2005 - 21:02:17 PDT