pveceph createosd /dev/sdb -fstype btrfs how to force ?

Q-wulf

Well-Known Member
Mar 3, 2013
613
38
48
my test location
pveceph createosd /dev/sdb -fstype btrfs

gives me the following output:


pveceph createosd /dev/sdb -fstype btrfs
create OSD on /dev/sdb (btrfs)
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.


****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
Creating new GPT entries.
The operation has completed successfully.
Setting name!
partNum is 1
REALLY setting name!
The operation has completed successfully.
Setting name!
partNum is 0
REALLY setting name!
The operation has completed successfully.
/dev/sdb1 appears to contain an existing filesystem (xfs).
Error: Use the -f option to force overwrite.
ceph-disk: Error: Command '['/sbin/mkfs', '-t', 'btrfs', '-m', 'single', '-l', '32768', '-n', '32768', '--', '/dev/sdb1']' returned non-zero exit status 1
command 'ceph-disk prepare --zap-disk --fs-type btrfs --cluster ceph --cluster-uuid 78f04b5c-c8af-4b55-bbbc-459f4f34c7e8 /dev/sdb' failed: exit code 1


How can i force the overwrite ?

I looked into
man pveceph

Code:
       pveceph createosd <dev> [OPTIONS]


          Create OSD


          <dev>      string


                    Block device name.


          -fstype    (btrfs | ext4 | xfs)   (default=xfs)


                    File system type.


          -journal_dev string


                    Block device name for journal.

no word on forcing the overwrite tho.
 
i found a "workaround" ... i think... at least half of it ...

mkfs.btrfs -l 32768 -n 32768 -f /dev/sdb
reboot
umount /dev/sdb1
ceph-disk prepare --zap-disk --cluster ceph --cluster-uuid 78f04b5c-c8af-4b55-bbbc-459f4f34c7e8 /dev/sdb
reboot
ceph-disk activate-all
puts it into the OSD-list on proxmox.

Feels somewhat counter-intuitive and i'm having issues to remove the osd afterwards using

pveceph destroyosd 0
osd is still running (up == 1)

down or out from gui keeps timing out.
after a reboot the gui doesn't even load.


pretty sure thats NOT the way to go.

Any ideas ??
 
I guess you just need to cleanup/wipe the partition table on that disk before using cteateosd (gdisk/sgdisk --zap)
 
I guess you just need to cleanup/wipe the partition table on that disk before using cteateosd (gdisk/sgdisk --zap)


as part of my "setup-routine" i already ran
Code:
ceph-disk zap /dev/sdb
before using mkfs.btrfs /dev/sdb

or do you mean before using
Code:
pveceph createosd /dev/sdb
????


Afaik that command as part of its routine already runs --zap


could you explain in more detail ?

kind regards,
Q-Wulf
 
Last edited:

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!