0

I'm working with Google Cloud services. After I've cloned a VM, I type lsblk after ssh'ing into it and can see that the partition sda1 is only 10 GB, which is only 10% of what I paid for.

I am not a Linux admin at all and I really don't know what this means. Why is the partition small?

  1. How is this be fixed on-prem? I think it may have to do with using an external utility from another boot device

  2. I don't expect anyone to help here, but how would I fix this on Google Cloud too? That would be great!

Here is the output of sudo parted --list:

Model: Google PersistentDisk (scsi)
Disk /dev/sda: 107GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Number  Start   End    Size   Type     File system  Flags
1      1049kB  107GB  107GB  primary  ext4         boot
Model: Google PersistentDisk (scsi)
Disk /dev/sdb: 268GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Number  Start   End     Size    Type     File system  Flags
1      1049kB  10.7GB  10.7GB  primary  ext4         boot
  • Welcome to U&L. ;-) What's the output of sudo parted --list? – Fabby Feb 21 '16 at 0:07
  • I edited the post – big_mike_boiii Feb 21 '16 at 0:14
  • It does appear to me that /dev/sda is 107GB, and /dev/sda 10.7GB? – perhapsmaybeharry Feb 21 '16 at 1:27
  • yes I can see that too. Can you tell me exactly how I fix it? – big_mike_boiii Feb 21 '16 at 1:42
  • The output of parted --list and your description of the output of lsblk do not match: It seems you have a 107GB bootable /dev/sda disk with a 107GB partition and a 268 GB bootable /dev/sdb disk with a 10.7 GB partition (probably /dev/sdb1). If you can boot off the 107GB one, it should be trivial to resize the 10.7 GB one. Can you confirm my suspicions so I can give you a well-funded answer? (I don't use Google Cloud MaaS but Bare Metal Ubuntu) – Fabby Feb 21 '16 at 8:58
1

It would seem that you are expected to create a second partition of ~97GB, leaving / as a basic 10GB.

Alternatively you could chance deleting the current partition and recreating a full sized one immediately in its place. The essential requirement here would be to ensure the starting sector was the same for the new partition as is for the old. Follow this with something like resize2fs and then force fsck on next boot.


Looking more closely, it seems that indeed the partition is 107MB, but you say the filesystem is currently only 10MB:

Number  Start   End    Size   Type     File system  Flags
1      1049kB  107GB  107GB  primary  ext4         boot

If you really want to increase the size of the single filesystem to the full amount available, just run resize2fs /dev/sda1 and it will be extended for you. (Note that this operation is not easily reversible.)

  • Thanks Im not sure how to fill in the gaps I hope someone else does! – big_mike_boiii Feb 21 '16 at 1:58
  • @Mike additional information added for you – roaima Mar 24 '16 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.