Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Feb 2022 16:28:29 +0000
From:      Jamie Landeg-Jones <jamie@catflap.org>
To:        ronald-lists@klop.ws, pete@twisted.org.uk
Cc:        stable@FreeBSD.org, ctuffli@gmail.com
Subject:   Re: Instance drives in AWS comming up with the wrong size
Message-ID:  <202202251628.21PGSTfW055152@donotpassgo.dyslexicfish.net>
In-Reply-To: <911165478.11.1645798384085@mailrelay>
References:  <b6fae531-edaf-d7c1-f6be-32c966fd711c@twisted.org.uk> <CANCZdfrye3mBj5Ej=vjoUUtKx%2BqNX%2BXBXq15j6B0FCnZDZw54Q@mail.gmail.com> <82956746-91aa-4744-c12f-40c5ff7c3f39@twisted.org.uk> <CAKAYmML2=j84Vq__Zn4qJaqFkgNVGAaCPk9qa=hvYX13kFSnjw@mail.gmail.com> <c31d551b-5494-bf9f-cca4-af560a9a7bc0@twisted.org.uk> <911165478.11.1645798384085@mailrelay>

next in thread | previous in thread | raw e-mail | index | archive | help
Ronald Klop <ronald-lists@klop.ws> wrote:

> Wow,
>
> diskinfo.c has explicit support for regular files:
>
> But I would not know the proper use case for that related to the name of the tool.

I guess reading an imagefile, without needed to make an md device of it
first, I guess....  But hardly a "must have", in my opinion.

Howerver, what's even worse is that it first looks for <device-file> in
the current directory, and if that fails, it then tries /dev/<device-file>

And to compound that, the screen output doesn't show whether it's matching
./<device-file> or /dev/<device-file> leading easily to the confusion Pete
encountered.

I think it should either treat the provided <device-file> as an unaltered
filepath (i.e. "xxx" refers to file "./xxx", "/dev/xxx" refers to file
"/dev/xxx" etc.) OR have it anchored to /dev unless a path is specified
(i.e. "xxx" refers to "/dev/xxx", "./xxx" refers to "./xxx", "/tmp/xxx"
refers to "/tmp/xxx" etc.) but the current ambiguous method is the worst
of both worlds.

Still, at the very least, the file being accessed should be unambiguously
displayed in the output.

 | jamie@thompson% pwd
 | /tmp
 |
 | jamie@thompson%  dd if=/dev/ada0 bs=1m count=10 of=ada1
 | 10+0 records in
 | 10+0 records out
 | 10485760 bytes transferred in 0.036465 secs (287554872 bytes/sec)
 |
 | jamie@thompson% diskinfo ada1
 | ada1    512     10485760        20480   4096    0
 |
 | jamie@thompson% rm ada1
 |
 | jamie@thompson% diskinfo ada1
 | ada1    512     1050214588416   2051200368      0       0       2034921 16      63

NASTY!

Cheers, Jamie



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202251628.21PGSTfW055152>