Error messages when using pvcreate on CentOS 6.5
Posted: 2014/06/01 20:53:35
I have a dual boot system where I partitioned the HD: ~30 GB for Ubuntu 11.4 and ~47 GB for CentOS 6.5. I would like to make a separate logical partition for /tmp and /home on the CentOS side. However, when I enter.
I get
When I enter
I get the following
So I try to set up physical volumes with pvcreate and get the following results.
I'm guessing /dev/sda2 is the physical partition I am using for Ubuntu and I have not mouted that for security reasons. So I am guessing that is the reason for the error message.
I'm thiking /dev/sda1 is the boot partition but it forms a physical volume successfully. However, I would have thought that /dev/sda3 is the root partition so I thought it would be mounted already. Do I need to unmount it to make a physical volume from it? /dev/sda6 is presumably swap space. From what I have read, this could have its own partition or share an existing logical volume. However it is not clear to me why I was unable to form a physical volume from it. Does it also need to be unmounted?
Many thanks in advance,
OH
Code: Select all
sudo vgs
Code: Select all
No volume groups found
Code: Select all
sudo fdisk -l
Code: Select all
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 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: 0x8b8e8b8e
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 5953 9730 30336001 5 Extended
/dev/sda3 64 5953 47300608 83 Linux
/dev/sda5 5953 9600 29296640 83 Linux
/dev/sda6 9601 9730 1038336 82 Linux swap / Solaris
Partition table entries are not in disk order
Code: Select all
$ sudo pvcreate /dev/sda1
Physical volume "/dev/sda1" successfully created
$ sudo pvcreate /dev/sda2
dev_is_mpath: failed to get device for 8:2
dev_is_mpath: failed to get device for 8:2
Device /dev/sda2 not found (or ignored by filtering).
$ sudo pvcreate /dev/sda3
Can't open /dev/sda3 exclusively. Mounted filesystem?
$ sudo pvcreate /dev/sda5
dev_is_mpath: failed to get device for 8:5
Physical volume "/dev/sda5" successfully created
$ sudo pvcreate /dev/sda6
dev_is_mpath: failed to get device for 8:6
Can't open /dev/sda6 exclusively. Mounted filesystem?
I'm thiking /dev/sda1 is the boot partition but it forms a physical volume successfully. However, I would have thought that /dev/sda3 is the root partition so I thought it would be mounted already. Do I need to unmount it to make a physical volume from it? /dev/sda6 is presumably swap space. From what I have read, this could have its own partition or share an existing logical volume. However it is not clear to me why I was unable to form a physical volume from it. Does it also need to be unmounted?
Many thanks in advance,
OH