Subject: Re: dump_lfs issue
To: Konrad Schroder <perseant@hhhh.org>
From: Marcin Michal Jessa <lists@yazzy.org>
List: current-users
Date: 05/01/2007 18:52:33
--Apple-Mail-1-15173979
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed


On May 1, 2007, at 7:37 AM, Konrad Schroder wrote:

> On Tue, 1 May 2007, Juan RP wrote:
>
>> You are not wrong. Do you mean that the offset value reported by
>> scan_ffs, will be off by 16?
>>
>> Or are you talking about the sector number for the superblock?
>
> Oh, no, I expect the number it reports for the beginning of the  
> partition is correct, I have no reason to think otherwise.
>
> For Marcin's problem, however, the beginning of the partition is  
> not the interesting number; afaict he hasn't clobbered his  
> disklabel, only the first superblock.  So he will have to add 16 to  
> the result scan_ffs gives him to find the sector address of the  
> second superblock, the NN he needs to give to "fsck_lfs -b $NN".
>

I ran scan_lfs -v /dev/xbd0i [1] and scan_lfs -vl /dev/xbd0i [2].
Any idea how to figure out the number of super-blocks out of  
following results? :

# scan_lfs -v /dev/xbd0i
Disk: Hosting
Total sectors on disk: 412764160

offset: 3388688 n: 155648 id 42846d4c,0 size: 0
offset: 4142504 n: 233472 id 461ea54f,ffc0a80 size: 0
offset: 10795428 n: 231424 id 44e18250,203b79ec size: 0
offset: 12092628 n: 124928 id 4623b0c7,3728f4d8 size: 0
offset: 6141936 size 15360000
LFSv2 at 6141936 size 61440000, last mounted on
offset: 18374220 n: 317440 id 46274b81,394d76d0 size: 0
offset: 26493444 n: 280576 id 44e18250,203b79ec size: 0
offset: 26721288 n: 20480 id 44e18250,203b79ec size: 0
offset: 28506928 n: 434176 id 433ee3c6,0 size: 0
offset: 38892788 n: 141312 id 44e1823f,21be662f size: 0
offset: 44206272 n: 114688 id 461040c0,30577d00 size: 0
offset: 46213860 n: 395264 id 461133bd,2a07e340 size: 0
offset: 55082444 n: 251904 id 44e1825a,7b2c5943 size: 0
offset: 57434832 n: 385024 id 461bdbfb,32f8d018 size: 17797805967662
scan_lfs: pread: Invalid argument


# scan_lfs -vl /dev/xbd0i
Disk: Hosting
Total sectors on disk: 412764160

#        size    offset fstype [fsize bsize cpg/sgs]
offset: 3388688 n: 155648 id 42846d4c,0 size: 0
offset: 4142504 n: 233472 id 461ea54f,ffc0a80 size: 0
offset: 10795428 n: 231424 id 44e18250,203b79ec size: 0
offset: 12092628 n: 124928 id 4623b0c7,3728f4d8 size: 0
offset: 6141936 size 15360000
X:   61440000   6141936 4.4LFS   2048 16384   29999 #  [LFSv2]
offset: 18374220 n: 317440 id 46274b81,394d76d0 size: 0
offset: 26493444 n: 280576 id 44e18250,203b79ec size: 0
offset: 26721288 n: 20480 id 44e18250,203b79ec size: 0
offset: 28506928 n: 434176 id 433ee3c6,0 size: 0
offset: 38892788 n: 141312 id 44e1823f,21be662f size: 0
offset: 44206272 n: 114688 id 461040c0,30577d00 size: 0
offset: 46213860 n: 395264 id 461133bd,2a07e340 size: 0
offset: 55082444 n: 251904 id 44e1825a,7b2c5943 size: 0
offset: 57434832 n: 385024 id 461bdbfb,32f8d018 size: 17797805967662
scan_lfs: pread: Invalid argument


Marcin Michal Jessa
http://www.wifibsd.org/
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115), 
10);'


--Apple-Mail-1-15173979
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=ISO-8859-1

<HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; =
-khtml-line-break: after-white-space; "><BR><DIV><DIV>On May 1, 2007, at =
7:37 AM, Konrad Schroder wrote:</DIV><BR =
class=3D"Apple-interchange-newline"><BLOCKQUOTE type=3D"cite"><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">On Tue, 1 May 2007, Juan RP wrote:</DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; min-height: 14px; "><BR></DIV> <BLOCKQUOTE =
type=3D"cite"><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">You are not wrong. Do you mean =
that the offset value reported by</DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">scan_ffs, =
will be off by 16?</DIV><DIV style=3D"margin-top: 0px; margin-right: =
0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; =
"><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">Or are you talking about the =
sector number for the superblock?</DIV> </BLOCKQUOTE><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Oh, no, =
I expect the number it reports for the beginning of the partition is =
correct, I have no reason to think otherwise.</DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">For =
Marcin's problem, however, the beginning of the partition is not the =
interesting number; afaict he hasn't clobbered his disklabel, only the =
first superblock.<SPAN class=3D"Apple-converted-space">=A0 </SPAN>So he =
will have to add 16 to the result scan_ffs gives him to find the sector =
address of the second superblock, the NN he needs to give to "fsck_lfs =
-b $NN".</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; "><BR =
class=3D"khtml-block-placeholder"></DIV> </BLOCKQUOTE><BR></DIV><DIV>I =
ran=A0scan_lfs -v /dev/xbd0i [1] and=A0scan_lfs -vl =
/dev/xbd0i=A0[2].=A0</DIV><DIV>Any idea how to figure out the number of =
super-blocks out of=A0following results? :</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>#=A0scan_lfs -v =
/dev/xbd0i=A0</DIV><DIV>Disk: Hosting</DIV><DIV>Total sectors on disk: =
412764160</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>offset: 3388688 n: 155648 =
id 42846d4c,0 size: 0</DIV><DIV>offset: 4142504 n: 233472 id =
461ea54f,ffc0a80 size: 0</DIV><DIV>offset: 10795428 n: 231424 id =
44e18250,203b79ec size: 0</DIV><DIV>offset: 12092628 n: 124928 id =
4623b0c7,3728f4d8 size: 0</DIV><DIV>offset: 6141936 size =
15360000</DIV><DIV>LFSv2 at 6141936 size 61440000, last mounted on =
</DIV><DIV>offset: 18374220 n: 317440 id 46274b81,394d76d0 size: =
0</DIV><DIV>offset: 26493444 n: 280576 id 44e18250,203b79ec size: =
0</DIV><DIV>offset: 26721288 n: 20480 id 44e18250,203b79ec size: =
0</DIV><DIV>offset: 28506928 n: 434176 id 433ee3c6,0 size: =
0</DIV><DIV>offset: 38892788 n: 141312 id 44e1823f,21be662f size: =
0</DIV><DIV>offset: 44206272 n: 114688 id 461040c0,30577d00 size: =
0</DIV><DIV>offset: 46213860 n: 395264 id 461133bd,2a07e340 size: =
0</DIV><DIV>offset: 55082444 n: 251904 id 44e1825a,7b2c5943 size: =
0</DIV><DIV>offset: 57434832 n: 385024 id 461bdbfb,32f8d018 size: =
17797805967662</DIV><DIV>scan_lfs: pread: Invalid argument</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV># scan_lfs -vl =
/dev/xbd0i</DIV><DIV>Disk: Hosting</DIV><DIV>Total sectors on disk: =
412764160</DIV><DIV><BR class=3D"khtml-block-placeholder"></DIV><DIV>#=A0 =
=A0 =A0 =A0 size=A0 =A0 offset fstype [fsize bsize =
cpg/sgs]</DIV><DIV>offset: 3388688 n: 155648 id 42846d4c,0 size: =
0</DIV><DIV>offset: 4142504 n: 233472 id 461ea54f,ffc0a80 size: =
0</DIV><DIV>offset: 10795428 n: 231424 id 44e18250,203b79ec size: =
0</DIV><DIV>offset: 12092628 n: 124928 id 4623b0c7,3728f4d8 size: =
0</DIV><DIV>offset: 6141936 size 15360000</DIV><DIV>X:=A0=A0 61440000=A0=A0=
 6141936 4.4LFS=A0=A0 2048 16384=A0=A0 29999 #=A0 =
[LFSv2]</DIV><DIV>offset: 18374220 n: 317440 id 46274b81,394d76d0 size: =
0</DIV><DIV>offset: 26493444 n: 280576 id 44e18250,203b79ec size: =
0</DIV><DIV>offset: 26721288 n: 20480 id 44e18250,203b79ec size: =
0</DIV><DIV>offset: 28506928 n: 434176 id 433ee3c6,0 size: =
0</DIV><DIV>offset: 38892788 n: 141312 id 44e1823f,21be662f size: =
0</DIV><DIV>offset: 44206272 n: 114688 id 461040c0,30577d00 size: =
0</DIV><DIV>offset: 46213860 n: 395264 id 461133bd,2a07e340 size: =
0</DIV><DIV>offset: 55082444 n: 251904 id 44e1825a,7b2c5943 size: =
0</DIV><DIV>offset: 57434832 n: 385024 id 461bdbfb,32f8d018 size: =
17797805967662</DIV><DIV>scan_lfs: pread: Invalid argument</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><BR><DIV> <SPAN =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "><SPAN =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "><SPAN =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant: normal; font-weight: =
normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Marcin Michal =
Jessa</DIV><DIV><A =
href=3D"http://www.wifibsd.org">http://www.wifibsd.org</A>/</DIV>perl -e =
'print $i=3Dpack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'<BR =
class=3D"Apple-interchange-newline"></SPAN></SPAN></SPAN> =
</DIV><BR></BODY></HTML>=

--Apple-Mail-1-15173979--