I am working on a project that requires me to be able to seek to any part of a drive, then read/write. I am using sysseek, syswrite, and sysread. I have not gotten far enough to test on an actual drive and am using 1gb disk image files. It occurs to me however that the sysseek probably keeps track of it's position on the file/device as an integer, and I know that using an integer you can only address so many bytes before it overflows. I could potentially be using this on files/devices larger than 2tb. Do I need to be worried? or is the position stored in such a way that it does not matter?

Before I say why I need this I will say I know a lot of people will have opinions on weather or not they think this project is worth doing, and weather it is worth doing in perl, let me just say I am doing this, and I am doing it in perl, I respect your opinions, however I am not asking for them. I simply have a question that I need answered, the following information is so that you know the context of the question. I am sorry if this seems rude.

I am writing a distributed database driven filesystem, but it also has a local disk filesystem components. I need to use perl to directly access any given portion of a disk at any given time, I am wondering if the sysseek function is able to seek far enough.

will this work:
I figure I am probably gonna have to seek multiple times of a given quantity before reaching the desired byte. I know that if I need to address a byte that is more than an integer's maximum value away from the current position I may need to seek a couple times to reach it passing an argument less than the maximum integer value each time.

In reply to can I seek properly on a huge device (/dev/sdaX) by exodist

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.