ubuntu gce instance doesn't recognize large disk (5T)

85 views
Skip to first unread message

Fang Deng

unread,
Feb 9, 2016, 5:53:44 PM2/9/16
to gce-discussion
I am trying to create an instance with 5500GB.

gcloud compute --project MY_PROJECT instances create "my-test-instance" --zone "us-central1-b" --machine-type "n1-standard-32" --network "default" --maintenance-policy "MIGRATE" --scopes "https://www.googleapis.com/auth/cloud-platform" --tags "http-server","https-server" --image "https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1404-trusty-v20160114e" --boot-disk-size "5500" --boot-disk-type "pd-standard" --boot-disk-device-name "my-test-instance"

It turns out that the resulting instance only shows 2T storage

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            114G  8.0K  114G   1% /dev
tmpfs            23G  332K   23G   1% /run
/dev/sda1       2.0T  535G  1.4T  28% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none            114G     0  114G   0% /run/shm
none            100M     0  100M   0% /run/user


Does anyone know how I can make the storage visible to the system?

Fang

Robert Fischer

unread,
Feb 9, 2016, 6:00:26 PM2/9/16
to Fang Deng, gce-discussion
Did you originally have a smaller disk and just resize to 5.5TB?


-Robert

--
© 2014 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/8a324e31-96f7-474a-8952-f5a61227e2f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Faizan (Google Cloud Support)

unread,
Feb 9, 2016, 7:17:20 PM2/9/16
to gce-discussion
Hello Fang,

Google Compute Engine Ubuntu images will only auto resize the root partition up to 2 TB as mentioned on this link:  

All Compute Engine Ubuntu images will automatically resize the root partition to use the entire disk, up to a 2 TB limit. Even if the disk is larger than 2 TB, the operating system only recognizes up to 2 TB.

With that said, you need to manually repartition your disk. The steps are mentioned on this link

I hope that helps.

Faizan

Fang Deng

unread,
Feb 9, 2016, 7:18:01 PM2/9/16
to Robert Fischer, gce-discussion
Hi Robert,

Thanks for the reply. No, I just let the command to create the disk together with creating the instance. 

Fang

Fang Deng

unread,
Feb 9, 2016, 7:31:06 PM2/9/16
to Robert Fischer, gce-discussion
It looks like the physical size of the disk is 5.4T, but the file system only sees 2T. How can I make the rest of the disk visible?

$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 5.4T 0 disk
└─sda1 8:1 0 2T 0 part /


I saw in the doc:
All Compute Engine Ubuntu images will automatically resize the root partition to use the entire disk, up to a 2 TB limit. Even if the disk is larger than 2 TB, the operating system only recognizes up to 2 TB. Is there a workaround?

Faizan (Google Cloud Support)

unread,
Feb 10, 2016, 1:35:48 PM2/10/16
to gce-discussion, rob...@3dslice.com
Hello Feng,

As mentioned in my previous response you need to manually repartition the root disk to the size of your disk (5TB). The steps are documented on this link.
Reply all
Reply to author
Forward
0 new messages