Subject: Re: CVS commit: src/sbin/newfs
To: David Laight <david@l8s.co.uk>
From: Greg 'groggy' Lehey <grog@NetBSD.org>
List: source-changes
Date: 10/10/2003 18:27:08
--iRjOs3ViPWHdlw/I
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Friday, 10 October 2003 at 9:45:37 +0100, David Laight wrote:
>>> The -V flag tells newfs not to make assumptions about the device nam=
e.
>>>
>>> i think the best thing would be to teach newfs to just try the name
>>> as-is first (perhaps the -F flag already does what you need, but i
>>> think it would be better for this to "just work.")
>>
>> Hmm, yes, this might be a good alternative. I don't like having to
>> specify the size; possibly I can fix that, though. I'll take a look.
>
> Maybe an ioctl that returns the disklabel info for the opened
> partition?
Like DIOCGDINFO? Yes, Vinum implements that, but it's a kludge.
> newfs could use that instead of getting the volumes disklabel.
Well, I think it needs the volume's disk label, not the partition's
disk label. The problem is that the concept of a disk label is
meaningless for a Vinum volume.
> OTOH what does vimun report if asked for a disklabel?
=46rom the man page:
In general, disklabel(8) serves no useful purpose on a vinum volume. =
If
you run it, it will show you three partitions, a, b and c, all the same
except for the fstype, for example:
3 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 2048 0 4.2BSD 1024 8192 0 # (Cyl. 0 -=
0)
b: 2048 0 swap # (Cyl. 0 -=
0)
c: 2048 0 unused 0 0 # (Cyl. 0 -=
0)
vinum ignores the DIOCWDINFO and DIOCSDINFO ioctls, since there is not=
h-
ing to change. As a result, any attempt to modify the disk label will=
be
silently ignored.
> Maybe all its names should end in 'a'?
Heh. That's a workaround at the best.
I think an improvement on the -F flag might be the way to go. It
appears to want to do the same thing, and the only issue is that it
wants a size specification, which I think would normally not be
necessary.
Greg
--
See complete headers for address and phone numbers.
--iRjOs3ViPWHdlw/I
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (FreeBSD)
iD8DBQE/hnRkIubykFB6QiMRAurMAJ0Z4eV7Vf6bsqKrp5HERt1lX6RTNQCfXA74
1QxcvQp8KsVWvXG6AKJ+1Aw=
=+7+l
-----END PGP SIGNATURE-----
--iRjOs3ViPWHdlw/I--