Announcement

Collapse
No announcement yet.

Any way to coalesce separated unallocated blocks of diskspace?

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

    Any way to coalesce separated unallocated blocks of diskspace?

    The subject says it all.

    #2
    Re: Any way to coalesce separated unallocated blocks of diskspace?

    On what filesystem type? If ext3, you (really) don't need to 'coalesce' (defrag).
    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: Any way to coalesce separated unallocated blocks of diskspace?

      All partitions except swap are ext3 or ntfs. To give you an idea of partitions, I have sda1,14g ntfs: 10g unallocated: sda2, 150g ntfs: sda3, 20g ext3; followed by 7 more ext3 partitions; then 54g unallocated. I am bugged by unallocated segments between formatted partitions. I think when I shrink or delete a partition, I am left with a sliver of unallocated space between formatted partitions. I would prefer all unallocated space combined together in unallocated space at end.

      Comment


        #4
        Re: Any way to coalesce separated unallocated blocks of diskspace?

        Unless you used lvm to set it all up (unlikely), I'm not aware of a simple way to do this. Best thing you can probably do is download the PartedMagic livecd and start resizing things.

        Be aware that changing the start block of a partition takes hours, so if you don't want to waste a lot of time just expand the existing partitions toward the end of the disk.
        Dell Optiplex 580<br />Kubuntu 10.10 + backports

        Comment


          #5
          Re: Any way to coalesce separated unallocated blocks of diskspace?

          If I delete 2 adjacent partitions or a partition next to unallocated, do I end up with unallocated space whose size is sum of deleted partitions?

          Comment


            #6
            Re: Any way to coalesce separated unallocated blocks of diskspace?

            There's a bit of the space on each partition used for filesystem recordkeeping (or "overhead"). You can see it as the colored area on the GParted graphic, immediately after you make and format a new partition, before you have installed or saved anything on it.

            Basically, you want to start with an unpartitioned drive, and add partitions sequentially, each new one beginning with the next block after the end of the previous.

            If you delete a partition, all of that space becomes unallocated.

            The answer to your last question is "yes".

            Are you using GParted to do your disk partitioning? It gives a pretty clear picture, graphically and with block numbers, to show you want is going on. I recommend the GParted Live CD from sourceforge, since booting that eliminates the "gee, did I unmount the right drive?" question entirely. But GParted is also available as a package in the *buntu repositories, and it offers to unmount each partition when you look at it that way.

            Comment


              #7
              Re: Any way to coalesce separated unallocated blocks of diskspace?

              As the discussion in a previous thread indicated, I was having trouble with my 7.10 install (which I am still using for this) concerning reading ntfs partitions, the concensus being that I should do a new install. I am now preparing to do an install of 8.04. It appears from the previous problems, together with a fleeting message from gparted, that there may be a problem with my disk partitioning. Here is info on partitions gleaned from work on previous problem:

              Disk /dev/sda: 500.1 GB, 500107862016 bytes
              255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
              Units = sectors of 1 * 512 = 512 bytes
              Disk identifier: 0xe0472aba

              Device Boot Start End Blocks Id System
              /dev/sda1 * 63 30716279 15358108+ 7 HPFS/NTFS
              /dev/sda2 51199155 378876959 163838902+ 7 HPFS/NTFS
              /dev/sda3 378876960 418878809 20000925 83 Linux
              /dev/sda4 418878810 863300969 222211080 5 Extended
              /dev/sda5 418878873 422878994 2000061 82 Linux swap / Solaris
              /dev/sda6 422879058 463844744 20482843+ 83 Linux
              /dev/sda7 463844808 515140289 25647741 83 Linux
              /dev/sda8 515140353 638021474 61440561 83 Linux
              /dev/sda9 638021538 740419784 51199123+ 83 Linux
              /dev/sda10 740419848 863300969 61440561 83 Linux
              albert@ALBERT-desktop:~$ sudo blkid
              /dev/sda1: UUID="2A740A75740A4453" TYPE="ntfs"
              /dev/sda2: UUID="8078DFDB78DFCDD2" LABEL="New Volume" TYPE="ntfs"
              /dev/sda3: UUID="75d68503-f397-41fd-9b39-809b08970759" SEC_TYPE="ext2" TYPE="ext3"
              /dev/sda5: TYPE="swap" UUID="7185a6fc-e27d-4411-ab1f-49054367b077"
              /dev/sda6: UUID="8e8e0e2a-f329-4122-986a-112ccb09295c" SEC_TYPE="ext2" TYPE="ext3"
              /dev/sda7: UUID="69a1945d-45fd-4fad-b63b-27e23403eb90" SEC_TYPE="ext2" TYPE="ext3"
              /dev/sda8: UUID="8d30d637-6575-4440-8dfd-5ec745012fe9" SEC_TYPE="ext2" TYPE="ext3"
              /dev/sda9: UUID="98dea409-159c-46c3-a1ee-b814cd018343" SEC_TYPE="ext2" TYPE="ext3"
              /dev/sda10: UUID="a0fd5a7c-4ac8-4c52-869a-c7be8f25b4a7" SEC_TYPE="ext2" TYPE="ext3"
              albert@ALBERT-desktop:~$ mount
              rootfs on / type rootfs (rw)
              none on /sys type sysfs (rw,nosuid,nodev,noexec)
              none on /proc type proc (rw,nosuid,nodev,noexec)
              udev on /dev type tmpfs (rw)
              fusectl on /sys/fs/fuse/connections type fusectl (rw)
              /dev/disk/by-uuid/75d68503-f397-41fd-9b39-809b08970759 on / type ext3 (rw,data=ordered)
              /dev/disk/by-uuid/75d68503-f397-41fd-9b39-809b08970759 on /dev/.static/dev type ext3 (rw,data=ordered)
              tmpfs on /var/run type tmpfs (rw,nosuid,nodev,noexec)
              tmpfs on /var/lock type tmpfs (rw,nosuid,nodev,noexec)
              tmpfs on /dev/shm type tmpfs (rw)
              devpts on /dev/pts type devpts (rw)
              tmpfs on /var/run type tmpfs (rw,nosuid,nodev,noexec)
              tmpfs on /var/lock type tmpfs (rw,nosuid,nodev,noexec)
              /dev/sda8 on /home type ext3 (rw,data=ordered)
              /dev/sda10 on /media/sda10 type ext3 (rw,data=ordered)
              /dev/sda6 on /media/sda6 type ext3 (rw,data=ordered)
              /dev/sda7 on /media/sda7 type ext3 (rw,data=ordered)
              /dev/sda9 on /media/sda9 type ext3 (rw,data=ordered)
              securityfs on /sys/kernel/security type securityfs (rw)
              nfsd on /proc/fs/nfsd type nfsd (rw)
              binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec)
              albert@ALBERT-desktop:~$ cat /etc/mtab
              rootfs / rootfs rw 0 0
              none /sys sysfs rw,nosuid,nodev,noexec 0 0
              none /proc proc rw,nosuid,nodev,noexec 0 0
              udev /dev tmpfs rw 0 0
              fusectl /sys/fs/fuse/connections fusectl rw 0 0
              /dev/disk/by-uuid/75d68503-f397-41fd-9b39-809b08970759 / ext3 rw,data=ordered 0 0
              /dev/disk/by-uuid/75d68503-f397-41fd-9b39-809b08970759 /dev/.static/dev ext3 rw,data=ordered 0 0
              tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
              tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
              tmpfs /dev/shm tmpfs rw 0 0
              devpts /dev/pts devpts rw 0 0
              tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
              tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
              /dev/sda8 /home ext3 rw,data=ordered 0 0
              /dev/sda10 /media/sda10 ext3 rw,data=ordered 0 0
              /dev/sda6 /media/sda6 ext3 rw,data=ordered 0 0
              /dev/sda7 /media/sda7 ext3 rw,data=ordered 0 0
              /dev/sda9 /media/sda9 ext3 rw,data=ordered 0 0
              securityfs /sys/kernel/security securityfs rw 0 0
              nfsd /proc/fs/nfsd nfsd rw 0 0
              binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec 0 0.

              In my words here is partition structure:
              sda1 ntfs 14.6g win2000
              unallocated 9.77g
              sda2 ntfs 156.25g EXPENDABLE
              sda3 ext3 19.5g Kubuntu 7.10
              sda4 extended 212g
              sda5 swap 1.91g
              sda6 ext3 19.5g EXPENDABLE
              sda7 ext3 24.5g EXPENDABLE
              sda8 ext3 59g /home
              sda9 ext3 49g EXPENDABLE
              sda10 ext3 59g EXPENDABLE
              unallocated 54g

              God only knows why I created so many partitions but my plan is to rationalize the partition structure before I install 8.04. The plan is,
              1) delete sda2. The 9.77g between sda1 and sda2 will then merge with the 156g from deleting sda2 to give an unallocated ~167g following sda1, the win2000 partition.
              2) Move swap back to follow 167g unallocated.
              3) Delete sda6(19.5g) and sda7 (24.5g) giving 44g unallocated following extended partition, which then could allow extended to be increased by this amount, so extended becomes 256g
              4) Delete sda9 and sda10 which when merged gives 162g at end.

              With renumbering, which I presume happens, this gives:

              sda1 ntfs 14.6g win2000
              unallocated 167g
              sda2 swap 1.9g
              sda3 ext3 19.5g Kubuntu 7.10
              sda4 extended 256g
              sda5 ext3 59g /home
              unallocated 162g

              For the install I would keep 7.10 on sda3 for the time being since it is still fuctional, and install 8.04 in a partition created in the last unallocated block. When this is functional I can delete sda3 and increase size of extended to be used for creating new partitions.

              I have worries about error messages mentioned earlier but hope I will not have to reformat the whole drive since that would be a nightmare. What do you think?

              Comment


                #8
                Re: Any way to coalesce separated unallocated blocks of diskspace?

                Couple of thoughts:

                Windows - NTFS -- why more than one of these? If you wish to make your data files available in both Windows and Linux, then just make a nice big /dev/sda1 that will hold both the Windows OS and the data that you want to share. Then, you can make a couple of partitions for Linux, and be done. So:

                /dev/sda1 = NTFS = big enough for Windows and all Windows-accessible data
                /dev/sda2 = ext3 = Linux filesystem including /home directory -- make it 15GB for comfort
                /dev/sda3 - swap = 1.5X your memory, or 1GB, whichever is smaller, so you don't have to worry about it
                /dev/sda4 = the rest of it = ext3 = data for Linux that Windows won't want to use. You can link this into your /home directory for convenience.

                If the Windows OS user gets desperate for access to /dev/sda4, there is an application that allows Windows to access ext3 formatted partitions.

                This is a much simpler plan, which means there is less likelihood of problems caused by complexity.

                Comment


                  #9
                  Re: Any way to coalesce separated unallocated blocks of diskspace?

                  There are 2 ntfs partitions in present structure (the one with partitions marked EXPENDABLE) but not in the proposed new partition scheme (the one with sda1 thru sda5). I just want to know if my proposed steps will work and that I understand correctly what will result afterwards. About my worries, I think that gparted (or whatever) noticed something wrong with mtab, which you might remember was causing me the earlier problems. Probably reinstalling with 8.04 will cure any mtab problems, or do you think not? Notice that I want to keep 7.10 install until I am sure 8.04 install is ok, then delete 7.10 giving me essentially what you suggest. Many thanks for reply.

                  Comment


                    #10
                    Re: Any way to coalesce separated unallocated blocks of diskspace?

                    Dibl,
                    Would appreciate comments on my proposed partition scheme. Thanks

                    Comment


                      #11
                      Re: Any way to coalesce separated unallocated blocks of diskspace?

                      Knowing the troubled background of that hard drive, if you can save your data elsewhere and start by deleting all partitions, I think that would be the best way to start over.

                      Use GParted Live CD, available here
                      Get version 0.3.4-10.

                      Boot the GParted Live CD, delete all partitions. Then make one partition that is large enough for Windows and all your Windows data. You won't be able to format it NTFS with GParted, but the Windows installer can do that.

                      Make the second partition for swap -- no more than 1GB.

                      Then the rest of your hard drive can be a Linux ext3 partition. Or if there's a lot of space, it can be split into two ext3 partitions.

                      Click "Apply" on the GParted menu to make the partitions. Afterward, highlight the NTFS partition-to-be, and choose "Manage Flags" and check the "Boot" flag.

                      Install Windows first, on the first partition. Then install Kubuntu.

                      That's my best shot at a recommendation.

                      Comment


                        #12
                        Re: Any way to coalesce separated unallocated blocks of diskspace?

                        Many thanks for all your trouble.

                        Comment


                          #13
                          Re: Any way to coalesce separated unallocated blocks of diskspace?

                          My pleasure -- I hope to read soon about your success with Kubuntu!

                          Comment

                          Working...
                          X