Solved

RedHat disk partition

Posted on 2012-03-23
7
688 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

861 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now