GCP persistent disk device name is 'sdb', not 'pkb-xxxxxxxx-0-data-0-0'
See original GitHub issueThis appears to be an issue with the GCP API, but not sure how/where to report that so raising the issue here as PKB users may run into the issue.
The error from PKB looks like this:
2019-09-26 08:54:31,060 406c8cfa Thread-42 mongodb_stress(1/1) INFO Running: ssh -A -p 22 perfkit@35.225.149.231 -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /tmp/perfkitbenchmarker/runs/406c8cfa/perfkitbenchmarker_keyfile -o ControlPath="/tmp/perfkitbenchmarker/runs/406c8cfa/ssh/%C" -o ControlMaster=auto -o ControlPersist=30m [[ -d /mnt ]] && sudo umount /mnt; sudo mke2fs -F -E lazy_itable_init=0,discard -O ^has_journal -t ext4 -b 4096 /dev/pkb-406c8cfa-0-data-0-0
2019-09-26 08:54:31,299 406c8cfa Thread-42 mongodb_stress(1/1) INFO Ran: {ssh -A -p 22 perfkit@35.225.149.231 -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /tmp/perfkitbenchmarker/runs/406c8cfa/perfkitbenchmarker_keyfile -o ControlPath="/tmp/perfkitbenchmarker/runs/406c8cfa/ssh/%C" -o ControlMaster=auto -o ControlPersist=30m [[ -d /mnt ]] && sudo umount /mnt; sudo mke2fs -F -E lazy_itable_init=0,discard -O ^has_journal -t ext4 -b 4096 /dev/pkb-406c8cfa-0-data-0-0} ReturnCode:1
STDOUT:
STDERR: umount: /mnt: not mounted.
mke2fs 1.44.1 (24-Mar-2018)
The file /dev/pkb-406c8cfa-0-data-0-0 does not exist and no size was specified.
It appears the PKB is calling the CLI with the correct parameter to name the device:
2019-09-26 08:51:51,421 406c8cfa Thread-42 mongodb_stress(1/1) vm_util.py:338 INFO Running: gcloud compute instances attach-disk pkb-406c8cfa-0 --format json --quiet --project ssg-benchmarks --zone us-central1-c --device-name pkb-406c8cfa-0-data-0-0 --disk pkb-406c8cfa-0-data-0-0
When I log in to the VM, I can see (via lsblk) that the device name is ‘sdb’ not pkb-xxxxxxxx-0-data-0-0.
Note that I see the same problem when creating a VM and attaching a disk through the console/GUI.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Add a persistent disk to your VM - Compute Engine
In this example, sdb is the device name for the new blank persistent disk. Format the disk using the mkfs tool. This command...
Read more >Compute Engine — identifying your disks | by Daz Wilkin
It actually is possible to identify the correct device from the order in which the disks are attached to the instance: the first...
Read more >attaching persistent disk with a device name to an instance
Hello Alex, "--device-name" parameter flag is helpful in referencing GCE disk names to Linux device name. '/dev/sda', '/dev/sdb' and so on are ...
Read more >Automate GCP persistent disk initialization - Stack Overflow
You could therefore use this in a startup script to discover if the disk is formatted, then perform formatting/mounting if that is not...
Read more >Creating a Persistent Disk | Google Cloud Skills Boost
Compute Engine provides persistent disks for use as the primary storage for your ... Do not use your Google Cloud Skills Boost credentials....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Resolved in commit 9915b334621acc8c262fb47ff38846a873d54531
@dlott Yes, that is the workaround. Thanks.