作为一名业余爱好者,我在安装最新的 Ubuntu Server LTS 后尝试将 /dev/sda3 分区挂载到挂载点
$ sudo mount /dev/sda3 /home/xxxx/bake-buddy
mount: /home/xxxx/bake-buddy: unknown filesystem type 'LVM2_member'.
我找到了这篇文章并尝试按照那里的回答步骤进行操作挂载未知文件系统类型‘lvm2_member’
root@tez:/home/xxxx# lvscan
ACTIVE '/dev/ubuntu/ubuntu-lv' [235.42 GiB] inherit
root@tez:/home/xxxx# mount /dev/ubuntu/ubuntu-lv /home/xxxx/bake-buddy
root@tez:/home/xxxx# < no error >
但是当我查看 /home/xxxx/bake-buddy 目录时,它与根目录内容相同,所以我有些东西被积压了。你能从下面的显示中看出我需要清理什么吗?还是我应该重新安装?
root@tez:/home/xxxx# vgdisplay
--- Volume group ---
VG Name ubuntu
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 235.42 GiB
PE Size 4.00 MiB
Total PE 60268
Alloc PE / Size 60268 / 235.42 GiB
Free PE / Size 0 / 0
VG UUID XXXX-etc etc
root@tez:/home/xxxx# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 62M 1 loop /snap/core20/1587
loop1 7:1 0 63.2M 1 loop /snap/core20/1695
loop2 7:2 0 79.9M 1 loop /snap/lxd/22923
loop3 7:3 0 103M 1 loop /snap/lxd/23541
loop4 7:4 0 49.6M 1 loop /snap/snapd/17883
sda 8:0 0 238.5G 0 disk
├─sda1 8:1 0 1G 0 part /boot/efi
├─sda2 8:2 0 2G 0 part /boot
└─sda3 8:3 0 235.4G 0 part
└─ubuntu-ubuntu--lv 253:0 0 235.4G 0 lvm /
root@tez:/# df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.6G 1.7M 1.6G 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 98G 7.5G 86G 9% /
tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda2 2.0G 246M 1.6G 14% /boot
/dev/sda1 1.1G 5.3M 1.1G 1% /boot/efi
tmpfs 1.6G 4.0K 1.6G 1% /run/user/1000
编辑:根据第一条评论,随后https://unix.stackexchange.com/questions/339011/how-do-i-mount-an-lvm-partition/339621#339621,运行以下步骤:
sudo pvscan
PV /dev/sda3 VG ubuntu lvm2 [235.42 GiB / 0 free]
Total: 1 [235.42 GiB] / in use: 1 [235.42 GiB] / in no VG: 0 [0 ]
sudo vgscan --mknodes
Found volume group "ubuntu" using metadata type lvm2
sudo vgchange -ay
1 logical volume(s) in volume group "ubuntu" now active
sudo lvscan
ACTIVE '/dev/ubuntu/ubuntu-lv' [235.42 GiB] inherit
sudo mount /dev/ubuntu/ubuntu-lv /home/xxxx/bake-buddy
<no error>
列出了 /home/xxxx/bake-buddy 的内容,这是根目录列表,这不是我想要的。看起来我应该重新安装