System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Extend ext3 File System in Linux

SOLVED
Go to solution
Lakshmikanth Baddam
Frequent Advisor

Extend ext3 File System in Linux

I want to extend file system in my Linux box (Linux lx151 2.6.9-55.ELsmp).

I have ordered 40 GB LUN,
How can i get that newly added LUN into LVM and extend the file system.

It is ext3 file system. Please give me the steps. Attached are my PVDISPLAY and LVDISPLAY outputs.
6 REPLIES
Dan Wanek
Valued Contributor
Solution

Re: Extend ext3 File System in Linux

# pvcreate
# vgextend db2idestiny_001_lx151
# lvextend -L +
# ext2online -v


skt_skt
Honored Contributor

Re: Extend ext3 File System in Linux

# e2fsadm -L +1G /dev/vg01/lvol22
e2fsck 1.32 (09-Nov-2002)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/vg01/lvol22: 329/131072 files (14.0% non-contiguous), 242667/524288 blocks
lvextend -- extending logical volume "/dev/vg01/lvol22" to 1.50 GB
lvextend -- doing automatic backup of volume group "vg01"
lvextend -- logical volume "/dev/vg01/lvol22" successfully extended

resize2fs 1.32 (09-Nov-2002)
Begin pass 1 (max = 128)
Extending the inode table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 2 (max = 32)
Relocating blocks XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 3 (max = 64)
Scanning inode table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 5 (max = 9)
Moving inode table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on /dev/vg01/lvol22 is now 1572864 blocks long.

e2fsadm -- ext2fs in logical volume /dev/vg01/lvol22 successfully extended to 1.50 GB
Lakshmikanth Baddam
Frequent Advisor

Re: Extend ext3 File System in Linux

can anyone suggest me how to get the new disk into LVM. I mean recognise the newly added disk.
Srimalik
Valued Contributor

Re: Extend ext3 File System in Linux

to add new disk to LVM

1) create a pv using "pvcreate /dev/sdx"
2) Then you can create a new vg on this PV using vgcreate commmand
else
If you want this PV to be a part of existing VG then you have to use vgextend command to include this PV in the existing VG

man pages will help you to get all the option you may want to use.

Thanks
Sri

abandon all hope, ye who enter here..
Steven E. Protter
Exalted Contributor

Re: Extend ext3 File System in Linux

Shalom,

ioscan the system after the disk has been added.

insf -C disk

Bottom line is a system boot is the way to get the disk recognized then its pvcreate vgeextend lvcreate

You only run into trouble if the new disk exceeds vg capacity then you have to vgexport and vgcreate from scratch.

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
Steven E. Protter
Exalted Contributor

Re: Extend ext3 File System in Linux

pvscan replaces the ioscan I posted. I thought I was in HP-UX forums.

Sorry.
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