Skip to main content
edited tags
Link
Jim L.
  • 8.8k
  • 1
  • 15
  • 29
deleted 67 characters in body
Source Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 263

I have two NVMe drives in my Proxmox computers. My problem is that the drive names are not persistent and change in connection with reinstallation or reboot. The problem is not specific to NVMe drives. The same would happen if it were SATA drives. What I need is a oneline command that returns the device name of my boot drive in the format /dev/nvme* or /dev/sd*. I need to use the command in connection with setting up my Proxmox computers via Ansible.

EDIT: I'm trying to be a little more specific about what I need. In Ansible, I have a list of available drives in the computer. In my case with NVMe drives, the list looks like this: [/dev/nvme0n1,/dev/nvme1n1]. If I had SATA drives the list could look like this: [/dev/sda,/dev/sdb,/dev/sdc]. In connection with setting up a Ceph cluster, I need a drive list excluding my boot drive. So, so I need a command that for example returns /dev/sda or /dev/nvme0n1. I then use that as a mask to remove the boot drive from the list of available drives.

I have two NVMe drives in my Proxmox computers. My problem is that the drive names are not persistent and change in connection with reinstallation or reboot. The problem is not specific to NVMe drives. The same would happen if it were SATA drives. What I need is a oneline command that returns the device name of my boot drive in the format /dev/nvme* or /dev/sd*. I need to use the command in connection with setting up my Proxmox computers via Ansible.

EDIT: I'm trying to be a little more specific about what I need. In Ansible I have a list of available drives in the computer. In my case with NVMe drives the list looks like this: [/dev/nvme0n1,/dev/nvme1n1]. If I had SATA drives the list could look like this: [/dev/sda,/dev/sdb,/dev/sdc]. In connection with setting up a Ceph cluster, I need a drive list excluding my boot drive. So I need a command that for example returns /dev/sda or /dev/nvme0n1. I then use that as a mask to remove the boot drive from the list of available drives.

I have two NVMe drives in my Proxmox computers. My problem is that the drive names are not persistent and change in connection with reinstallation or reboot. The problem is not specific to NVMe drives. The same would happen if it were SATA drives. What I need is a oneline command that returns the device name of my boot drive in the format /dev/nvme* or /dev/sd*. I need to use the command in connection with setting up my Proxmox computers via Ansible.

In Ansible, I have a list of available drives in the computer. In my case with NVMe drives, the list looks like this: [/dev/nvme0n1,/dev/nvme1n1]. If I had SATA drives the list could look like this: [/dev/sda,/dev/sdb,/dev/sdc]. In connection with setting up a Ceph cluster, I need a drive list excluding my boot drive, so I need a command that for example returns /dev/sda or /dev/nvme0n1. I then use that as a mask to remove the boot drive from the list of available drives.

Became Hot Network Question
Clarification
Source Link

I have two NVMe drives in my Proxmox computers. My problem is that the drive names are not persistent and change in connection with reinstallation or reboot. The problem is not specific to NVMe drives. The same would happen if it were SATA drives. What I need is a oneline command that returns the device name of my boot drive in the format /dev/nvme* or /dev/sd*. I need to use the command in connection with setting up my Proxmox computers via Ansible.

EDIT: I'm trying to be a little more specific about what I need. In Ansible I have a list of available drives in the computer. In my case with NVMe drives the list looks like this: [/dev/nvme0n1,/dev/nvme1n1]. If I had SATA drives the list could look like this: [/dev/sda,/dev/sdb,/dev/sdc]. In connection with setting up a Ceph cluster, I need a drive list excluding my boot drive. So I need a command that for example returns /dev/sda or /dev/nvme0n1. I then use that as a mask to remove the boot drive from the list of available drives.

I have two NVMe drives in my Proxmox computers. My problem is that the drive names are not persistent and change in connection with reinstallation or reboot. The problem is not specific to NVMe drives. The same would happen if it were SATA drives. What I need is a oneline command that returns the device name of my boot drive in the format /dev/nvme* or /dev/sd*. I need to use the command in connection with setting up my Proxmox computers via Ansible.

I have two NVMe drives in my Proxmox computers. My problem is that the drive names are not persistent and change in connection with reinstallation or reboot. The problem is not specific to NVMe drives. The same would happen if it were SATA drives. What I need is a oneline command that returns the device name of my boot drive in the format /dev/nvme* or /dev/sd*. I need to use the command in connection with setting up my Proxmox computers via Ansible.

EDIT: I'm trying to be a little more specific about what I need. In Ansible I have a list of available drives in the computer. In my case with NVMe drives the list looks like this: [/dev/nvme0n1,/dev/nvme1n1]. If I had SATA drives the list could look like this: [/dev/sda,/dev/sdb,/dev/sdc]. In connection with setting up a Ceph cluster, I need a drive list excluding my boot drive. So I need a command that for example returns /dev/sda or /dev/nvme0n1. I then use that as a mask to remove the boot drive from the list of available drives.

Source Link
Loading