AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1292657
Accepted
walrii
walrii
Asked: 2020-11-16 16:33:53 +0800 CST2020-11-16 16:33:53 +0800 CST 2020-11-16 16:33:53 +0800 CST

如何挂载全新的逻辑卷?

  • 772

全新的硬盘驱动器 (/dev/sdb)。没有关于它的数据(可以尝试大多数事情)。Ubuntu 20.04。由于我的主驱动器是 SSD,我决定创建一个新的卷组 hdd-vg。我创建了 VG、LV 和 PG,看似成功(见下文),但每当我尝试挂载它或将其放入 fstab 时,都会出现错误。是不是需要格式化什么的?

# mount /dev/mapper/hdd--vg-hdd--lv1 /mnt/hdd
mount: /mnt/hdd: wrong fs type, bad option, bad superblock on /dev/mapper/hdd--vg-hdd--lv1, missing codepage or helper program, or other error.

# mount /dev/hdd-vg/hdd-lv1 /mnt/hdd
mount: /mnt/hdd: wrong fs type, bad option, bad superblock on /dev/mapper/hdd--vg-hdd--lv1, missing codepage or helper program, or other error.

在下面的数据中,我经常排除系统上其他驱动器/逻辑的信息。

# fdisk -l
Disk /dev/sdb: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000DM010-2EP1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mapper/ubuntu--vg-root: 236.102 GiB, 254472617984 bytes, 497016832 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/ubuntu--vg-swap_1: 976 MiB, 1023410176 bytes, 1998848 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/hdd--vg-hdd--lv1: 931.52 GiB, 1000203091968 bytes, 1953521664 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


# vgdisplay
  --- Volume group ---
  VG Name               hdd-vg
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               931.51 GiB
  PE Size               4.00 MiB
  Total PE              238467
  Alloc PE / Size       238467 / 931.51 GiB
  Free  PE / Size       0 / 0   
  VG UUID               M23YyM-NJQD-SkFS-Omat-5cxw-5Aeg-8hwzjm

# lvdisplay
  --- Logical volume ---
  LV Path                /dev/hdd-vg/hdd-lv1
  LV Name                hdd-lv1
  VG Name                hdd-vg
  LV UUID                ysuHKI-BYfZ-CcKF-3PGY-t66M-3CjW-jvcu9f
  LV Write Access        read/write
  LV Creation host, time brjarvis-desktop2, 2020-11-15 16:20:39 -0700
  LV Status              available
  # open                 0
  LV Size                931.51 GiB
  Current LE             238467
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sdb
  VG Name               hdd-vg
  PV Size               931.51 GiB / not usable 1.71 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              238467
  Free PE               0
  Allocated PE          238467
  PV UUID               T8IQyK-dk3H-JBrh-Oi1X-2ede-QWOs-JPqHeQ

# lvscan
  ACTIVE            '/dev/hdd-vg/hdd-lv1' [931.51 GiB] inherit
  ACTIVE            '/dev/ubuntu-vg/root' [<237.00 GiB] inherit
  ACTIVE            '/dev/ubuntu-vg/swap_1' [976.00 MiB] inherit

# ls /dev/mapper -l
total 0
crw------- 1 root root 10, 236 Nov 15 15:41 control
lrwxrwxrwx 1 root root       7 Nov 15 16:20 hdd--vg-hdd--lv1 -> ../dm-2
lrwxrwxrwx 1 root root       7 Nov 15 15:41 ubuntu--vg-root -> ../dm-0
lrwxrwxrwx 1 root root       7 Nov 15 15:41 ubuntu--vg-swap_1 -> ../dm-1

# ls /dev/hdd* -l
total 0
lrwxrwxrwx 1 root root 7 Nov 15 16:20 hdd-lv1 -> ../dm-2
mount lvm hard-drive 20.04
  • 1 1 个回答
  • 1114 Views

1 个回答

  • Voted
  1. Best Answer
    WU-TANG
    2020-11-16T18:10:18+08:002020-11-16T18:10:18+08:00

    您是否为 lvm 创建了文件系统???

    sudo mkfs -t ext4 /dev/mapper/hdd--vg-hdd--lv1
    (ext4 或您选择使用的任何文件系统)

    • 3

相关问题

  • 将 USB 磁盘挂载到永久位置

  • 修复 USB 驱动器自动通知

  • 是否有更好的方式为 /home/userX 构建分区/挂载

  • 当另一个文件系统安装在路径上时是否可以删除文件?

  • 如何检查/修改预装系统上的 LVM 状态?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve