LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   [help] resize partition (/var) (https://www.linuxquestions.org/questions/linux-newbie-8/%5Bhelp%5D-resize-partition-var-655829/)

dongli 07-15-2008 04:27 AM

[help] resize partition (/var)
 
Hi, everyone

My partition layout is

Code:

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000a4908

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1          12      96358+  83  Linux
/dev/sda2              13        134      979965  83  Linux
/dev/sda3            135        256      979965  83  Linux
/dev/sda4            257        9729    76091872+  5  Extended
/dev/sda5            257        2688    19535008+  83  Linux
/dev/sda6            2689        5120    19535008+  83  Linux
/dev/sda7            5121        9497    35158221  83  Linux
/dev/sda8            9498        9729    1863508+  82  Linux swap / Solaris

The mount points of each partition are

Code:

Filesystem          1K-blocks      Used Available Use% Mounted on
/dev/sda1                93307    18469    70021  21% /boot
/dev/sda2              964532    218880    696656  24% /
/dev/sda3              964532    151488    764048  17% /var
/dev/sda5            19228276  1938232  16313296  11% /usr
/dev/sda6            19228276  1364260  16887268  8% /home
/dev/sda7            34606040  5789552  27058580  18% /storage

The problem is that there is no sufficient space in /var, so I want to enlarge /dev/sda3. How can I do this? Can I squeeze some space out from sda5 to sda3?

Thanks for help

Greenfuse 07-15-2008 04:31 AM

There is a useful GUI partitioning tool called 'gparted' which will resize and move partitions. Run it from a Live CD that you can download here

Edit: backup your data and read documentation about partitioning before you try using it.

mrrangerman 07-15-2008 02:26 PM

Just wondering, is this just a home pc or are you using it for a mail server?

trickykid 07-15-2008 02:34 PM

In the future, when you plan on installing your next Linux install, use LVM, it'll make your life that much easier when you need to resize partitions, with less hassle and headache.

dongli 07-16-2008 04:33 AM

Quote:

Originally Posted by mrrangerman (Post 3215469)
Just wondering, is this just a home pc or are you using it for a mail server?

It's just my home pc. I will try to use LVM next time!

It seems impossible to shrink /dev/sda5 from beginning part.


All times are GMT -5. The time now is 02:49 PM.