Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

RedHat disk partition

Posted on 2012-03-23
7
700 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 40

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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 40

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 40

Accepted Solution

by:
noci earned 500 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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access_log 17 145
Linux haproxy: stop temporary haproxy service 9 47
Linux VM 6 101
Setup Ubuntu 16.04 to use LDAP for user login and authentication 2 57
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

789 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