Proxmox xfs setup error

surfaceartist

Member
May 14, 2020
13
1
8
36
Hi everyone hope u guys doing well.
am trying to setup one new ssd as xfs storage
In Node > Disks > Directory i clicked on create directory and selected that unused SSD and selected File system as xfs instead of ext4 after that i got error

Code:
# /sbin/sgdisk -n1 -t1:8300 /dev/sdd
The operation has completed successfully.
# /sbin/mkfs -t xfs /dev/sdd1
mkfs.xfs: /dev/sdd1 appears to contain an existing filesystem (ext4).
mkfs.xfs: Use the -f option to force overwrite.
TASK ERROR: command '/sbin/mkfs -t xfs /dev/sdd1' failed: exit code 1

i opened shell and executed the last failed common manually which executed without any error

Code:
mkfs -t xfs -f /dev/sdd1

but now when i try to create new VM and try to select storage this new xfs drive not appearing

Code:
lsblk
shows

Code:
sdd                             8:48   0 232.9G  0 disk
└─sdd1                          8:49   0 232.9G  0 part

so any idea how to fix it or unmount it so that can mount it as ext4 if have issues with xfs
 
you have to mount it (e.g. via fstab or systemd mount-unit) and add a new 'directory' storage that points to the mount poin
 
you have to mount it (e.g. via fstab or systemd mount-unit) and add a new 'directory' storage that points to the mount poin

ya i mount it like

Code:
# create Vm3 mount point
mkdir /mnt/pve/Vm3
# mounted to Vm3
mount /dev/sdd1 /mnt/pve/Vm3

but still proxmox is not detecting it nor it appear when i go to Node > Disks > Directory and try to add as Directory

Code:
lsblk

shows mounted it Vm3

Code:
sdd                  8:48   0    232.9G  0 disk
└─sdd1               8:49   0    232.9G  0 part /mnt/pve/Vm3

so any clue what am doing wrong

thanks
 
Last edited:
I have exactly the same issue.

I already deleted the partition using cfdisk, fdisk and gdisk
I recreated the gpt partition table from scratch using gdisk.
I tried to reinitialize the disk several times (always exiting with Task:OK )

Code:
proxmox-backup-manager disk initialize sdb

What I tried is

1. delete xfs partition using fdisk/cfdisk
2. create an ext4 partition using: proxmox-backup-manager disk fs create pve_backup --disk sdb --filesystem ext4 --add-datastore true
3. deleting the datastore: proxmox-backup-manager datastore remove pve_backup --destroy-data true --keep-job-configs false
4. unmounting the partition: umount /dev/sdb1
4. deleting the ext4 partition using fdisk
5. removing the pending mount script: rm /etc/systemd/system/mnt-datastore-pve_backup.mount
6. reinitialize the disk: proxmox-backup-manager disk initialize sdb
7. recreate the datastore with xfs: proxmox-backup-manager disk fs create pve_backup --disk sdb --filesystem xfs --add-datastore true

BUT it still fails

Code:
root@pbs:/# proxmox-backup-manager disk fs create pve_backup --disk sdb --filesystem xfs --add-datastore true
create datastore 'pve_backup' on disk sdb
TASK ERROR: command "mkfs" "-t" "xfs" "/dev/sdb1" failed - status code: 1 - mkfs.xfs: /dev/sdb1 appears to contain an existing filesystem (ext4).
mkfs.xfs: Use the -f option to force overwrite

It seems the partition table still contains information about the XFS partition on /dev/sdb.

Is there any chance to get rid of the partition table entry so that PBS can create the partition on the inialized disk without the need for '-f' (force).
Or can I somehow pass the -f switch to mkfs.xfs ?


Thanks in advance
Syracus
 
Hi,
I have exactly the same issue.

I already deleted the partition using cfdisk, fdisk and gdisk
I recreated the gpt partition table from scratch using gdisk.
I tried to reinitialize the disk several times (always exiting with Task:OK )

Code:
proxmox-backup-manager disk initialize sdb

What I tried is

1. delete xfs partition using fdisk/cfdisk
2. create an ext4 partition using: proxmox-backup-manager disk fs create pve_backup --disk sdb --filesystem ext4 --add-datastore true
3. deleting the datastore: proxmox-backup-manager datastore remove pve_backup --destroy-data true --keep-job-configs false
4. unmounting the partition: umount /dev/sdb1
4. deleting the ext4 partition using fdisk
5. removing the pending mount script: rm /etc/systemd/system/mnt-datastore-pve_backup.mount
6. reinitialize the disk: proxmox-backup-manager disk initialize sdb
7. recreate the datastore with xfs: proxmox-backup-manager disk fs create pve_backup --disk sdb --filesystem xfs --add-datastore true

BUT it still fails

Code:
root@pbs:/# proxmox-backup-manager disk fs create pve_backup --disk sdb --filesystem xfs --add-datastore true
create datastore 'pve_backup' on disk sdb
TASK ERROR: command "mkfs" "-t" "xfs" "/dev/sdb1" failed - status code: 1 - mkfs.xfs: /dev/sdb1 appears to contain an existing filesystem (ext4).
mkfs.xfs: Use the -f option to force overwrite

It seems the partition table still contains information about the XFS partition on /dev/sdb.

Is there any chance to get rid of the partition table entry so that PBS can create the partition on the inialized disk without the need for '-f' (force).
Or can I somehow pass the -f switch to mkfs.xfs ?


Thanks in advance
Syracus
please try using wipefs (see the man page) to erase the file system signatures. Just removing the partition doesn't remove those.
 

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!