Loading ...
Sorry, an error occurred while loading the content.

Disk resize

Expand Messages
  • JMVDWYM
    I ve decided the days of playing with my Slug are over and that it s time for the little guy to earn his keep so I ve upgraded the 5G 2.5 (dual USB powered)
    Message 1 of 4 , Jun 1, 2007
    • 0 Attachment
      I've decided the days of "playing" with my Slug are over and that
      it's time for the little guy to earn his keep so I've upgraded the
      5G 2.5" (dual USB powered) to a 120G 2.5" (single USB powered).

      I gparted the new drive to remove all partitions then used dd
      if=/dev/sdb of=/dev/sda to copy the 5G drive over. I did it the
      lazy way (via USB) so that took, like, 7 hours. :-)

      Anyway, I booted my slug on the 120G drive and all was well so I
      took it back to me work machine & again used gparted to move do the
      following:
      - Move "last" 128M partition to end of drive (I think this is the
      swap partition)
      - Move "middle" 128M partition to right in front of the "last"
      - Expand "middle" 128M partition to 256M (I think this is the "os"
      partition)
      - Expand the "first" partition from 4.8G to 110G (or whatever was
      available).

      Everything ran ok (if slowly) and things are now reported as 110G,
      256M, and 128M HOWEVER when I use "df" to check disk space it
      reports:
      /dev/sda1 4598887 4575990 22897 100% /

      I'll save you digging out the calculator, that equates to:
      /dev/sda1 4.39G 4.36G 23M 100% /

      Why do I have 4.36G of data on a 110G partition but only 23M free -
      did I miss a step somewhere?

      Thanks!

      Jon-Mikel

      P.S. I've been playing (and I mean fiddling around with Live CDs and
      such) with Linux for years, but I'm otherwise technically oriented -
      just with a Microsoft bent (for work reasons - I swear!)
    • JMVDWYM
      Sorry - but I forgot to mention that I was trying to get used to using gparted (part of my linux playing ) and that s why I did NOT use the process suggested
      Message 2 of 4 , Jun 1, 2007
      • 0 Attachment
        Sorry - but I forgot to mention that I was trying to get used to using
        gparted (part of my linux "playing") and that's why I did NOT use the
        process suggested in:
        http://tech.groups.yahoo.com/group/nslu2-linux/message/7893

        I asked the question above so that a) I can figure out where I went
        wrong and b) hopefuly not spend another 12 hours copying stuff around
        using the fsck and resize2fs process.

        Thanks again.

        Jon-Mikel
      • Phil Endecott
        ... Normally you have to both (1) resize the partition and (2) resize the filesystem to fill the partition. It s possible that gparted is supposed to do both
        Message 3 of 4 , Jun 2, 2007
        • 0 Attachment
          > - Move "middle" 128M partition to right in front of the "last"
          > - Expand "middle" 128M partition to 256M (I think this is the "os"
          > partition)
          > - Expand the "first" partition from 4.8G to 110G (or whatever was
          > available).

          > Why do I have 4.36G of data on a 110G partition but only 23M free -
          > did I miss a step somewhere?

          Normally you have to both (1) resize the partition and (2) resize the
          filesystem to fill the partition. It's possible that gparted is
          supposed to do both steps simultaneously for you, but what you're
          seeing is consistent with it not having resized the filesystem.

          (BTW, it also looks as if you've put the swap at the opposite end of
          the disk from the data with an empty gap in between. Disks take a long
          time to seek from one end of the disk to the other!)


          Phil.
        • JMVDWYM
          Phil, Thanks for the reply. So it looks like I need to run resize2fs - I think. I assume I shouldn t do this while my drive is active & on my Slug - which
          Message 4 of 4 , Jun 4, 2007
          • 0 Attachment
            Phil,

            Thanks for the reply. So it looks like I need to run resize2fs - I
            think. I assume I shouldn't do this while my drive is "active" & on
            my Slug - which is good 'cause my slug doesn't seem to have
            resize2fs on it. :-)

            I'm actually a bit confused about the partition stuff. I didn't
            knowingly do anything other than my initial unslung to a 512 USB
            drive, then a move to 5G 2.5" drive (I don't recall what I used at
            the time), and now the move to the 120G.

            I always assumed one partition was for config/"OS", one for swap,
            and one for data. But it looks to me like I've got one for
            data/"OS", and one for config - with NOTHING for swap.


            What's the recommended setup for the NSLU2 (or even generic linux).
            Swap partition first? How big makes sense for a slug? Is it OK for
            everything non-swap to be on one partition? I don't really see the
            point of having a separate partition for a swap file if it's still
            on the same physical disk - how does it help?

            Looking forward to getting all my facts straight BEFORE jumping in
            again. :-)

            Thanks again for previous reply, and for any future ones!

            Jon-Mikel
          Your message has been successfully submitted and would be delivered to recipients shortly.