Solved

RedHat disk partition

Posted on 2012-03-23
7
674 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
Comment Utility
can you run the following and add the output

pvs


vgs

lvs
0
 
LVL 39

Expert Comment

by:noci
Comment Utility
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
Comment Utility
[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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 39

Expert Comment

by:noci
Comment Utility
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
Comment Utility
let me print my table
0
 

Author Comment

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

why this happen
0
 
LVL 39

Accepted Solution

by:
noci earned 500 total points
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
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 find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

743 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

16 Experts available now in Live!

Get 1:1 Help Now