Announcement

Collapse
No announcement yet.

[SOLVED] Resize home partition question (or move root)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Resize home partition question (or move root)

    Hello everyone!

    When I installed kubuntu in this machine (9.04 I think it was) I made a partition table leaving some empty space to use for another distro in the future. I never did that so I am planning now to increase my /home partition to take advantage of the unallocated disk space. Thing is that the way I partitioned the disk is not exactly the best choice. Please take a look at my Ksnapshot attached.

    I believe the way that data is written to the disk is non linear, so adding space to the home partition should not be a problem. Nevertheless (as far as I remember) the partition manager allows me to add space in a "linear" way as shown in its diagram. Is there a way to bypass this? Or should I move my /root partition to the end and then increase it?

    I am planning to do this using an ubuntu 11.04 live cd. Currently i got a kubuntu 11.04 x64 installation. Does it matter that the live cd boots a 32bit version? How safe is it generally to move the /root partition? should I backup something? pretty much everything is in /home...

    thnx in advance


    EDIT: forgot this in case it helps...

    Code:
    Disk /dev/sda: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0005a676
    
      Device Boot   Start     End   Blocks  Id System
    /dev/sda1  *      1     373   2996091  82 Linux swap / Solaris
    /dev/sda2       374    6598  50002312+  5 Extended
    /dev/sda5       374    4108  30001356  83 Linux
    /dev/sda6      4109    6598  20000893+ 83 Linux
    Attached Files

    #2
    Re: Resize home partition question (or move root)

    Your partitioning scheme left you no space to increase /home, as you have it before /. In order to increase the partition used by /home you will have to 'move' your root partition 'to the right' which will create unallocated space between /home and where root will be. You will then be able to increase the size of your /home partition.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Resize home partition question (or move root)

      Thnx for your reply Snowhog, this is exactly what I was planning to do.

      I have the impression though that data in disks is not written in a linear way like people write in rows (correct me if I am wrong), but in different sections and plates of the hdd. Of course this could change from fs to fs. Ext3 is what I am using and I was hoping to bypass the move of the root partition for safety reasons. Talking about safety, about how safe is moving a partition? 80%? 90%? 60%?

      Will I have issues with the uuid after the move and resize? Does the 32 or 64bit live cd make a difference when running gparted?

      thnx again

      Comment


        #4
        Re: Resize home partition question (or move root)

        I've done it, without problems, using Gparted LiveCD. Moving the root partition to the right some distance won't affect it's UUID identity or /dev/sdxx designation. If you are at all worried, then backup the root partition to another drive if you have one before doing the move. But as I said, I've done it, and nothing bad happened.
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: Resize home partition question (or move root)

          ok, thnx I'll download the iso, run it and give you the updates when done

          Comment


            #6
            Re: Resize home partition question (or move root)

            Originally posted by zahtar
            I have the impression though that data in disks is not written in a linear way like people write in rows (correct me if I am wrong), but in different sections and plates of the hdd. Of course this could change from fs to fs.
            You're sort of right, but mixing apples and oranges. The hdd and it's sectors are not (any longer) linear (circular actually) but the how a particular filesystem arranges it's data is irrespective of the hdd low-level format scheme. Think of it like a bank of file cabinets holding hundreds of files - the fact that the cabinets are arranged in a row has no impact on where the file folders are placed within them.
            Will I have issues with the uuid after the move and resize?
            The UUID's are created by the filesystem not the partition software.
            Does the 32 or 64bit live cd make a difference when running gparted?
            Might be a bit faster with 64bit, but otherwise no.
            Code:
            Ext3 is what I am using and I was hoping to bypass the move of the root partition for safety reasons. Talking about safety, about how safe is moving a partition? 80%? 90%? 60%?
            I'd say 99% safe UNLESS your power goes off during the move. Then it's a crap-shoot.

            Personally - assuming you have a device you can back up your home to - I'd copy all the files off the /home partition, delete it, move the / partition all the way to the "left" or beginning of the free space, create a new partition for /home after the / partition, and I'd use ext4. It's faster and more featured the ext3.

            You could, if you're really worried - make a new partition in your free space and attach it to your current /home by either mounting it as a sub directory or use LVM or RAID to create a single file system from both partitions or use btrfs filesystem which is real new but will use multiple partitions. However, these ideas are slightly advanced. In the long run you're likely better off crossing your fingers and doing the move.

            Please Read Me

            Comment


              #7
              Re: Resize home partition question (or move root)

              ok guys, thnx a lot for your answers

              I tried the gparted live-cd, moved the root "all the way" to the right, and then extended /home to fill the space in between. I couldn't move root totally to the right, I got an error "can't have overlapping partitions" (what does this mean? there was no partition after that...). Anyway, I left 4MB unallocated at the end, just after root. Maybe in the near future I'll try to expand it to fill the gap.

              So far I can boot normally and the home partition sees its new size All the e2fschk done during the procedure, showed me that I have non contiguous files; about 12% in /home, about 7% i think in root. The same message I got before attempting the partition change sometimes during bootup. How can I fix this?

              thnx again

              Comment


                #8
                Re: Resize home partition question (or move root)

                You don't really need to be concerned about 'non-contiguous' files. Linux does not work with files on the disk in the same way that Widows does, where file framentation can begin to slow down the Windows OS operation.
                Windows no longer obstructs my view.
                Using Kubuntu Linux since March 23, 2007.
                "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                Comment


                  #9
                  [SOLVED] Re: Resize home partition question (or move root)

                  ok thnx again for everything


                  [solved]

                  Comment


                    #10
                    Re: [SOLVED] Resize home partition question (or move root)

                    A few of the recent GParted LiveCDs gave me headaches. There was a change to the way the Partition Allocation Table (or superblock records or something like that) was handled and my 2010 version of the GParted LiveCD made a few of my partitions unreadable after moving/resizing.

                    I tried it with the version of GParted on the Ubuntu Natty LiveCD and everything worked fine.

                    I have now stopped using the GParted LiveCDs for this reason and now only use the Ubuntu LiveCD (Natty)'s version of GParted for moving/resizing (although possibly things have been fixed on the most recent GParted LiveCD -- I just like to minimize the number of LiveCDs I have to keep on hand).

                    I think the Kubuntu Live CD (Natty)'s KDE Partition Manager also works without problems, but to be honest I haven't tested it thoroughly and could use 3rd party verification.


                    UbuntuGuide/KubuntuGuide

                    Right now the killer is being surrounded by a web of deduction, forensic science,
                    and the latest in technology such as two-way radios and e-mail.

                    Comment

                    Working...
                    X