question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GCP persistent disk device name is 'sdb', not 'pkb-xxxxxxxx-0-data-0-0'

See original GitHub issue

This 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:closed
  • Created 4 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
darabearrcommented, Oct 24, 2019

Resolved in commit 9915b334621acc8c262fb47ff38846a873d54531

0reactions
HarpPDXcommented, Oct 3, 2019

@dlott Yes, that is the workaround. Thanks.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found