14.04挂载未知 文件系统 类型\'lvm2_member\'

・7 分钟阅读

问题

从14.04升级到16.06后系统失败。


pst007x@Home-Server:~$ sudo mount /dev/sdb5 /media/newhd


[sudo] password for pst007x: 


mount: unknown filesystem type 'LVM2_member'


pst007x@Home-Server:~$ 



我从repos安装了'lvm2 ',并且gparted可以看到驱动器,但是,Nautilus不能看到驱动器,因此不能挂载。

编辑:


I tried this:



pst007x@Home-Server:~$ sudo apt-get install lvm2


Reading package lists... Done


Building dependency tree 


Reading state information... Done


lvm2 is already the newest version (2.02.133-1ubuntu10).


0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.


pst007x@Home-Server:~$ sudo vgs


 VG #PV #LV #SN Attr VSize VFree 


 ubuntu-vg 1 2 0 wz--n- 465.28g 0 


 ubuntu-vg 1 2 0 wz--n- 465.52g 52.00m


pst007x@Home-Server:~$ sudo vgscan


 Reading all physical volumes. This may take a while...


 Found volume group"ubuntu-vg" using metadata type lvm2


 Found volume group"ubuntu-vg" using metadata type lvm2


pst007x@Home-Server:~$ sudo lvs


 LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert


 root ubuntu-vg -wi-ao---- 461.28g 


 root ubuntu-vg -wi------- 461.47g 


 swap_1 ubuntu-vg -wi------- 4.00g 


 swap_1 ubuntu-vg -wi-ao---- 4.00g 


pst007x@Home-Server:~$ sudo modprobe dm-mod


pst007x@Home-Server:~$ sudo vgscan


 Reading all physical volumes. This may take a while...


 Found volume group"ubuntu-vg" using metadata type lvm2


 Found volume group"ubuntu-vg" using metadata type lvm2


pst007x@Home-Server:~$ sudo vgchange -ay ubuntu-vg


 device-mapper: create ioctl on ubuntu--vg-rootLVM-xhGIrhlZUAJeJA3fWJOOSvuTUO3vZOH9tqZgBj8dGOLHoYzCStcE02NcX8UGpglD failed: Device or resource busy


 1 logical volume(s) in volume group"ubuntu-vg" now active


pst007x@Home-Server:~$ ls /mnt/


fcroot


pst007x@Home-Server:~$ ls /dev/mapper


control ubuntu--vg-root ubuntu--vg-swap_1


pst007x@Home-Server:~$ sudo vgscan


 Reading all physical volumes. This may take a while...


 Found volume group"ubuntu-vg" using metadata type lvm2


 Found volume group"ubuntu-vg" using metadata type lvm2


pst007x@Home-Server:~$ sudo lvscan


 ACTIVE '/dev/ubuntu-vg/root' [461.28 GiB] inherit


 inactive '/dev/ubuntu-vg/swap_1' [4.00 GiB] inherit


 inactive '/dev/ubuntu-vg/root' [461.47 GiB] inherit


 ACTIVE '/dev/ubuntu-vg/swap_1' [4.00 GiB] inherit


pst007x@Home-Server:~$ 




回答1

你新卷组和旧卷组使用了完全相同的名称(ubuntu-vg)。你必须给他们设置唯一的名字,你可以使用vgrename和它的UUID来重命名其中一个组。

查找带有vgdisplay的UUID,然后重命名卷组:


vgrename <VG UUID> new_name




回答2

你使用了不正确的语法,下面是我的"fstab"文件的副本,注意挂载逻辑卷的语法。


# /etc/fstab: static file system information.


#


# Use 'blkid' to print the universally unique identifier for a


# device; this may be used with UUID= as a more robust way to name devices


# that works even if disks are added and removed. See fstab(5).


#


# <file system> <mount point> <type> <options> <dump> <pass>


/dev/mapper/ubuntu--vg-root / ext4 errors=remount-ro 0 1



# Logical volume for home


/dev/mapper/ubuntu--vg-newhome /home ext4 errors=remount-ro 0 2



# /boot was on /dev/sda1 during installation


# Boot volume (partition) Not part of Logical Volume Management (LVM)


UUID=ed575497-3e49-43ae-aaf6-2f482b516a2b /boot ext2 defaults 0 2



# Swap volume (partition) Uses Logical Volume Management (LVM)


/dev/mapper/ubuntu--vg-swap_1 none swap sw 0 0



#Mount Western Digital Passport Drive On Router - Not part of Logical Volume Management (LVM)


//rt-n56u/sda1 /media/My_Passport cifs file_mode=0777,dir_mode=0777,rw,guest,sec=ntlm,uid=1000,forceuid,gid=34,forcegid,nofail 0 0



你还可以使用以下命令在LVM下查看磁盘驱动器布局:

 
sudo lvdisplay



 

回答3

这不是LV挂载的方式,你缺少一些重要的部分。

你可以用lvdisplay来做,你会看到,

LV Path/dev/books-vg/books_volume

因此,你需要格式化这个分区,并且创建文件系统:


mkfs.ext4 /dev/books-vg/books_volume



输出看起来类似于


mke2fs 1.42.13 (17-May-2015) 


Creating filesystem with 13107200 4k blocks and 3276800 inodes 


Filesystem UUID: f00a7051-6203-4c18-9d95-b589aae48606 


Superblock backups stored on blocks: 


 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,


 4096000, 7962624, 11239424 



Allocating group tables: done 


Writing inode tables: done 


Creating journal (32768 blocks): done 


Writing superblocks and filesystem accounting information: done 



现在,你可以挂载卷了:


mount /dev/books-vg/books_volume /mnt




讨论
Tianye profile image