简体   繁体   English

无法独占打开 /dev/sda2。 挂载的文件系统?

[英]Can't open /dev/sda2 exclusively. Mounted filesystem?

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 3999.7 GB, 3999688294400 bytes
255 heads, 63 sectors/track, 486267 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      267350  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.
/dev/sda2               1        2090    16785120   82  Linux swap / Solaris
/dev/sda3               1      218918  1758456029+  8e  Linux LVM

Partition table entries are not in disk order

Above is my "fdisk -l", my current problem is when I go and try to do "pvcreate /dev/sda2" it gives me "Can't open /dev/sda2 exclusively. Mounted filesystem?"以上是我的“fdisk -l”,我目前的问题是当我去尝试做“pvcreate /dev/sda2”时,它给了我“无法独占打开/dev/sda2。挂载的文件系统?” and I have been searching google for a while now trying to find a way to fix this.我一直在谷歌搜索一段时间,试图找到解决这个问题的方法。 There is defiantly things I tried from google but none of them ended up working.我从谷歌尝试了一些挑衅的事情,但没有一个最终能奏效。

You're trying to initialize a partition for use by LVM that's currently used by swap.您正在尝试初始化一个分区以供交换当前使用的 LVM 使用。

You should rather run你应该跑

pvcreate /dev/sda3

i updated to the new Kernel and the problem was resolved in RHEL 6 .我更新到新内核,问题在 RHEL 6 中得到解决。 Had upgraded from 2.6.32-131.x to 2.6.32-431.x已从 2.6.32-131.x 升级到 2.6.32-431.x

Check those disks/partition you are using, are not mounted to any directory on your system.检查您正在使用的那些磁盘/分区,是否未安装到系统上的任何目录。

If yes, umount them and try again.如果是,请卸载它们并重试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM