0

I have a 25T hard drive with Ubuntu Bionic Beaver, and 23 of those is under a partition called /dev/mapper/vgdata-lvdata. I realize that is the device mapper, but I have no idea how to use it (as it seems to be a part of some intelligent system). Can I just put stuff in it like a normal folder? If not, how do I allocate that data to other "normal" partitions, or create a new one?

  • sounds like you want to read up on LVM2 in your distro's wiki or other documentation. You can pretty much do whatever you want with it... or get rid of it if you don't like, it all depends on your requirements / personal preferences. – frostschutz Sep 9 at 16:57
3

Things under /dev/mapper are block devices, like /dev/sda1. You would put a filesystem there (with mkfs) and then mount it somewhere (with mount, and making that permanent by putting it in /etc/fstab). All of this has probably already been done for you.

That is probably created and managed by the LVM toolset; try lvs, vgs, and pvs to list the objects in the system. If it's just being used as an alternative to a partition table, you can mostly ignore LVM. It won't matter for the day-to-day operation of the system.

Also, since (as of writing) hard drives do not come in 25T capacity — except for some very expensive SSDs — it is quite likely you actually have something more complicated than LVM on a single drive. You might have various layers of software or hardware RAID in there, too. Some of these layers need to be monitored to prevent/respond to any failures.

I suggest inquiring with whoever set up the system. That person should at least be able to tell you what you need to learn about.

  • Thanks for the explanation. Much of what you wrote is still unclear to me, although it is a good place to start my research. When you say it won't matter, does that mean I can use it as /dev/sda1 and store stuff there? :) – Cindy Almighty Sep 9 at 21:39
  • @CindyAlmighty in the basic setup, it works like a better version of a partition table. So, yeah, you store stuff on it just like you would /dev/sda1. It can do a lot more, but it doesn't unless you make it via one of the LVM commands. Someone has probably already set this up — so you're probably already using it. – derobert Sep 9 at 22:28
-1

As stated by @derobert, block devices inside the /dev/mapper folder are usually logical volumes created by LVM. Once you've created them, you can work with these block devices just like you would do with, for instance, a /dev/sda1 block device using the "mount" and "mkfs" utils.

To manage logical volumes, volume groups and physical volumes, you should use LVM's binaries, like lvs, pvs, vgs, lvcreate, pvcreate, and such.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.