Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
mpathc is the device, and mpathcp1 is the first partition. It's just like /dev/sda vs. /dev/sda1, only with mpath devices, the partition number is preceded by a 'p'.
The device busy error would suggest that mpathc was in use (e.g., /dev/mapper/mpathcp1 is mounted or part of a LVM volume group, etc.). Running kpartx on mpathcp1 wouldn't do anything, since that is a partition.
mpathc is the device, and mpathcp1 is the first partition. It's just like /dev/sda vs. /dev/sda1, only with mpath devices, the partition number is preceded by a 'p'.
The device busy error would suggest that mpathc was in use (e.g., /dev/mapper/mpathcp1 is mounted or part of a LVM volume group, etc.). Running kpartx on mpathcp1 wouldn't do anything, since that is a partition.
Thanks for the response. So is it safe to format mpathcp1 without running kpartx? I'm new to this and I'm just following the online guides I found through google.
Assuming by format, you mean put a file system onto mpathcp1, then yes. It can be used like any other partition - you do a mkfs and mount it, add it to an LVM group, etc.
Because you got a device busy, you should double-check it's not already being used. If you do a 'blkid /dev/mapper/mpathcp1', it will tell you if it's already configured for use. If it's in use, blkid will give you the UUID and TYPE (e.g. file system type, LVM, LUKS, etc.).
You can partition it on the OS side. The /dev/mapper/mpathX device can be treated like any other disk. You partition it the same, and use the partitions the same.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.