1

I have a partition /dev/sdb before with 100 GB only (only 1 virtual partition: /dev/sdb1). Now, /dev/sdb has been increased to 480 GB but I don't know how to increase /dev/sdb1 to 480 GB as well.

I tried with parted:

 sudo umount /dev/sdb1
 sudo parted /dev/sdb resizepart 1 483000M

Then check again:

$ sudo parted
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) select /dev/sdb1
Using /dev/sdb1
(parted) print                                                            
Model: Unknown (unknown)
Disk /dev/sdb1: 483GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End    Size   File system  Flags
 1      0.00B  483GB  483GB  ext4

However, with df -hP it still shows /dev/sdb1 with 100 GB.

Filesystem      Size  Used Avail Use% Mounted on
udev            2.0G  8.0K  2.0G   1% /dev
tmpfs           396M  936K  395M   1% /run
/dev/sda1        59G  5.7G   51G  11% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none            2.0G  144K  2.0G   1% /run/shm
none            100M   32K  100M   1% /run/user
auto_in_data    8.2T  7.3T  939G  89% /media/sf_auto_in_data
/dev/sdb1        99G   70G   25G  75% /rasdata

So what am I missing to make df -hP also show /dev/sdb1 with 480GB?

2 Answers 2

2

You changed the partition size but you did not resize the filesystem on it. To do this use:

sudo resize2fs /dev/sdb1
0

The answer is I need to run this command after parted :)

sudo resize2fs /dev/sdb1
resize2fs 1.42.9 (4-Feb-2014)
Filesystem at /dev/sdb1 is mounted on /rasdata; on-line resizing required
old_desc_blocks = 7, new_desc_blocks = 29
The filesystem on /dev/sdb1 is now 117919666 blocks long.

Then, check with df -hP

/dev/sdb1       443G   70G  355G  17% /rasdata

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .