• Lucid Dreaming - Dream Views




    Results 1 to 9 of 9

    Hybrid View

    1. #1
      Member Achievements:
      1 year registered Veteran First Class 5000 Hall Points

      Join Date
      Sep 2004
      Gender
      Location
      Seattle, WA
      Posts
      2,503
      Likes
      217

      Partition resizing and Ubuntu

      Hey all, it's been a while!

      I have a question re: resizing partitions. I've only got less than 800MB free on my root partition. The new Ubuntu release is just around the corner, and I'm worried about running out of space during the update. Just want to run something by some of the local techies to make sure I'm doing things the right way.

      1) I want to take a GB or two off of my /home partition and put it on my / partition so there's room for the update to take place and my Ubuntu to grow, which I am sure it will. I heard that you can't always do that, and that if you want to, things have to be setup in a very specific way (partitions have to exist in same logical volume or somesuch). here is some useful info (not sure if this is enough to be able to tell):

      Code:
      $ df -h
      Filesystem            Size  Used Avail Use% Mounted on
      /dev/sda1             5.6G  4.5G  795M  86% /
      varrun                2.0G  128K  2.0G   1% /var/run
      varlock               2.0G     0  2.0G   0% /var/lock
      udev                  2.0G   52K  2.0G   1% /dev
      devshm                2.0G   12K  2.0G   1% /dev/shm
      lrm                   2.0G   44M  1.9G   3% /lib/modules/2.6.24-19-generic/volatile
      /dev/sda3             171G   86G   77G  53% /home
      
      
      $ sudo fdisk -l /dev/sda
      
      Disk /dev/sda: 200.0 GB, 200049647616 bytes
      255 heads, 63 sectors/track, 24321 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
      Disk identifier: 0x000e4c2b
      
         Device Boot      Start         End      Blocks   Id  System
      /dev/sda1   *           1         730     5859375   83  Linux
      Partition 1 does not end on cylinder boundary.
      /dev/sda2             730        1692     7725585+  83  Linux
      /dev/sda3            1692       24322   181776023   83  Linux
      This is the default setup that my System76 laptop came with.

      2) I am not dual-booting or anything like that. Pure Ubuntu. I keep reading online that if you're resizing a windows partition, you absolutely must defrag it before. Is that true of ext3 as well, or am I safe just going for it? Also, I am finding online that there is no real way to defrag ext3 filesystems (short of temporarily converting to ext2). I imagine it's sophisticated enough to make fragmentation a mostly negligible issue.


      3) I burned a copy of PartedMagic to a boot CD, have booted with it, and ran gparted. It definitely lets me queue up the operations I am trying to perform (reduce my /home by 2GB, move the swap partition to the right, and increase my root partition to fill that bubble), but I haven't yet applied those changes. This is looking like good news, but who knows, maybe it'll complain about it. Or maybe it'll delete everything in the process hehe. Here's what I'm wanting to get it to do:

      Code:
      Current configuration: [  /  5.5GB   ][ swap 7.0GB ][         /home     170GB      ]
      New configuration:     [    /  7.5GB     ][ swap 7.0GB ][       /home     168GB    ]
      Erm... anyway, am I doing everything right here? I've backed everything up to an external HD, so I guess no biggie. Anything else I have to be aware of when performing this feat?

      thanks!

    2. #2
      Banned
      Join Date
      Apr 2007
      Location
      Out Chasing Rabbits
      Posts
      15,193
      Likes
      935
      I don't think Linux lets it's disk get fragmented. I think they use the same on-the-fly defragmentation that OSX does.

      The reason that you should defragment before changing windows stuff around is because Windows defragmenter compacts everything to one end of the disk, this means what you are resizing is empty and it doesn't have to move anything. You don't have to do it, a good repartitioner should copy the files that it needs to, it just makes it faster.

      I'm not sure how you backed up everything on your external, but I would make sure that you back up the files, not the file system. ie, just those files you need, don't make an image of the whole disk, that could cause problems.

    3. #3
      Member Achievements:
      1 year registered Veteran First Class 5000 Hall Points

      Join Date
      Sep 2004
      Gender
      Location
      Seattle, WA
      Posts
      2,503
      Likes
      217
      Yup I just copied my home directory to the external HD, and backed up some key files from the root that I care about (sources.list, etc.) so no worries there

    4. #4
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      boot into a liveCD
      ensure that neither your root or home partitions are mounted
      fire up gparted (or qtparted, depending on desktop environment)
      resize to suit

      always a good idea to backup your system before hand

      *edit*
      to answer a few of the other queries

      Quote Originally Posted by Replicon View Post
      I keep reading online that if you're resizing a windows partition, you absolutely must defrag it before. Is that true of ext3 as well, or am I safe just going for it? Also, I am finding online that there is no real way to defrag ext3 filesystems (short of temporarily converting to ext2). I imagine it's sophisticated enough to make fragmentation a mostly negligible issue.
      There is actually no way of defragging an ext3 partition
      you just can't do it

      under normal use, ext3 does not fragment
      ext3 does start fragmenting under special use cases
      - after you exceed ~95% disk usage (but at this stage, a little fragmentation is the least of your worries - you have no space left)
      - if you're writing large files (greater than 4Gb) that change constantly in size
      (Eg. a time-shifting media centre, or a very high traffic database with lots of inserts)

      Don't convert ext3 to ext2
      you will lose a lot of meta-data attached to files
      converting to ext2 should only be done when recovering data from a damaged disk
      Last edited by Ynot; 09-28-2008 at 05:32 AM.
      (\_ _/)
      (='.'=)
      (")_(")

    5. #5
      FBI agent Ynot's Avatar
      Join Date
      Oct 2005
      Gender
      Location
      Southend, Essex
      Posts
      4,337
      Likes
      14
      nice little explanation of fragmentation
      http://geekblog.oneandoneis2.org/ind..._defragmenting
      (\_ _/)
      (='.'=)
      (")_(")

    6. #6
      Member Achievements:
      1 year registered Veteran First Class 5000 Hall Points

      Join Date
      Sep 2004
      Gender
      Location
      Seattle, WA
      Posts
      2,503
      Likes
      217
      sweeet. I'll try it first thing in the morning!

    Bookmarks

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •