Operating System - Linux
1753477 Members
5620 Online
108794 Solutions
New Discussion юеВ

is it possible to extend the partition

 
Maaz
Valued Contributor

is it possible to extend the partition

Server: HP Proliant ML370 G5
Hardware RAID-5 configured
partition type: conventional/normal/non-lvm

# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/cciss/c0d0p3 reiserfs 443G 397G 47G 90% /
/dev/cciss/c0d0p2 reiserfs 502M 39M 464M 8% /boot

Now I installed two 160 GB hard drives, and add them in the RAID-5 volume.

is there any possibility to extend /dev/cciss/c0d0p3 ?

Regards
Maaz
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: is it possible to extend the partition

Shalom Maaz,

RH4 ext2online (extends filesystems without umount). This only works on ext2/ext3 filesystems.

You need to have the new disk partitioned first.

If you are using LVM thats no problem.

But reiserfs, you need to use those tools.

http://www.linux-mag.com/id/572

http://www.linux.org/docs/ldp/howto/LVM-HOWTO/extendlv.html

Second link looks promising.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ivan Ferreira
Honored Contributor

Re: is it possible to extend the partition

I haven't tried with reiserfs, but theorically, with data loss risk, you could:

If c0d0p3 is the last partition of your disk, then you could delete that partition with fdisk and create another one with the same start cilinders, but with the last cilinder extended to the end of the disk.

Then you (theorically) run:

mount -o remount,resize=auto /

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Maaz
Valued Contributor

Re: is it possible to extend the partition

Thanks a lot Dear SEP and Ivan for help.

Ivan I got the idea from your post, thanks Once again.

Yet I have not tried on the production server, but I am dead sure it will be no issue, because I have tested on testing machine, without any problem

following are the steps:
1, first create a partition /dev/sda3 of 2 GB with reiserfs filesystem on it, and mount it under /data.

2, populate the /data with with data of about 1.2 GB.
3, umount /data
4, delete the /dev/sda3 partition with fdisk and create another one with the same start cilinders, but with the last cilinder extended to the end of the disk.
5, execute the "partprobe"

6, execute the following command to extend the filesystem without formating

# resize_reiserfs /dev/sda3

# mount /dev/sda3 /data

Now I can access all the data on /dev/sda3 i.e no data lost, with total space of 3 GB.

DONE ;)
Yogeeraj_1
Honored Contributor

Re: is it possible to extend the partition

hi Maaz,

This definitely looks great!

However, before your do this on your production server, ensure that you have the latest backup done.

good luck!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)