安装 Ubuntu 16.04.1 后,我在硬盘的可用空间上创建了新分区。无法挂载

/dev/mapper/MYVGNAME--vg-images

在启动时。有人能帮助我吗?

此 id“df -h”输出:

Filesystem                          Size  Used Avail Use% Mounted on
    udev                                474M     0  474M   0% /dev
    tmpfs                                99M  3.2M   96M   4% /run
    /dev/mapper/MYVGNAME--vg-root        24G  1.6G   21G   8% /
    tmpfs                               492M     0  492M   0% /dev/shm
    tmpfs                               5.0M     0  5.0M   0% /run/lock
    tmpfs                               492M     0  492M   0% /sys/fs/cgroup
    /dev/sda1                           472M  101M  347M  23% /boot
    tmpfs                                99M     0   99M   0% /run/user/1000

这是“pvdisplay”输出:

 --- Physical volume ---
  PV Name               /dev/sda5
  VG Name               MYVGNAME-vg
  PV Size               126.52 GiB / not usable 2.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              32389
  Free PE               0
  Allocated PE          32389
  PV UUID               Xxxyyy-xxXx-XxxX-XXXX-Xxxx-XxXX-XXxXXX

这是“lvdisplay”输出:

  --- Logical volume ---
  LV Path                /dev/MYVGNAME-vg/root
  LV Name                root
  VG Name                MYVGNAME-vg
  LV UUID                Xxxyyy-xxXx-XxxX-XXXX-Xxxx-XxXX-XXxXXX
  LV Write Access        read/write
  LV Creation host, time MYHOSTNAME, 2016-09-15 11:08:02 +0200
  LV Status              available
  # open                 1
  LV Size                24.30 GiB
  Current LE             6221
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:0

  --- Logical volume ---
  LV Path                /dev/MYVGNAME-vg/swap_1
  LV Name                swap_1
  VG Name                MYVGNAME-vg
  LV UUID                Xxxyyy-xxXx-XxxX-XXXX-Xxxx-XxXX-XXxXXX
  LV Write Access        read/write
  LV Creation host, time MYHOSTNAME, 2016-09-15 11:08:03 +0200
  LV Status              available
  # open                 2
  LV Size                1020.00 MiB
  Current LE             255
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:1

  --- Logical volume ---
  LV Path                /dev/MYVGNAME-vg/images
  LV Name                images
  VG Name                MYVGNAME-vg
  LV UUID                Xxxyyy-xxXx-XxxX-XXXX-Xxxx-XxXX-XXxXXX
  LV Write Access        read/write
  LV Creation host, time MYHOSTNAME, 2016-09-15 14:50:07 +0200
  LV Status              available
  # open                 0
  LV Size                101.22 GiB
  Current LE             25913
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:2

这是“nano /etc/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/MYVGNAME--vg-root /               ext4    defaults 0       1
# /boot was on /dev/sda1 during installation
UUID=Xxxyyy-xxXx-XxxX-XXXX-Xxxx-XxXX-XXxXXX /boot           ext2    defaults        0       2
/dev/mapper/MYVGNAME--vg-swap_1 none            swap    sw              0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

想要这个:

Filesystem                            Size  Used Avail Use% Mounted on
udev                                  474M     0  474M   0% /dev
tmpfs                                  99M  3.2M   96M   4% /run
/dev/mapper/MYVGNAME--vg-root     24G  1.6G   21G   8% /
tmpfs                                 492M     0  492M   0% /dev/shm
tmpfs                                 5.0M     0  5.0M   0% /run/lock
tmpfs                                 492M     0  492M   0% /sys/fs/cgroup
/dev/sda1                             472M  101M  347M  23% /boot
tmpfs                                  99M     0   99M   0% /run/user/1000
/dev/mapper/MYVGNAME--vg-images  100G   60M   95G   1% /images

答案1

您需要在 /etc/fstab 文件中添加条目

sudo nano /etc/fstab

/dev/mapper/MYVGNAME--vg-root / ext4 默认值 0 1

/dev/mapper/MYVGNAME--vg-images /images ext4 默认值 0 1

相关内容