LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Resize an Active Partition (https://www.linuxquestions.org/questions/linux-general-1/resize-an-active-partition-43980/)

deesto 02-03-2003 09:47 PM

Resize an Active Partition
 
I think I know the answer to thins, but I'm hoping for an alternative...
Doing a full Slack install seems to have come close to filling my root partition:
# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda2 280001 248702 16841 94% /
/dev/hda1 93309 6799 81693 8% /boot
/dev/hda3 474474 8240 441735 2% /home
/dev/hda5 26594760 1583072 23638936 7% /usr
/dev/hdb2 10490116 110092 10380024 2% /usr/local
/dev/hdb3 32450304 52896 32397408 1% /var

I have plenty of free space to move around; the problem is resizing active partitions without hosing my sistem.
The parted manual says it's possible to resize a partition using the following:
(parted) resize partition_number new start new end

Can anyone give me a hint on how to determine these values properly, if it's possible to do? Here are the results of mount and fdisk -l if they'll help any:

# mount
/dev/hda2 on / type ext3 (rw)
/dev/hda1 on /boot type ext3 (rw)
/dev/hda3 on /home type ext3 (rw)
/dev/hda5 on /usr type ext3 (rw)
/dev/hdb2 on /usr/local type reiserfs (rw)
/dev/hdb3 on /var type reiserfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /proc type proc (rw)
s# fdisk -l

Disk /dev/hda: 255 heads, 63 sectors, 3649 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 12 96358+ 83 Linux
/dev/hda2 13 48 289170 83 Linux
/dev/hda3 49 109 489982+ 83 Linux
/dev/hda4 110 3649 28435050 5 Extended
/dev/hda5 110 3527 27455053+ 83 Linux
/dev/hda6 3528 3649 979933+ 82 Linux swap

Disk /dev/hdb: 255 heads, 63 sectors, 5473 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 127 1020096 82 Linux swap
/dev/hdb2 128 1433 10490445 83 Linux
/dev/hdb3 1434 5473 32451300 83 Linux

...and if all hope is lost and I need to ::gulp:: start from scratch, any suggestions on how better to partition for a web/ftp/samba server?

PTBmilo 02-04-2003 02:22 AM

(parted) resize partition_number new start new end

I believe they are talking about the start and stop cylinder of your re-sized partition. I always have trouble with that stuff too.

Just do the math and you can figure out what you'll need them to be. (use 'bc')

I would suggest trying out 'fips'... it's another partition re-sizer. You should probably print out all the above info before you start, cause I can't remember the units it has you work with.


All times are GMT -5. The time now is 04:13 AM.