HPE Morpheus VM Essentials
1851230 Members
2759 Online
104057 Solutions
New Discussion

Re: Can't create a local datastore

 
abedard
Occasional Contributor

Can't create a local datastore

Trying to create a datastore on the localdisk of a standalone host.

Volumje already exists

Storage > Datastores > add
Try to add a 'Directory Pool' and it prompts you to enter a 'cloud' and it's an empty field and won't let you proceed.

What am I missing?

5 REPLIES 5
dccolpitts
Advisor

Re: Can't create a local datastore

Navigate to Infrastructure (1) --> Clusters (2) --> Select your cluster (3) --> Storage (4) --> Add (5).  And you should then be good to go.2026.01.12 - 20.55.07 - SNAGIT - 0054.jpg

dcc

abedard
Occasional Contributor

Re: Can't create a local datastore

That works, but my volume is missing

All I see is a 100gb volume, which I believe is localstorage of the VM-Manager appliance? Or maybe the local partition for the Morpheus server?

The host has a 2.4TB local storage volume that I need to mount to store VMs in it.

PeterTzvetanov
HPE Pro

Re: Can't create a local datastore

  1. Identify the New Disk

First, identify the new disk device you'll be using. You can use commands like lsblk or sudo fdisk -l to list available disks. For this guide, let's assume the new disk is /dev/sdb. 
       2. Partition the New Disk 

Create a new partition on the disk if it doesn't have one already. You can use a tool like cfdisk for this: 

sudo cfdisk /dev/sdb

Follow the on-screen prompts to create a new partition, typically using the entire disk, and then write the changes to the disk. 

      3. Initialize the Partition as a Physical Volume (PV)

Use the pvcreate command to initialize the new partition as a LVM physical volume: 

sudo pvcreate /dev/sdb1 # Replace sdb1 with your actual partition
      4. Create a New Volume Group (VG)

Now, create a new volume group using the PV you just created: 

sudo vgcreate my_new_vg  /dev/sdb1 # Replace my_new_vg with your desired VG name
      5. Create a Logical Volume (LV)

Create a logical volume within the new volume group. This is the actual "disk" that you'll format and use: 

sudo lvcreate -L 2T -n my_logical_volume my_new_vg # Creates a 2TB logical volume

You can adjust -L 2T to your desired size and -n my_logical_volume to your preferred LV name.
      6. Create a Filesystem on the Logical Volume 

Format the logical volume with a filesystem, such as ext4: 

sudo mkfs.ext4 /dev/my_new_vg/my_logical_volume
     7. Mount the Filesystem

Create a directory where you'll mount the filesystem and then mount it: 

sudo mkdir /mnt/my_new_storage
sudo mount /dev/my_new_vg/my_logical_volume /mnt/my_new_storage
     8. Make the Mount Persistent (Optional)

To make the mount persistent across reboots, add an entry to /etc/fstab: 

echo "/dev/my_new_vg/my_logical_volume /mnt/my_new_storage ext4 defaults 0 2" | sudo tee -a /etc/fstab
     9. Verify

You can now check your new storage using df -h: 

df -h



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
abedard
Occasional Contributor

Re: Can't create a local datastore

There appears to already be a partition on SBD3 for the OS at 100gb.

What we are trying to do is make the other 2.2TB available for storing Virtual Machines.

 

administrator@vme01:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 279.4G 0 disk
├─sda1 8:1 0 100M 0 part
├─sda2 8:2 0 16M 0 part
├─sda3 8:3 0 278.7G 0 part
└─sda4 8:4 0 523M 0 part
sdb 8:16 0 2.2T 0 disk
├─sdb1 8:17 0 1G 0 part /boot/efi
├─sdb2 8:18 0 2G 0 part /boot
└─sdb3 8:19 0 2.2T 0 part
└─ubuntu--vg-ubuntu--lv 252:0 0 100G 0 lvm /
sdc 8:32 1 0B 0 disk

 


administrator@vme01:~$ sudo pvcreate /dev/sdb3
[sudo] password for administrator:
Can't initialize physical volume "/dev/sdb3" of volume group "ubuntu-vg" without -ff
/dev/sdb3: physical volume not initialized.

PeterTzvetanov
HPE Pro

Re: Can't create a local datastore

Hi,

it looks like you have installed the ubuntu instead of the 1st drive with 279GB and use the second for your data(Ubuntu installer does that always if there is a second disk, to select automatically the second disk instead of the first).

If the drive is having already a partition like ubuntu volume group, it should be fine with this 3 commands:

pvresize /dev/sdb3


lvextend -l +100%FREE  /dev/ubuntu-vg/ubuntu-lv


resize2fs /dev/ubuntu-vg/ubuntu-lv



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo