Help us understand the problem. What is going on with this article?

LVMボリュームのマウントの仕方

More than 1 year has passed since last update.
apt install -y lvm2

マウント

ボリュームグループ名(VG)を確認

  • /dev/sdcがどのボリュームグループを持つか確認
$ sudo pvscan
  PV /dev/sde3   VG pve   lvm2 [148.55 GiB / 16.00 GiB free]
  Total: 1 [148.55 GiB] / in use: 1 [148.55 GiB] / in no VG: 0 [0   ]

今回はpveという名前のボリュームグループがあることがわかる。
ボリュームグループは/dev/ボリュームグループ名/ロジカルグループ名となる

ボリュームグループ内のロジカルボリューム名を確認

$ sudo lvscan
  inactive          '/dev/pve/swap' [4.00 GiB] inherit
  inactive          '/dev/pve/root' [37.25 GiB] inherit
  inactive          '/dev/pve/data' [91.30 GiB] inherit

ロジカルボリュームをシステムで利用できるようにする

$ sudo lvchange --available y /dev/pve/root
inactiveからACTIVEになる。
$ sudo lvscan
  inactive          '/dev/pve/swap' [4.00 GiB] inherit
  ACTIVE            '/dev/pve/root' [37.25 GiB] inherit
  inactive          '/dev/pve/data' [91.30 GiB] inherit
$ sudo mount /dev/mapper/pve-root /mnt/

アンマウント

$ sudo umount /mnt/

ロジカルボリュームをシステムから利用できなくする

$ sudo lvchange --available n /dev/pve/root
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away