디스크 마운트 문제

디스크 마운트 문제
[root@localhost ~]# fdisk -l

Disk /dev/xvdb: 2147.5 GB, 2147483648000 bytes
255 heads, 63 sectors/track, 261083 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00050ec0

    Device Boot      Start         End      Blocks   Id  System
/dev/xvdb1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/xvdb2              64      261084  2096638976   8e  Linux LVM

Disk /dev/xvda: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000effaf

    Device Boot      Start         End      Blocks   Id  System
/dev/xvda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/xvda2              64         653     4729856   8e  Linux LVM
Partition 2 does not end on cylinder boundary.

Disk /dev/mapper/VolGroup-lv_swap: 16.8 GB, 16844324864 bytes
255 heads, 63 sectors/track, 2047 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/VolGroup00-lv_root: 4303 MB, 4303355904 bytes
255 heads, 63 sectors/track, 523 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/VolGroup00-lv_swap: 536 MB, 536870912 bytes
255 heads, 63 sectors/track, 65 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/VolGroup-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/VolGroup-lv_home: 2076.4 GB, 2076423749632 bytes
255 heads, 63 sectors/track, 252444 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

[root@localhost ~]#

설치 드라이버

[root@localhost ~]# df
Filesystem           1K-blocks   Used Available Use% Mounted on
/dev/mapper/VolGroup00-lv_root
                       4005360 780156   3015080  21% /
tmpfs                  1475396      0   1475396   0% /dev/shm
/dev/xvda1              487652  52811    409241  12% /boot
[root@localhost ~]#

XenServer에 연결된 드라이브의 스크린샷

하드 디스크 드라이브

이 드라이브를 2TB 하드 드라이브에 어떻게 연결합니까 /mnt/? 나는 mount -t ext2 /dev/xvdb /mnt그것이 성공할 것이라고 생각했지만 시도한 모든 것이 실패했습니다.

/etc/fstab

#
# /etc/fstab
# Created by anaconda on Sun Aug 23 19:29:26 2015
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup00-lv_root /                       ext4    defaults        1 1
UUID=b9b08863-9a52-432a-b904-61a3144ce709 /boot                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_swap swap                    swap    defaults        0 0
/dev/mapper/VolGroup00-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0

설치된 드라이브

[root@localhost ~]# mount
/dev/mapper/VolGroup00-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/xvda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

uuid

[root@localhost ~]# ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx. 1 root root 10 Aug 23 21:37 31de66c0-cd8f-4f75-9bf6-7194dc43dafd -> ../../dm-4
lrwxrwxrwx. 1 root root 10 Aug 23 21:37 35a57414-2271-4db2-9f9a-09cf36c19044 -> ../../dm-0
lrwxrwxrwx. 1 root root 11 Aug 23 21:37 5a99aec9-7270-44ce-9df7-32ff4d70a75b -> ../../xvdb1
lrwxrwxrwx. 1 root root 10 Aug 23 21:37 986339d2-abd7-453f-8422-e8c1acb9368a -> ../../dm-2
lrwxrwxrwx. 1 root root 11 Aug 23 21:37 b9b08863-9a52-432a-b904-61a3144ce709 -> ../../xvda1
lrwxrwxrwx. 1 root root 10 Aug 23 21:37 c065a889-055d-44f2-bae4-0ac73d86d493 -> ../../dm-1
lrwxrwxrwx. 1 root root 10 Aug 23 21:37 e85cb70e-6403-4b06-a481-a1512140a491 -> ../../dm-3

답변1

귀하의 명령은 파티션이 아닌 장치를 마운트하려고 합니다.

대신 mount -t ext2 /dev/xvdb /mnt다음을 사용해 보세요.

mount -t ext4 /dev/xvdb2 /mnt

부팅 시 이 파티션이 자동으로 마운트되도록 하려면 fstab 파일에 파티션을 추가해야 합니다.

디스크의 UUID를 알아야 하며, ls -l /dev/disk/by-uuid/2TB 드라이브를 사용하여 찾을 수 있습니다. 디스크는 5a99aec9-7270-44ce-9df7-32ff4d70a75b인 것 같습니다.

/etc/fstab그런 다음 다음 줄을 편집하고 추가해야 합니다 .

UUID=5a99aec9-7270-44ce-9df7-32ff4d70a75b /mnt ext4 defaults 1 2

Ubuntu에 대한 포괄적인 가이드는 다음과 같습니다.https://help.ubuntu.com/community/AutomaticallyMountPartitions

관련 정보