Madox
Madox

Reputation: 746

Resizing a persistent disk

I've tried the official manual but just like Andrew Elis, after rebooting, I can't reconnect to my machine, and I can't get direct official support because I have the bronze subscription.

First, I've tried with a 500GB disk and after with 15GB just to see if it's something to do with the size, but the same result.

Upvotes: 0

Views: 657

Answers (1)

Madox
Madox

Reputation: 746

I've found the part that failed!! The new start sector must be the same as the old one.

With in the new instance when you start the repartition program if you hit p (and enter) youl see something like this:

   Device     Boot      Start     End        Blocks    Id  System
   /dev/sda1   *        4096    20971519    10483712   83  Linux

You can see the start block sector is 4096 (in my case). Afterwards whemn you make the new partition remember to set the fisrt sector like the old one

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-2097151999, default 2048): 4096

After you write your changes and you reboot (wait a couple of minuts max) reconect and do execute the next command:

sudo resize2fs /dev/sda1

After this you should see your new disk up and running nicely.

~$ df -h 

Filesystem                                              Size  Used Avail Use% Mounted on
rootfs                                                  985G  517M  944G   1% /
udev                                                     10M     0   10M   0% /dev
tmpfs                                                   1.3G  100K  1.3G   1% /run
/dev/disk/by-uuid/906181f7-4e10-4a4e-8fd8-43b20ec980ff  985G  517M  944G   1% /
tmpfs                                                   5.0M     0  5.0M   0% /run/lock
tmpfs                                                   2.6G     0  2.6G   0% /run/shm

Upvotes: 1

Related Questions