Find the answer to your Linux question:
Results 1 to 9 of 9
Hi guys, I'm running out of space on my patition labeled as /dev/hdc3, while I have plenty of free space on partition /dev/hdc5, so I would like to shrink the ...
  1. #1
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Slovenia
    Posts
    162

    [SOLVED] How do I resize the partition?

    Hi guys, I'm running out of space on my patition labeled as /dev/hdc3, while I have plenty of free space on partition /dev/hdc5, so I would like to shrink the /dev/hdc5 a little in assign that space to /dev/hdc3. How do I do that? I unmounted /dev/hdc5 and went to Yast->Syste->Partitioner and resized /dev/hdc5 a little, but when I try to assign that space to /dev/hdc3, there is no free space available, while on /dev/hdc5 it is marked as unused space. I did the reboot of my suse 10.2 but still no change. What did I do wrong. Thanx for help.

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Post the output of fdisk -l and df -h commands here.
    Code:
    su -
    fdisk -l
    df -h
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Slovenia
    Posts
    162
    Thanx devils casper, this is the output of both commands:
    Code:
    Disk /dev/hdc: 81.9 GB, 81964302336 bytes
    255 heads, 63 sectors/track, 9964 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/hdc1               1        3682    29575633+   7  HPFS/NTFS
    /dev/hdc2            3683        5949    18209677+   5  Extended
    /dev/hdc3   *        5950        7582    13117072+  83  Linux
    /dev/hdc4            7583        9964    19133415   83  Linux
    /dev/hdc5            3683        5316    13117072   83  Linux
    /dev/hdc6            5707        5949     1951866   82  Linux swap / Solaris
    
    Disk /dev/hde: 122.9 GB, 122942324736 bytes
    255 heads, 63 sectors/track, 14946 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/hde1   *           2       14946   120045712+   f  W95 Ext'd (LBA)
    /dev/hde5               2        7474    60026841   83  Linux
    /dev/hde6            7475       14946    60018808+  83  Linux
    Code:
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/hdc3              13G   12G  492M  96% /
    udev                  1.3G  100K  1.3G   1% /dev
    /dev/hdc4              18G  7.2G  9.9G  43% /home
    /dev/hdc1              29G  6.9G   22G  25% /windows/C
    /dev/hdc5              13G  2.6G  9.4G  22% /local
    /dev/hde5              57G  181M   54G   1% /data2
    /dev/hdc1              29G  6.9G   22G  25% /windows/C
    /dev/hde6              57G   22G   32G  41% /data1
    192.168.1.10:/mnt/sdb5/Downloads
                          147G  124G   16G  89% /mnt/Rombon Downloads
    Thanx for any suggestion.

  4. #4
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    You can not assign space from random areas the free space must be adjacent to the partition you wish to expand. You must move 4 and 5 to give 3 space to expand into. The start and the end block numbers are the key.

  5. #5
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Slovenia
    Posts
    162
    Thanx gogalthorp, but still I don't seem to understand the concept. From what you wrote, I gues the partition from which you want to take space from and the one you want assign the free space to, must stick together with start or end block of the drive. So if this is the right method which I should consider, I should be able to take some space from /dev/hdc4 and give it to /dev/hdc3, since these two partitions stick together, but I doesn't work out. There is no free space left after I downsize the partition dev/hdc4. I gues I'm still missing something. Thanx once again for help.

  6. #6
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    Ok it is pretty simple when you resize you are freeing space at the high end of the partition. but the lower partition can not use this space since it is not adjacent to its high end. So you must move the stating point of the higher partition to free the space just above the lower one so it can expand.

    !----P1------!!------P2------!!-----P3-----!!end!
    shrink P3
    !----P1------!!------P2------!!-----P3--!free!end!
    move P3
    !----P1------!!------P2------!free!-----P3--!!end!
    move P2
    !----P1------!free!------P2------!!-----P3--!!end!
    expand P1
    !----P1---------!!------P2------!!-----P3--!!end!


  7. #7
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Slovenia
    Posts
    162
    gogalthorp thanx for the explanation, now I got it would you be please so kind to tell me which tool should I use for moving partition start and end points. In partitioner from yast there is no such option, is maybe fdisk or gparted the right choice? Many thanx again.

  8. #8
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    gparted is your best bet to do it non destructively.

    Warning Warning Will Robertson!!!
    Doing any low level mods are dangerous to your data. If you have important data please back it up. Consider what would happen if you had a power failure in the middle of moving a partition.

  9. #9
    Linux Newbie
    Join Date
    Feb 2006
    Location
    Slovenia
    Posts
    162
    Solved with gparted I managed to do it right. My parition is finally bigger Thank you all once again.

Posting Permissions

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