"unable to get device for partition 1"

Discussion in 'Proxmox VE: Installation and configuration' started by MoxProxxer, Apr 25, 2018.

  1. MoxProxxer

    MoxProxxer New Member

    Joined:
    Apr 25, 2018
    Messages:
    5
    Likes Received:
    0
    Hi.

    After h t t p s: // www .youtube.com/watch?v=z-q1WhZUICQ suggested pve 5.0 works out of the box on a C3000 based Atom system (they used a Supermicro platform) with eMMC, I tried my luck with the Gigabyte MA10-ST0 mainboard (h t t p s : //b2b.gigabyte.com/Server-Motherboard/MA10-ST0-rev-11#ov)

    Unfortunately I constantly get said error, and details show

    h t t p s: //i.imgur.com/nTm4tud.png

    However, the eMMC is ok, I tested it completely with dd, not a sign of i/o error.

    I'll try Debian for now, but it would ofc be nice if Proxmox would work "out of the box".

    edit:

    Debian 9.4 installed - went quite smooth.

    edit2:

    To clarify, I tried PVE 5.1 3rd release.
     
    #1 MoxProxxer, Apr 25, 2018
    Last edited: Apr 26, 2018
  2. MoxProxxer

    MoxProxxer New Member

    Joined:
    Apr 25, 2018
    Messages:
    5
    Likes Received:
    0
    LOL - so after almost one year, I retried with PVE 5.3 2nd release

    Same problem so I search da internetz and behold: I find my unanswered writeup here.

    :thumbsup:

    Maybe next year then.
    [​IMG]
     
  3. Stoiko Ivanov

    Stoiko Ivanov Proxmox Staff Member
    Staff Member

    Joined:
    May 2, 2018
    Messages:
    797
    Likes Received:
    65
    hmm - seems the installer currently has no support for mmcblk devices ...
    please open an enhancement request at https://bugzilla.proxmox.com

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. MoxProxxer

    MoxProxxer New Member

    Joined:
    Apr 25, 2018
    Messages:
    5
    Likes Received:
    0
    And by "enhancement" you certainly mean another mud puddle in get_partition_dev? (a pitty this forum doesn't allow for Perl syntax hilit)


    Code:
    sub get_partition_dev {
        my ($dev, $partnum) = @_;
    
        if ($dev =~ m|^/dev/sd([a-h]?[a-z]\|i[a-v])$|) {
        return "${dev}$partnum";
        } elsif ($dev =~ m|^/dev/[hxev]d[a-z]$|) {
        return "${dev}$partnum";
        } elsif ($dev =~ m|^/dev/[^/]+/c\d+d\d+$|) {
        return "${dev}p$partnum";
        } elsif ($dev =~ m|^/dev/[^/]+/d\d+$|) {
        return "${dev}p$partnum";
        } elsif ($dev =~ m|^/dev/[^/]+/hd[a-z]$|) {
        return "${dev}$partnum";
        } elsif ($dev =~ m|^/dev/nvme\d+n\d+$|) {
        return "${dev}p$partnum";
        } else {
        die "unable to get device for partition $partnum on device $dev\n";
        }
    
    }
    like this?

    Code:
    sub get_partition_dev {
        my ($dev, $partnum) = @_;
    
        if ($dev =~ m|^/dev/sd([a-h]?[a-z]\|i[a-v])$|) {
    	return "${dev}$partnum";
        } elsif ($dev =~ m|^/dev/[hxev]d[a-z]$|) {
    	return "${dev}$partnum";
        } elsif ($dev =~ m|^/dev/[^/]+/c\d+d\d+$|) {
    	return "${dev}p$partnum";
        } elsif ($dev =~ m|^/dev/[^/]+/d\d+$|) {
    	return "${dev}p$partnum";
        } elsif ($dev =~ m|^/dev/[^/]+/hd[a-z]$|) {
    	return "${dev}$partnum";
        } elsif ($dev =~ m|^/dev/mmcblk\d+p\d+$|) {      # tadaaaa "Enhancement"
    	return "${dev}$partnum";
        } elsif ($dev =~ m|^/dev/nvme\d+n\d+$|) {
    	return "${dev}p$partnum";
        } else {
    	die "unable to get device for partition $partnum on device $dev\n";
        }
    
    }
    
    So if you make a nice PVE 5.3 3rd release with this fixed, I will show you how I would have written that code.
     
  5. MoxProxxer

    MoxProxxer New Member

    Joined:
    Apr 25, 2018
    Messages:
    5
    Likes Received:
    0
    Good News Everyone! I managed to install Proxmox on top of a Debian 9.8 on this machine, so all is well.

    Well, ... except for the weird position of the proxmox team to software Raid "https://pve.proxmox.com/wiki/Software_RAID" - which is the exact opposite of currently (like 5 years ago) adopted best practices.

    https://www.freenas.org/blog/freenas-worst-practices/

    So yeah, use ZFS instead of hardware raid, but in case you do not want to use ZFS, you should be able to use the fine Linux mdadm. Now I know I can do it manually, but it seems Proxmox doesn't like/detect /dev/md* devices and certainly doesn't help to set them up out of the box.

    Maybe again something for enhancement.

    So given that, my question would be why Proxmox storage subsystem doesn't handle storage devices by uuid or somesuch in the first place?

    You know: /dev/disk/by-*
     
  6. Chris

    Chris Proxmox Staff Member
    Staff Member

    Joined:
    Jan 2, 2019
    Messages:
    117
    Likes Received:
    11
    Hi MoxProxxer,
    contributions from the community are always welcome! So if you have some code for us and want to improve PVE, simply follow the guidelines at https://pve.proxmox.com/wiki/Developer_Documentation and send us your patches. That's the magic of open source software projects :).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. MoxProxxer

    MoxProxxer New Member

    Joined:
    Apr 25, 2018
    Messages:
    5
    Likes Received:
    0
    Funny, I used that formulation in the 90ies. Which is the era some of the Proxmox Perl code seems to be from. Any chance to make anonymous contributions?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice