0

My hard disk has lot of free space. It is not fully allocated for filesystem.Now how can I increase my filesystem storage? Is there any solution?

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by rubberman
1

I assume you mean that your system partition is smaller than the physical capacity of the disc. There are two things you can do. One is to create a new partition (using the fdisk command) and creae a file system on that (mkfsys -t ext4 /dev/sda2 for example), then create a mount point on your regular file system and mount the new file system there. To make it mount when you boot, you will need to add the appropriate entry to /etc/fstab. The other way is to modify the partition containing the file system you want to increase to use the rest of the drive (assuming the space is adjacent to the partition in question, and doesn't have another partition in the way), and then resize the file system to use the additional space. Assuming your file system is an ext2, ext3, or ext4 file system, then you would use resize2fs to do that.

In ANY case, backup your critical data and file systems before you do any of this! If you do, the operation will go well. If you don't, something will go wrong and you will lose everything! This is Murpy's Law at work! Trust me, I know from personal, painful experience! :-) Also, remember that Google is your friend! The easiest way I know to do the backup thing on Linux is to get an external drive big enough to hold your entire system disc, then do a bit-image backup. If you mess up, then you can boot with a recovery or live CD/DVD/USB drive and restore your system disc from backup. You use the 'dd' command for that. For example, assuming the system disc is /dev/sda (normal) and the backup disc is mounted as /media/backup, you would do this: dd if=/dev/sda of=/media/backup/system.disc

That will backup the ENTIRE system disc to the backup drive. If you mess up, then you can restore it after booting into the recovery/live CD/DVD/USB drive by mounting the external backup drive (assume again it is in /media/backup) and issuing the command: dd if=/media/backup/system.disc of=/dev/sda

When it is done, bingo! you have magically restored your system to the EXACT state it was in before you nuked the system and it should boot normally!

Trust me. This technique has saved me on many more than one occasion. IE, NO major system changes without full backup! Tatoo that in reverse on your forehead so you will see it each time you look in the mirror! :-)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.