Giter Club home page Giter Club logo

Comments (6)

nobuto-m avatar nobuto-m commented on June 15, 2024 1

It was a virtio disk instead of SATA/SCSI.

ubuntu@test:~$ sudo lsblk -f
sudo blkid /dev/vdc
NAME    FSTYPE   FSVER            LABEL           UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0   squashfs 4.0                                                                         0   100% /snap/core20/1822
loop1   squashfs 4.0                                                                         0   100% /snap/lxd/24322
loop2   squashfs 4.0                                                                         0   100% /snap/snapd/18357
vda                                                                                                   
├─vda1  ext4     1.0              cloudimg-rootfs 9a7ad317-1eac-4f04-8300-403eacd3bd76   13.9G     9% /
├─vda14                                                                                               
└─vda15 vfat     FAT32            UEFI            59D5-47E7                              98.3M     6% /boot/efi
vdb     iso9660  Joliet Extension cidata          2023-03-27-08-40-10-00                              
vdc                                                                                                   


ubuntu@test:~$ sudo blkid /dev/vdc


ubuntu@test:~$ ll /dev/disk/by-*/
/dev/disk/by-label/:
total 0
drwxr-xr-x 2 root root 100 Mar 27 08:40 ./
drwxr-xr-x 6 root root 120 Mar 27 08:40 ../
lrwxrwxrwx 1 root root  11 Mar 27 08:40 UEFI -> ../../vda15
lrwxrwxrwx 1 root root   9 Mar 27 08:40 cidata -> ../../vdb
lrwxrwxrwx 1 root root  10 Mar 27 08:40 cloudimg-rootfs -> ../../vda1

/dev/disk/by-partuuid/:
total 0
drwxr-xr-x 2 root root 100 Mar 27 08:40 ./
drwxr-xr-x 6 root root 120 Mar 27 08:40 ../
lrwxrwxrwx 1 root root  11 Mar 27 08:40 0fd15b0f-2a30-4875-b285-1e41c719261c -> ../../vda14
lrwxrwxrwx 1 root root  10 Mar 27 08:40 4f2db25b-897b-4eff-9cc2-0aa17f8e4b4b -> ../../vda1
lrwxrwxrwx 1 root root  11 Mar 27 08:40 b3140944-0cf3-48e0-8732-4977793e18a5 -> ../../vda15

/dev/disk/by-path/:
total 0
drwxr-xr-x 2 root root 280 Mar 27 08:40 ./
drwxr-xr-x 6 root root 120 Mar 27 08:40 ../
lrwxrwxrwx 1 root root   9 Mar 27 08:40 pci-0000:04:00.0 -> ../../vda
lrwxrwxrwx 1 root root  10 Mar 27 08:40 pci-0000:04:00.0-part1 -> ../../vda1
lrwxrwxrwx 1 root root  11 Mar 27 08:40 pci-0000:04:00.0-part14 -> ../../vda14
lrwxrwxrwx 1 root root  11 Mar 27 08:40 pci-0000:04:00.0-part15 -> ../../vda15
lrwxrwxrwx 1 root root   9 Mar 27 08:40 pci-0000:05:00.0 -> ../../vdb
lrwxrwxrwx 1 root root   9 Mar 27 08:40 pci-0000:06:00.0 -> ../../vdc
lrwxrwxrwx 1 root root   9 Mar 27 08:40 virtio-pci-0000:04:00.0 -> ../../vda
lrwxrwxrwx 1 root root  10 Mar 27 08:40 virtio-pci-0000:04:00.0-part1 -> ../../vda1
lrwxrwxrwx 1 root root  11 Mar 27 08:40 virtio-pci-0000:04:00.0-part14 -> ../../vda14
lrwxrwxrwx 1 root root  11 Mar 27 08:40 virtio-pci-0000:04:00.0-part15 -> ../../vda15
lrwxrwxrwx 1 root root   9 Mar 27 08:40 virtio-pci-0000:05:00.0 -> ../../vdb
lrwxrwxrwx 1 root root   9 Mar 27 08:40 virtio-pci-0000:06:00.0 -> ../../vdc

/dev/disk/by-uuid/:
total 0
drwxr-xr-x 2 root root 100 Mar 27 08:40 ./
drwxr-xr-x 6 root root 120 Mar 27 08:40 ../
lrwxrwxrwx 1 root root   9 Mar 27 08:40 2023-03-27-08-40-10-00 -> ../../vdb
lrwxrwxrwx 1 root root  11 Mar 27 08:40 59D5-47E7 -> ../../vda15
lrwxrwxrwx 1 root root  10 Mar 27 08:40 9a7ad317-1eac-4f04-8300-403eacd3bd76 -> ../../vda1

from microceph.

nobuto-m avatar nobuto-m commented on June 15, 2024 1

No, that was the full output. There is no by-id folder unless I attach a SATA device to a VM for example.

from microceph.

nobuto-m avatar nobuto-m commented on June 15, 2024

It may be a corner case of using virtio disks only. But I think if disk.DeviceID is not found, it shouldn't proceed further like executing dd at least.

path = fmt.Sprintf("/dev/disk/by-id/%s", disk.DeviceID)

from microceph.

sabaini avatar sabaini commented on June 15, 2024

I agree there needs to be better handling for the case where there's no /dev/disk/by-id/x

OTOH I'm also curious on why that disk wasn't found (using virtio shouldn't be a problem) -- if that disk indeed does exist?

If so, would you be able to provide some diagnostics @nobuto-m ?

sudo lsblk -f
sudo blkid /dev/vdc

from microceph.

sabaini avatar sabaini commented on June 15, 2024

Thanks @nobuto-m . Is the output of the ll /dev/disk/by-*/ truncated? Seems it's missing the by-id folder?

from microceph.

nobuto-m avatar nobuto-m commented on June 15, 2024

Fixed by #114

from microceph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.