LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A valid Partition Table (https://www.linuxquestions.org/questions/linux-newbie-8/a-valid-partition-table-730435/)

rbell54 06-03-2009 11:21 AM

A valid Partition Table
 
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.

rayfordj 06-03-2009 11:25 AM

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.

:study:

rbell54 06-04-2009 07:15 AM

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?

rayfordj 06-04-2009 09:01 AM

Code:

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.
:study:

saagar 06-04-2009 10:53 AM

I wonder how /dev/cciss/c0d1 sort of disk naming convention(solaris-type) comes under Rhel.

rayfordj 06-04-2009 03:32 PM

cciss is the module for HP Smart Array Controllers

saagar 06-04-2009 08:08 PM

ok thanks


All times are GMT -5. The time now is 07:33 PM.