Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm runing Rhel 5.2 and I created a disk as following:
A. pvcreate /dev/cciss/c0d1
B. vgcreate /dev/vg01 /dev/cciss/c0d1
C. lvcreate –L 5000 –nlvol1 /dev/vg01 /dev/cciss/c0d1
D. mke2fs –j /dev/vg01/lvol1
E. Now create directory… mkdir /tmp99_mnt
F. Now vi /etc/fstab and add the following entry:
/dev/vg01/lvol9 /tmp99_mnt ext3 defaults 1 2
So I was bale to munt it and now as soon as I run "fdisk -l"
it says I do not have a valid partition table. So what do that mean and how what I need to do to ensure that I will not have any problem later.
i suspect because the PV metadata is written on the block device (c0d1) where the partition table would reside rather than creating a partition (c0d1p1) and pvcreate on it. I could be mistaken since i'm not familiar with cciss and am making an assumption based on the name.
How would I created the partition c0d0p1 first? If you have another disk and need to created it as a physical volume, then create a vollume group and the add a logical volume group and a file system to it what are the stpes you would do?
fdisk /dev/cciss/c0d1
n
p
1
<enter> for default first cylinder
<enter> for default last cylinder
t
8e
w
pvcreate /dev/cciss/c0d1p1
vgcreate /dev/vg01 /dev/cciss/c0d1p1
lvcreate –l 100%VG –n lvol1 /dev/vg01
mke2fs –j /dev/vg01/lvol1
here is an example from one of my boxes (not cciss, which is why i'm not certain on the naming of partitions for the device).
sdc is pvcreate directly on block device
sdd has pvcreate run on first partition
Code:
[root@example ~]# fdisk -l /dev/sd[cd]
Disk /dev/sdc: 1073 MB, 1073742336 bytes
34 heads, 61 sectors/track, 1011 cylinders
Units = cylinders of 2074 * 512 = 1061888 bytes
Device Boot Start End Blocks Id System
Disk /dev/sdd: 1073 MB, 1073742336 bytes
34 heads, 61 sectors/track, 1011 cylinders
Units = cylinders of 2074 * 512 = 1061888 bytes
Device Boot Start End Blocks Id System
[root@example ~]# fdisk /dev/sdd
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1011, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1011, default 1011):
Using default value 1011
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 8e
Changed system type of partition 1 to 8e (Linux LVM)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@example ~]# pvcreate /dev/sdc /dev/sdd1
Physical volume "/dev/sdc" successfully created
Physical volume "/dev/sdd1" successfully created
[root@example ~]# fdisk -l /dev/sd[cd]
Disk /dev/sdc: 1073 MB, 1073742336 bytes
34 heads, 61 sectors/track, 1011 cylinders
Units = cylinders of 2074 * 512 = 1061888 bytes
Disk /dev/sdc doesn't contain a valid partition table
Disk /dev/sdd: 1073 MB, 1073742336 bytes
34 heads, 61 sectors/track, 1011 cylinders
Units = cylinders of 2074 * 512 = 1061888 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 1011 1048376+ 8e Linux LVM
[root@example ~]#
hope this clears it up.
Last edited by rayfordj; 06-04-2009 at 09:07 AM.
Reason: 'quick post' before post completion
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.