From: Bela Lubkin <belal@sco.COM>
Subject: endless discussion about SCO filesystem types
Resent-From: mmdf@xenitec.on.ca
Submit-To: scogen@xenitec.on.ca
Cc: Ti Kan <ti@bazooka.uucp>
Organization: [resent by] The SCOGEN gateway and Propagation Society
Date: Fri, 16 Oct 1992 12:12:22 GMT
Precedence: bulk

Ti Kan wrote:

> My speculation is that they wanted to maintain compatibility between
> AFS and EAFS.  The current implementation allows one to convert from
> an AFS to an EAFS simply by running fsck with the proper option.
> There is even a secret, undocumented option to convert an EAFS back
> to an AFS (provided no long file names or symbolic names were created
> in the filesystem).  I won't tell you what the option is, because it's
> supposed to be undocumented, and you'd barf when you find out the option
> letter anyway.

It shouldn't be undocumented.  Here are all the supported conversions:

   Command        Resulting conversions             Comments
   -----------    ------------------------------    --------------------
   fsck -s -C8    S51K ->   AFS   ES51K ->  EAFS    could be 2, 4, 8, 16
   fsck -s -C0     AFS ->  S51K    EAFS -> ES51K
   fsck -E         AFS ->  EAFS    S51K -> ES51K
   fsck -^P       EAFS ->   AFS   ES51K ->  S51K    (that's control-P)

You can combine reasonable pairs of these.  Here's a little shell script
that does a double round of conversions.  You have to replace
"/dev/does_not_exist" with a TRASHABLE block device.  I use /dev/swap
because my machine has more memory than it could possibly use, and NEVER
swaps.  Don't use /dev/swap unless `/etc/swap -l` shows blocks == free!!
Use a scratch medium like a formatted floppy.  Also note that two
occurances of control-P have been spelled out "^" "P" here; you have to
edit this and replace them with real ^P's.

  :
  DEV=/dev/does_not_exist
  echo '\0\c' | dd bs=64k count=1 conv=sync of=$DEV
  mkfs -f S51K $DEV 1000
  fstyp $DEV                     # S51K
  fsck -E $DEV >/dev/null
  fstyp $DEV                     # ES51K
  fsck -s -C8 $DEV >/dev/null
  fstyp $DEV                     # EAFS
  fsck -^P $DEV >/dev/null
  fstyp $DEV                     # AFS
  fsck -s -C0 $DEV >/dev/null
  fstyp $DEV                     # S51K
  fsck -s -C8 $DEV >/dev/null
  fstyp $DEV                     # AFS
  fsck -E $DEV >/dev/null
  fstyp $DEV                     # EAFS
  fsck -s -C0 $DEV >/dev/null
  fstyp $DEV                     # ES51K
  fsck -^P $DEV >/dev/null
  fstyp $DEV                     # S51K

> Speaking of AFS/EAFS, I have always held the opinion that SCO implemented
> AFS wrong.  The design of the filesystem is fine (thanks to Counterpoint,
> the company that originally developed AFS, later acquired and dismantled
> by Acer), and the exemplary filesystem benchmark results bear this out.
> However, I have problems with the way that grafted the AFS stuff into
> S5.  You see, instead of separate S5 and AFS filesystem types, under SCO
> "S5" and AFS are one and the same.  If you specify "mkfs -f S5 /dev/xxx"
> You will still get an AFS.  This makes it impossible to create, say, a
> real S5 filesystem on a floppy under SCO and mount that floppy on SVR4
> or other System V machines.

  # mkfs -f S5 /dev/swap
  mkfs: there is no mkfs of type S5

Now if you use `mkfs -f S51K`, you'll get what you're looking for.  mkfs
also recognizes AFS and EAFS, and (as you can see above) all three are
distinct filesystem types.  ES51K also exists even though `mkfs` doesn't
understand it (you can nevertheless `mkfs -f S51K /dev/swap 1000 -E`).

>Bela Lubkin<  Support engineer, The Santa Cruz Operation