0
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda6             4.6G  4.6G     0 100% /
tmpfs                 464M     0  464M   0% /lib/init/rw
varrun                464M   96K  464M   1% /var/run
varlock               464M     0  464M   0% /var/lock
udev                  464M  2.8M  461M   1% /dev
tmpfs                 464M     0  464M   0% /dev/shm
lrm                   464M  2.2M  462M   1% /lib/modules/2.6.27-14-generic/volatile
/dev/sda5              76M   29M   44M  40% /boot
/dev/sda8             220G   61G  149G  29% /home
/dev/sda7             4.6G  4.1G  277M  94% /var

I'm looking for a simple way to take a few GB from sda8 and give it to sda6 ? Any help/pointers would be appreciated.

4
  • Doing this would likely require you to resize and move around sda6, sda7 and sda8 and the filesystems thereon. I would recommmend to make a backup instead and restore it to a newly formatted disk with a better partition layout from the start.
    – Sven
    Apr 12, 2013 at 10:42
  • No 'simple' solution to this, what distro are you using?
    – Sirch
    Apr 12, 2013 at 10:45
  • Linux Ubuntu 8 :/
    – Mark
    Apr 12, 2013 at 10:49
  • The 'easiest' solution is to add another disk. Use LVM to carve it up and migrate all your filesystems to the new volumes.
    – Sirch
    Apr 12, 2013 at 11:04

2 Answers 2

2

I would do it this way:

  1. Copy all data from sda7 to sda8.
  2. Delete sda7
  3. Shrink sda8 to desired size
  4. Extend sda6 to desired size (left some space for sda7)
  5. Create sda7
  6. Copy data back from sda8 to sda7

You will need fdisk, parted and some filesystem utility tool depending on the type of filesystem you use.

Of course this is not a piece-of-cake operation and you should:

  • train it first on any test system
  • prepare a good plan based on experience from training mentioned above
  • backup everything
0

Also you can move some directories from sda6 to sda8 and then create a symbolic link, for example:

# mkdir /home/more_space
# mv /usr/src /home/more_space
# ln -s /home/more_space/src /usr/src

That way any process trying to open /usr/src/something will find it. However it's the root partition so you should do this from another OS, for example a Live Linux distro and be very careful

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .