LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-03-2007, 01:46 PM   #1
Edgeman
LQ Newbie
 
Registered: Nov 2007
Location: Toronto, Canada
Distribution: Centos 5
Posts: 2

Rep: Reputation: 0
DMraid table missing


Hello, this is my first post so please excuse if i am in the wrong section.

Background:
I have an old Dell Poweredge server running Centos5, for /boot / and swap I am using the harware raid controller (this part works).

The problem I have is with a 250 Gb SATA drive connected to a Sata_sil card. The drive was in another system previously (dell dimension, running ubuntu) and was configured on the old system as follows
/dev/sda1 /boot
/dev/sda2 /
/dev/sda3 swap
/dev/sda4 extended
/dev/sda5 LVM

The volume group was known as "VG1" and the Logical volume was called "storage", and using xfs file system.

I moved the controller card and drive to the poweredge, and then installed Centos (on the other drives).

Goal:
1) To mount VG1-storage to /mnt/storage, without losing data
2) To delete the no longer used first 3 partitions.

Problem:
I messed up the partition table when installing Centos, I think device mapper wanted to initialize the device. I used testdisk to recover the partition table and rebooted. The system didn't see the volume groups, I ran fdisk and found that the extended partiton ID was set to "f" I changed it to "5" and wrote the table back to the drive.
Once I did that vgscan shows the volume group.
further I then did a vgchange -ay and it made the volume group active, (with a note about fixing something).

As far as I could tell LVM says everything is ok, but the "system" (excuse I don't know if it is udev, device mapper) is having a problem. I dug deeper (aka googling)

I compared info from working volume groups to this one, I finally found that it was missing a table in dmsetup

I tried to add the table
dmsetup load table.txt
where table.txt had one line 0 num_ofsectors VG1-storage.
num_of_sectors was a number found from the partition table.
The system compained that the device was not valid.
ie /dev/sda5

then I noticed that /dev/sda5 was not listed in the /dev folder?
I think it got removed after I wrote the partition table via fdisk.
BUT when I reboot and try and run vgscan, the VG1 group is not found.
If I run fdisk and rewrite the partition table and then run vgscan it does find the volume group.

Please advise as to what log files, command line output is required to better debug this. I am pretty sure the data is intact.

any help greatly appreciated.... thanks in advance

here is some relevant out put / info on what I did.

output from dmesg


SCSI subsystem initialized
libata version 2.00 loaded.
sata_sil 0000:00:02.0: version 2.0
ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 20 (level, low) -> IRQ 185
ata1: SATA max UDMA/100 cmd 0xF882C080 ctl 0xF882C08A bmdma 0xF882C000 irq 185
ata2: SATA max UDMA/100 cmd 0xF882C0C0 ctl 0xF882C0CA bmdma 0xF882C008 irq 185
scsi0 : sata_sil
ata1: SATA link down (SStatus 0 SControl 310)
scsi1 : sata_sil
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
ata2.00: ATA-7, max UDMA/133, 490234752 sectors: LBA48 NCQ (depth 0/32)
ata2.00: ata2: dev 0 multi count 16
ata2.00: configured for UDMA/100
Vendor: ATA Model: Maxtor 6L250S0 Rev: BACE
Type: Direct-Access ANSI SCSI revision: 05
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: drive cache: write back
SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
sda: Write Protect is off
sda: Mode Sense: 00 3a 00 00
SCSI device sda: drive cache: write back
sda: sda1 sda2 sda3 sda4 < sda5 >
sd 1:0:0:0: Attached scsi disk sda
device-mapper: ioctl: 4.11.0-ioctl (2006-09-14) initialised: dm-devel@redhat.com
...
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
device-mapper: multipath: version 1.0.5 loaded
device-mapper: table: device /dev/mapper/pdc_cggegjfief too small for target
device-mapper: table: 253:6: linear: dm-linear: Device lookup failed
device-mapper: ioctl: error adding target to table


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


[root@PE2450 ~]# lvscan
ACTIVE '/dev/VolGroup01/LogVol00' [2.69 GB] inherit
ACTIVE '/dev/VolGroup01/LogVol01' [1.94 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol00' [31.84 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
[root@PE2450 ~]#


[root@PE2450 ~]# fdisk /dev/sda

The number of cylinders for this disk is set to 30515.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1572 12522667+ 83 Linux
/dev/sda3 1573 1640 546210 82 Linux swap / Solaris
/dev/sda4 1641 30515 231938437+ 5 Extended
/dev/sda5 1641 30515 231938406 8e Linux LVM

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.


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

[root@PE2450 ~]# lvscan
ACTIVE '/dev/VolGroup01/LogVol00' [2.69 GB] inherit
ACTIVE '/dev/VolGroup01/LogVol01' [1.94 GB] inherit
inactive '/dev/VG1/storage' [221.19 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol00' [31.84 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GB] inherit

[root@PE2450 ~]# vgchange -ay
2 logical volume(s) in volume group "VolGroup01" now active
device-mapper: reload ioctl failed: Invalid argument
1 logical volume(s) in volume group "VG1" now active
2 logical volume(s) in volume group "VolGroup00" now active

[root@PE2450 ~]# lvscan
ACTIVE '/dev/VolGroup01/LogVol00' [2.69 GB] inherit
ACTIVE '/dev/VolGroup01/LogVol01' [1.94 GB] inherit
ACTIVE '/dev/VG1/storage' [221.19 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol00' [31.84 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GB] inherit


[root@PE2450 ~]# dmsetup table
pdc_cggegjfief: 0 490103680 linear 8:0 0
pdc_cggegjfiefp3: 0 1092420 linear 253:0 25254180
pdc_cggegjfiefp2: 0 25045335 linear 253:0 208845
VolGroup01-LogVol01: 0 4063232 linear 48:11 5636480
pdc_cggegjfiefp1: 0 208782 linear 253:0 63
VolGroup01-LogVol00: 0 5636096 linear 48:11 384
VolGroup00-LogVol01: 0 4063232 linear 48:2 66781568
VolGroup00-LogVol00: 0 66781184 linear 48:2 384
VG1-storage:

[root@PE2450 ~]# cat /root/tbl.txt
0 463876812 linear
[root@PE2450 ~]# dmsetup load VG1-storage /root/tbl.txt
device-mapper: reload ioctl failed: Invalid argument
Command failed

Last edited by Edgeman; 11-03-2007 at 10:03 PM. Reason: add additional info
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Big (1TB) External drive + missing partition table = ? Daws General 3 03-14-2007 10:13 AM
using dmraid bbbb LinuxQuestions.org Member Success Stories 0 12-23-2005 08:46 PM
WEIRD: Missing Partition Table on few boxes. Manuel-H Slackware 0 06-23-2004 05:24 AM
gnome help browser missing table of content (toc) everall Debian 1 04-19-2004 04:44 AM
How to import MS ACCESS Table including OLE filed into the MySQL Table ? myunicom Linux - General 1 11-28-2003 11:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration