Having an issue creating a new datastore

agit8or

Member
Aug 1, 2018
17
0
6
53
┌──────┬─────────┬─────┬───────────┬────────────────┬───────────┬─────────┬─────────┐
│ name │ used │ gpt │ disk-type │ size │ model │ wearout │ status │
╞══════╪═════════╪═════╪═══════════╪════════════════╪═══════════╪═════════╪═════════╡
│ sda │ mounted │ 1 │ hdd │ 36003637100544 │ PERC_H700 │ - │ unknown │
├──────┼─────────┼─────┼───────────┼────────────────┼───────────┼─────────┼─────────┤
│ sdb │ unused │ 0 │ hdd │ 66000762437632 │ PERC_H800 │ - │ passed │
└──────┴─────────┴─────┴───────────┴────────────────┴───────────┴─────────┴─────────┘


root@pbs1:~# proxmox-backup-manager disk initialize sdb
initialize disk sdb
TASK OK
root@pbs1:~# proxmox-backup-manager disk fs create main --disk sdb --filesystem ext4 --add-datastore true
create datastore 'main' on disk sdb
TASK ERROR: command "mkfs" "-t" "ext4" "/dev/sdb1" failed - status code: 1 - mke2fs 1.44.5 (15-Dec-2018)
Found a dos partition table in /dev/sdb1


So I try to wipe the partition table out:

root@pbs1:~# dd if=/dev/zero of=/dev/sdb bs=512 count=1
1+0 records in
1+0 records out
512 bytes copied, 0.00118662 s, 431 kB/s
root@pbs1:~# proxmox-backup-manager disk list
┌──────┬─────────┬─────┬───────────┬────────────────┬───────────┬─────────┬─────────┐
│ name │ used │ gpt │ disk-type │ size │ model │ wearout │ status │
╞══════╪═════════╪═════╪═══════════╪════════════════╪═══════════╪═════════╪═════════╡
│ sda │ mounted │ 1 │ hdd │ 36003637100544 │ PERC_H700 │ - │ unknown │
├──────┼─────────┼─────┼───────────┼────────────────┼───────────┼─────────┼─────────┤
│ sdb │ unused │ 0 │ hdd │ 66000762437632 │ PERC_H800 │ - │ passed │
└──────┴─────────┴─────┴───────────┴────────────────┴───────────┴─────────┴─────────┘
root@pbs1:~#

At this point, if I repeat the initialize command, its the same outcome. If I try to create the datastore from here I get:

root@pbs1:~# proxmox-backup-manager disk fs create main --disk sdb --filesystem ext4 --add-datastore true
create datastore 'main' on disk sdb
TASK ERROR: command "sgdisk" "-n1" "-t1:8300" "/dev/sdb" failed - status code: 4 - Could not create partition 1 from 34 to 2047
Error encountered; not saving changes.


At this point I'm probably just overlooking something obvious.... So any suggestions are appreciated.
 
try wipefs -a /dev/sdb

does dmesg print any io errors ?
 
Last edited:
Is sdb with GPT or MBR Layout? ( Should be GPT )
Maybe also a hardware problem.
Check smart values of Harddisk and maybe change cable and/or sataport.
 
GPT. No HDD issues either. My solution was to manually partition, format, and mount the drive. Then I added the path as a datastore. Not sure why this couldnt be done via PBS either GUI or CLI.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!