Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the lvremove deletion method?

2025-04-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "what is the lvremove deletion method". In the daily operation, I believe many people have doubts about what the lvremove deletion method is. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what is the lvremove deletion method?" Next, please follow the editor to study!

The cinder volume creation and management disks in openstack are actually lvm disks from the network managed by tgtadm.

Sometimes cinder volume has been in the state of creating or deleting, and the underlying disk cannot be used or deleted, which takes up a lot of disk space. Since it is managed by lvm, you can use lvm-related tools to delete it.

First find the lvm path of the volume to be deleted. Mine is: / dev/cinder-vol/volume-725230c0-558a-422a-b9aa-5f309ed42798

Direct lvremove / dev/cinder-vol/volume-725230c0-558a-422a-b9aa-5f309ed42798

The result reported an error: device-mapper: remove ioctl on failed: Device or resource busy. All right, the equipment is busy.

Look again: dmsetup info-c / dev/cinder-vol/volume-725230c0-558a-422a-b9aa-5f309ed42798

Name Maj Min Stat Open Targ Event UUID

Cinder--vol-volume--725230c0--558a--422a--b9aa--5f309ed42798 252 5 L murmurw 1 1 0 LVM-CMpL6mPY7LjVj3tIuF3YNvDyBtXqsmymJRiBrju5UXaoeWXxPqvAx9cLX3DlNTZI

You can see that an open of 1 means that it is turned on, so the remove is not dropped.

Look who opened it:

Fuser-m / dev/cinder-vol/volume-725230c0-558a-422a-b9aa-5f309ed42798

/ dev/dm-5: 5214

Its corresponding underlying block device is / dev/dm-5, probably because it has been mount, so try: umount / dev/dm-5

Umount: / dev/dm-5: not mounted

It turns out there is no mount.

It seems to be because tgtd uses this logical volume, take a look at:

Tgtadm-op show-mode target | grep 7252

Target 3: iqn.2010-10.org.openstack:volume-725230c0-558a-422a-b9aa-5f309ed42798

Backing store path: / dev/cinder-vol/volume-725230c0-558a-422a-b9aa-5f309ed42798

Sure enough, delete it: tgtadm-op show-mode target-op delete-tid 3

Let's take a look at the open status of the file.

Dmsetup info-c / dev/cinder-vol/volume-725230c0-558a-422a-b9aa-5f309ed42798

Name Maj Min Stat Open Targ Event UUID

Cinder--vol-volume--725230c0--558a--422a--b9aa--5f309ed42798 252 5 L murmurw 0 1 0 LVM-CMpL6mPY7LjVj3tIuF3YNvDyBtXqsmymJRiBrju5UXaoeWXxPqvAx9cLX3DlNTZI

Okay, now you can delete:

Lvremove / dev/cinder-vol/volume-725230c0-558a-422a-b9aa-5f309ed42798

At this point, the study on "what is the method of deleting lvremove" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 273

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report