Skip to contentSkip to conversation

Problem with partition table on LV

linux-lvm Mufit Eribol 2 participants 3 messages Mar 29, 2008 – Apr 10, 2008

lore
Share & tools
lore
#0 lore raw

Hello,

After loosing all the data on my production server by issuing wrong lvm commands in restoring the logical volume, I have worked for weeks to setup my server again from scratch up. Now, today I noticed another problem, but scared to death to touch it.

This time I have to ask you before issuing any commands as obviously I haven't learned LVM internals.

Please find the details below. I would appreciate any help.

Thanks,
Mufit

Problem:
The system works but fdisk -l gives the following error:

[root@server ~]# fdisk -l
...
Device Boot Start End Blocks Id System

Disk /dev/sdc: 799.9 GB, 799937658880 bytes
255 heads, 63 sectors/track, 97253 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table

Specs:
RHEL 5.1

/dev/sdc is a hardware raid array

/dev/raid_vg0/raid_lv0 -> /dev/mapper/raid_vg0-raid_lv0

[root@server ~]vi /etc/fstab
...
/dev/raid_vg0/raid_lv0 /mnt/raid ext3 defaults 0 0

[root@server ~]# pvdisplay
--- Physical volume ---

 PV Name               /dev/sdc
 VG Name               raid_vg0
 PV Size               745.00 GB / not usable 27.67 MB
 Allocatable           yes
 PE Size (KByte)       32768
 Total PE              23839
 Free PE               15
 Allocated PE          23824
 PV UUID               cyjzuJ-34VJ-l1S6-5Wcj-Qtw7-8Zcb-TR36bV

[root@server ~]# vgdisplay
--- Volume group ---
VG Name raid_vg0
System ID

 Format                lvm2
 Metadata Areas        1
 Metadata Sequence No  6
 VG Access             read/write
 VG Status             resizable
 MAX LV                0
 Cur LV                1
 Open LV               1
 Max PV                0
 Cur PV                1
 Act PV                1
 VG Size               744.97 GB
 PE Size               32.00 MB
 Total PE              23839
 Alloc PE / Size       23824 / 744.50 GB
 Free  PE / Size       15 / 480.00 MB
 VG UUID               8XRQX4-g3bN-yaRB-RAG4-9qpx-7uXJ-p7VxYS

[root@server ~]# lvdisplay
--- Logical volume ---

 LV Name                /dev/raid_vg0/raid_lv0
 VG Name                raid_vg0
 LV UUID                bYKncb-bUAW-FkFn-rYUr-O7RI-KL3y-18R0Oc
 LV Write Access        read/write
 LV Status              available
 # open                 1
 LV Size                744.50 GB
 Current LE             23824
 Segments               1
 Allocation             inherit
 Read ahead sectors     0
 Block device           253:0

[root@server ~]# pvscan
PV /dev/sdc VG raid_vg0 lvm2 [744.97 GB / 480.00 MB free]
Total: 1 [744.97 GB] / in use: 1 [744.97 GB] / in no VG: 0 [0 ]

[root@server ~]# vgscan
Reading all physical volumes. This may take a while... Found volume group "raid_vg0" using metadata type lvm2

[root@server ~]# lvscan
ACTIVE '/dev/raid_vg0/raid_lv0' [744.50 GB] inherit

#1 lore raw
Quoted 22 lines · Mufit Eribol

Hello,

After loosing all the data on my production server by issuing wrong lvm commands in restoring the logical volume, I have worked for weeks to setup my server again from scratch up. Now, today I noticed another problem, but scared to death to touch it.

This time I have to ask you before issuing any commands as obviously I haven't learned LVM internals.

Please find the details below. I would appreciate any help.

Thanks,
Mufit

Problem:
The system works but fdisk -l gives the following error:

[root@server ~]# fdisk -l
...
Device Boot Start End Blocks Id System

Quoted 5 lines

Disk /dev/sdc: 799.9 GB, 799937658880 bytes
255 heads, 63 sectors/track, 97253 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table

That's not an error. Its simply saying that there is no partition table on sdc. You don't necessarily need a partition table. A lot of people actually setup their system like this, especially when the device is from a SAN.

Quoted 2 lines

--- Physical volume ---
PV Name /dev/sdc

LVM is using the correct device. You don't need to change anything.

Quoted 3 lines

[root@server ~]# pvscan
PV /dev/sdc VG raid_vg0 lvm2 [744.97 GB / 480.00 MB free]
Total: 1 [744.97 GB] / in use: 1 [744.97 GB] / in no VG: 0 [0 ]

--Dave

#2 lore raw
Quoted 15 lines · David Robinson
Quoted 2 lines

Disk /dev/sdc doesn't contain a valid partition table

That's not an error. Its simply saying that there is no partition table on sdc. You don't necessarily need a partition table. A lot of people actually setup their system like this, especially when the device is from a SAN.

Quoted 3 lines

--- Physical volume ---
PV Name /dev/sdc

LVM is using the correct device. You don't need to change anything.

Quoted 6 lines
Quoted 4 lines

[root@server ~]# pvscan
PV /dev/sdc VG raid_vg0 lvm2 [744.97 GB / 480.00 MB free]
Total: 1 [744.97 GB] / in use: 1 [744.97 GB] / in no VG: 0 [0 ]

--Dave

Sorry for being late. Thank you very much for your reply, Dave. I feel better.

Best wishes,
Mufit