google compute engine - Add a new persistent disk to GCE which created with VirtualBox custom image -
i followed tutorial google has on youtube creating custom image compute engine using virtualbox link follow
i have succeed in created custom images , imported google compute engine. when try follow document attached new persistent disk :
https://cloud.google.com/compute/docs/disks/persistent-disks#attachdiskcreation
the document mentions command line tool :
/usr/share/google/safe_format_and_mount
but folder /usr/share/google not exist in custom image. how can install ? or there way mount new persistence disk in gce instance ?
the /usr/share/google/safe_format_and_mount
command comes google compute engine image packages. can see source code here.
you can either install packages or run these commands:
1- determine device location of new persistent disk: ls -l /dev/disk/by-id/google-*
. let's suppose it's /dev/sdb
2- sudo mkfs.ext4 -e lazy_itable_init=0,lazy_journal_init=0 -f /dev/sdb
3- sudo mount -o discard,defaults /dev/sdb <destination_folder>
run df-h
or mount
check if disk mounted in destination folder.
Comments
Post a Comment