Attach disk to running instance (in console)

I needed more space in my instance, so I tried to connect a drive to it. in the console I created a disk and mapped it. But I don't see it in my instance at startup:

df -h

      

I tried to reload and read the docs here: https://developers.google.com/compute/docs/disks#attachdiskrunninginstance

I don't know what else to try ...

+3


source to share


1 answer


try this:

disc list: ls -l /dev/disk/by-path/

see disk device usually /dev/sdb

for second disk

sudo mkdir /mnt/newdisk



Note. The following command wil formats and deletes all data on the new disk! Do not use if you are installing an already formatted disk containing data.

sudo /usr/share/google/safe_format_and_mount /dev/sdb /mnt/newdisk

Paolo relationship

+5


source







All Articles