On 7/27/09, Kenneth R Westerback <kwesterb...@rogers.com> wrote:
> On Sun, Jul 26, 2009 at 04:44:45AM +1100, leon zadorin wrote:
>> 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.
>
> 'c' is a special partition that the kernel freely changes as the
> mood hits it. A slight exaggeration.

I'd say. Anywhere does it say this? My understanding was that 'c'
partition depicts the entire device. If this is correct, than it's not
even close to describing it as 'freely changing' it's semantics as per
kernel's mood. Artistic perhaps, but precise... not.

I don't mind not using 'c' partition for any explicit filesystems, but
I don't want to do so on some ritualistic, unsupported-by-explanations
'fear' but rather through explicit understanding as to why, albeit
customised, examples would not work (i.e. kernel-generated default
disklabel and only 1 ffs on disk image as per previous post of mine).

leon.

Reply via email to