Increasing And Decreasing The Size of Static Partition

Vineet Negi
Nov 13, 2020

Task Objective:-

Statement: In Linux, find how to increase and decrease the size of static partition without losing our data

Increase the static partition in Linux

I have a device that has a size of 10GB

Device Name : /dev/sdb

As you can see we have partition of size 2G mounted on /mano directory.

We need to increase the size of partition with losing this data.

  1. unmount the partition from this directory.

2. use fdisk (device name ) command to remove the partition.

3. Now lets create partition of size 5G

4. Let’s Check your new partition

5. Do Not create new file system ( using mkfs command ) else it will clear the old inode data and hence data loose.

Directly mount it to old location.

Bonus:

Create new directory and mount ur partition to it and see what happens.

As soon as we create new file system we lost old inode table and hence data loss.

Let me tell u one interesting fact we only lost the inode table the data is still there in its location we can see that data.

TASK COMPLETED

Here is my linkedin Profile link -> https://www.linkedin.com/public-profile/settings?trk=d_flagship3_profile_self_view_public_profile

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Vineet Negi
Vineet Negi

Written by Vineet Negi

★ Aspiring DevOps Engineer ★ Technical Volunteer @LinuxWorld ★ Technical Content Writer @Medium ★ ARTH Learner

No responses yet

Write a response