Man page for mount_vnd states:
"
The `c' partition of a vnd image should not be used.  When a superblock
     becomes damaged, fsck_ffs(8) needs information contained in the disklabel
     to determine the location of alternate superblocks.  This information is
     not available when directly using the `c' partition, so checking the file
     system image will fail.
"

Also, the man page for newfs states:
"
Before running newfs or mount_mfs, the disk must be labeled using
     disklabel(8).  newfs builds a file system on the specified special de-
     vice, basing its defaults on the information in the disk label.
"

But... the man 5 disklabel states:
"
Note that when a disk has no real BSD disklabel the kernel creates a de-
     fault label so that the disk can be used.
"

And indeed, it would appear (or may be my brain is getting sleepy)
that, running newfs on a device (such as svnd0c or vnd0c) which has no
disklabel installed explicitly does work ok...
... now --  if, as man page for mount_vnd states, fsck_ffs needs
disklabel info when superblock is damaged -- why would it have any
trouble getting the default label that kernel creates for the "disk"
automatically as per man 5 disklabel quote above (the very same info,
I presume that newfs uses when initializing the fs initially on an
image with no explicit label)?

For example, wrt alternate superblock issues during fskc, the man page
for newfs says:
"
     -S sector-size
                 The size of a sector in bytes (almost never anything but
                 512).  Changing this is useful only when using newfs to build
                 a file system whose raw image will eventually be used on a
                 different type of disk than the one on which it is initially
                 created (for example on a write-once disk).  Note that chang-
                 ing this from its default will make it impossible for fsck(8)
                 to find the alternate superblocks if the standard superblock
                 is lost.
"

Now, if the default disklabel (created by kernel, on the fly so to
speak) provides info for the sector size (which is used by newfs
during initializing, and by fsck when checking/restoring/fixing, the
fs) then why would it still be bad to use the "c" partition of
svnd/vnd?

Kind regards
Leon.

Reply via email to