Project

General

Profile

Bug #43858

ceph-volume: lvm zap requires `/dev/` prefix

Added by Sebastian Wagner 6 months ago. Updated 6 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

This is different to the other lvm commands:

preparing:

root@ubuntu:~# losetup -f
/dev/loop12
root@ubuntu:~# LANG=C losetup /dev/loop12 disk-image
root@ubuntu:~# pvcreate /dev/loop12
  Physical volume "/dev/loop12" successfully created.
root@ubuntu:~# vgcreate MyVg /dev/loop12
  Volume group "MyVg" successfully created
root@ubuntu:~# lvcreate --size 5500M --name MyLV MyVg
  Logical volume "MyLV" created.
root@ubuntu:~# ll /dev/MyVg/MyLV 
lrwxrwxrwx 1 root root 7 Jan 28 11:38 /dev/MyVg/MyLV -> ../dm-0
root@ubuntu:~# vgs -o vg_tags MyVg
  VG Tags

root@ubuntu:~# vgs -o lv_tags MyVg
  LV Tags
# ceph-volume lvm zap MyVg/MyLV
 stderr: lsblk: MyVg/MyLV: kein blockorientiertes Gerät
 stderr: blkid: Fehler: MyVg/MyLV: Datei oder Verzeichnis nicht gefunden
 stderr: Unknown device, --name=, --path=, or absolute path in /dev/ or /sys expected.
usage: ceph-volume lvm zap [-h] [--destroy] [--osd-id OSD_ID]
                           [--osd-fsid OSD_FSID]
                           [DEVICES [DEVICES ...]]
ceph-volume lvm zap: error: Unable to proceed with non-existing device: MyVg/MyLV
# ceph-volume lvm zap /dev/MyVg/MyLV
--> Zapping: /dev/MyVg/MyLV
Running command: /bin/dd if=/dev/zero of=/dev/MyVg/MyLV bs=1M count=10
 stderr: 10+0 Datensätze ein
10+0 Datensätze aus
10485760 Bytes (10 MB, 10 MiB) kopiert, 0,00413076 s, 2,5 GB/s
--> Zapping successful for: <LV: /dev/MyVg/MyLV>

History

#2 Updated by Jan Fajerski 6 months ago

Hmm something is weird with lvm and containers. Just in a vm this works just fine:

node1:~ # CEPH_VOLUME_DEBUG=true ceph-volume lvm zap myvg/mvlv
 stderr: unable to read label for myvg/mvlv: (2) No such file or directory
 stderr: 2020-01-28T15:55:00.177+0100 7f33d51ba180 -1 bluestore(myvg/mvlv) _read_bdev_label failed to open myvg/mvlv: (2) No such file or directory
--> Zapping: /dev/myvg/mvlv
Running command: /usr/bin/dd if=/dev/zero of=/dev/myvg/mvlv bs=1M count=10 conv=fsync
 stderr: 10+0 records in
10+0 records out
 stderr: 10485760 bytes (10 MB, 10 MiB) copied, 0.0274007 s, 383 MB/s
--> Zapping successful for: <LV: /dev/myvg/mvlv>
node1:~ # CEPH_VOLUME_DEBUG=true ceph-volume lvm zap /dev/myvg/mvlv
 stderr: unable to read label for /dev/myvg/mvlv: (2) No such file or directory
--> Zapping: /dev/myvg/mvlv
Running command: /usr/bin/dd if=/dev/zero of=/dev/myvg/mvlv bs=1M count=10 conv=fsync
 stderr: 10+0 records in
10+0 records out
 stderr: 10485760 bytes (10 MB, 10 MiB) copied, 0.0250118 s, 419 MB/s
--> Zapping successful for: <LV: /dev/myvg/mvlv>
node1:~ #

Also available in: Atom PDF