HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

Extend a filesystem

 
Whitehorse_1
Frequent Advisor

Extend a filesystem

Admins,

I'm a fresh bee in Linux. I would like to extend a filesystem which looks like,

/dev/silo/c0d0p2 66054908 57574968 5124548 92% /home/rpt

Linux atdbs05 2.4.21-40.ELsmp #1 SMP Thu Nov 28 14:15:39 EST 2007 i686 i686 i386 GNU/Linux

Could someone throw some lights, Thxs WH
Reading is a good course medicine for deep sleep !!
5 REPLIES
Ivan Ferreira
Honored Contributor

Re: Extend a filesystem

Suddenly, this appears to be one fixed partition on a hardware RAID device (or similar). You can only extend partitions under the control of LVM. In this case, you are not using LVM.

Probably you need to backup, destroy, resize, restore your partion. If you do that, ensure to use LVM now.

There may be workarounds to this, but is dangerous, you can loss your data.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
skt_skt
Honored Contributor

Re: Extend a filesystem

identify the disk the FS use, see the free space, create a larger partition copy the data, and mount on new partiton. (Assuming there is no lvm)
Jeeshan
Honored Contributor

Re: Extend a filesystem

you can try this out

Here are the steps involved for EXPANDING a filesystem & partition:
1. Backup your data.
2. Print the output from the fdisk -l command on a printer, or write down the details by hand. This is in case you need to restore your partition table to it's previous state.
3. Make note of the cylinder size of the disk in bytes, and call this number C. For example, from the following output you would note C = 8225280

Disk /dev/hda: 40.0 GB, 40000000000 bytes
255 heads, 63 sectors/track, 4863 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

4.
5. Run the command tune2fs -l where represents the device file of the partition which contains the filesystem you are going to resize.
6. Make note of the following values from the above output: Block count, Block Size, and Free blocks. Label the Block Count T, the Block Size K, and Free Blocks F.
7. Reboot the system into rescue mode. Do this by booting off of the first CD and typing linux rescue at the boot: prompt.
8. DO NOT mount any partitions, especially those on the device containing filesystems you are going to resize.
9. Take the number of bytes you would like to add to the filesystem and label it Z.
10. Divide Z by C, rounding any fraction up to the next whole number or add 1 if the result is zero. Call this resulting number N.
11. Calculate ((N*C)/K) and call the result X.
12. Add X to T calling the result R.
13. Execute the command e2fsck -fy .
14. Enter the fdisk utility with the command fdisk .
15. Display the current partition table with the p command.
16. Use the d command to delete the partition the resized filesystem is on.
17. Use the n command to create a new partition.
18. For the starting cylinder, specify the same value as before. (You did print out the original partition table in step 2, right?)
19. For the ending cylinder, specify the original ending cylinder Plus N.
20. Use the w command to save the new partition table.
21. Run the command e2fsck -y to verify that the filesystem is intact.
22. Execute the command resize2fs -f
Note: you must use -f to grow filesystem otherwise it will refuse the command.
23. Assuming the resize was successful, run the command e2fsck -y to verify that the filesystem is still intact. If it it checks out, your done! If it fails then you most likely have lost the data on this filesystem.
a warrior never quits
Jeeshan
Honored Contributor

Re: Extend a filesystem

please use the the above mentioned steps in test machine then follow this in live.
a warrior never quits
Abhirama.M.V
Occasional Advisor

Re: Extend a filesystem

pvcreate
pvdisplay
lvcreste
lvdispay
these are all the commands the must be used to creste the volume and then makefilesystem using
mkfs command and filename. for more refernce log on to
//tldp.org/HOWTO/LVM-HOWTO/index.html