?
Solved

RedHat disk partition

Posted on 2012-03-23
7
Medium Priority
?
740 Views
Last Modified: 2012-05-31
Can you explain what i am getting "doesn't contain a valid partition table" message below.
I just installed redhat 6. How do I fix this error.

[root@york pam.d]# fdisk -l

Disk /dev/sda: 26.8 GB, 26843545600 bytes
64 heads, 32 sectors/track, 25600 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000bcc2e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           2         501      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2             502       25600    25701376   8e  Linux LVM
Partition 2 does not end on cylinder boundary.

Disk /dev/mapper/vg_york-lv_root: 24.2 GB, 24201134080 bytes
255 heads, 63 sectors/track, 2942 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/vg_york-lv_root doesn't contain a valid partition table

Disk /dev/mapper/vg_york-lv_swap: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 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/vg_york-lv_swap doesn't contain a valid partition table
0
Comment
Question by:ittechlab
  • 3
  • 3
7 Comments
 
LVL 11

Expert Comment

by:jgiordano
ID: 37759088
can you run the following and add the output

pvs


vgs

lvs
0
 
LVL 41

Expert Comment

by:noci
ID: 37759340
fdisk -l tries to show you ALL partition tables of ALL block volumes.

Now it also counts an LVM volume as such a disk.
But only real drives CAN have usable partition tables.
- The LVM volumes are valid filesystemns (try fsck on them).
 
fdisk is only valid for /dev/hdX or /dev/sdX, not for LVM volumes.


fsck /dev/mapper/vg_york-lv_root
can be done when the volue is read only, or unmounted, not on a r/w mounted disk.
the swap partition can not be checked btw.
0
 

Author Comment

by:ittechlab
ID: 37820343
[root@named]# pvs
  PV         VG       Fmt  Attr PSize  PFree
  /dev/sda2  vg_ittech lvm2 a-   39.51g    0
  /dev/sdc1  vg.learn lvm2 a-    5.00g    0
  /dev/sdc3  my_grp   lvm2 a-   10.00g 5.00g
  /dev/sdd   newvg    lvm2 a-    5.00g 3.00g

[root@named]# vgs
  VG       #PV #LV #SN Attr   VSize  VFree
  my_grp     1   1   0 wz--n- 10.00g 5.00g
  newvg      1   1   0 wz--n-  5.00g 3.00g
  vg.learn   1   1   0 wz--n-  5.00g    0
  vg_ittech 1   2   0 wz--n- 39.51g    0

[root@named]# lvs
  LV      VG       Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  lvol0   my_grp   -wi-a-  5.00g
  lvname  newvg    -wi-ao  2.00g
  data    vg.learn -wi-a-  5.00g
  lv_root vg_ittech -wi-ao 35.57g
  lv_swap vg_ittech  -wi-ao  3.94g
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 41

Expert Comment

by:noci
ID: 37822712
So you a disk (/dev/sda) has a partition table, /dev/sda2 is a lvm volume
disk c partition 1 and 3 are lvm volumes and the Whole sdd disk is one lvm volume
/dev/sdd apearantly has no Partition table.

All the logicals volumes:
 lvol0   my_grp     (partition /dev/sdc3)
  lvname  newvg   (disk /dev/sdd)
  data    vg.learn   (partition /dev/sdc1)
  lv_root vg_ittech  (partition /dev/sda2)
  lv_swap vg_ittech (partition /dev/sda2)
Have no partition table, just a file system, which one depends on you mount instructins in /etc/fstab.
0
 

Author Comment

by:ittechlab
ID: 37897304
let me print my table
0
 

Author Comment

by:ittechlab
ID: 37966931
Disk /dev/mapper/vg_york-lv_swap doesn't contain a valid partition table

why this happen
0
 
LVL 41

Accepted Solution

by:
noci earned 1500 total points
ID: 37967680
Well a swap device doesn't have a partition table, but a swap file header.
Same for the root device, it has a filesystem header.
So if you do a generic search (fdisk -l) over devices you will get an error like this.
Because it sees a device that has no partition table...

Fdisk scans all devices it sees, and LVM volumes behave like devices.
[ partitions in devices are not itself devices. ]

The partition table is not more than the first block of a device with a special format.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy. ┬áThis article also serves as your NTP server documentation.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month12 days, 19 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question