Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Feb 2022 15:13:04 +0100 (CET)
From:      Ronald Klop <ronald-lists@klop.ws>
To:        Pete French <pete@twisted.org.uk>
Cc:        stable@freebsd.org, Chuck Tuffli <ctuffli@gmail.com>
Subject:   Re: Instance drives in AWS comming up with the wrong size
Message-ID:  <911165478.11.1645798384085@mailrelay>
In-Reply-To: <c31d551b-5494-bf9f-cca4-af560a9a7bc0@twisted.org.uk>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_10_656879731.1645798383998
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Wow,

diskinfo.c has explicit support for regular files:

                isreg = S_ISREG(sb.st_mode);
                if (isreg) {
                        mediasize = sb.st_size;
                        sectorsize = S_BLKSIZE;
                        fwsectors = 0;
                        fwheads = 0;

But I would not know the proper use case for that related to the name of the tool.

Anyways, nice catch. Computers are weird.

Cheers,
Ronald.

 
Van: Pete French <pete@twisted.org.uk>
Datum: vrijdag, 25 februari 2022 11:30
Aan: Chuck Tuffli <ctuffli@gmail.com>
CC: stable@freebsd.org
Onderwerp: Re: Instance drives in AWS comming up with the wrong size
> 
> Ok, I found what was causing this, there is no bug, and I am somewhat embarassed.
> 
> Somehow I ended up with a file called 'nda2' in /root
> 
> So doing 'diskinfo' in /root finds the file not the device. Simple as that.
> 
> sorry for the noise!
> 
> -pete.
>  
> 
> 
> 
------=_Part_10_656879731.1645798383998
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<html><head></head><body>Wow,<br />
<br />
diskinfo.c has explicit support for regular files:<br />
<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isreg = S_ISREG(sb.st_mode);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (isreg) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mediasize = sb.st_size;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sectorsize = S_BLKSIZE;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fwsectors = 0;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fwheads = 0;<br />
<br />
But I would not know the proper use case for that related to the name of the tool.<br />
<br />
Anyways, nice catch. Computers are weird.<br />
<br />
Cheers,<br />
Ronald.<br />
<br />
&nbsp;
<p><strong>Van:</strong> Pete French &lt;pete@twisted.org.uk&gt;<br />
<strong>Datum:</strong> vrijdag, 25 februari 2022 11:30<br />
<strong>Aan:</strong> Chuck Tuffli &lt;ctuffli@gmail.com&gt;<br />
<strong>CC:</strong> stable@freebsd.org<br />
<strong>Onderwerp:</strong> Re: Instance drives in AWS comming up with the wrong size</p>

<blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: #000000 2px solid; margin-right: 0px">
<div class="MessageRFC822Viewer" id="P">
<div class="TextPlainViewer" id="P.P">Ok, I found what was causing this, there is no bug, and I am somewhat embarassed.<br />
<br />
Somehow I ended up with a file called 'nda2' in /root<br />
<br />
So doing 'diskinfo' in /root finds the file not the device. Simple as that.<br />
<br />
sorry for the noise!<br />
<br />
-pete.<br />
&nbsp;</div>

<hr /></div>
</blockquote></body></html>
------=_Part_10_656879731.1645798383998--



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