LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-11-2008, 09:38 PM   #1
tthtlc
LQ Newbie
 
Registered: Aug 2007
Posts: 18

Rep: Reputation: 2
How to read/mount a volume-managed disk partition?


My Fedora Core (FC5) is installed with default volume manager (dm_mod). But now because the /etc/fstab file is messed up, it is not able to boot up at all. In this primitive state, the /etc/fstab is mounted using volume manager as read-only. Then I tried using the rescue disk - it cannot even read that partition. In the rescue mode, I can only know that that is a volume group using lvscan, vgscan etc. Similarly, all others like Knoppix LiveCD, or Ubuntu LiveCD, all can tell me the volume group name, but there is no way of mounting it, as the "mount" command does not have any option of specifying filesystem. default ext3 is not able to mount either. But without mounting the volume group as read-writable, I cannot modify the /etc/fstab file. So what can I do?
 
Old 03-14-2008, 09:01 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Can you get to the LVM with 'vgchange -ay'? If that works does 'dmsetup status' or 'lvscan' then show the LVM as active?
 
Old 03-15-2008, 01:14 AM   #3
tthtlc
LQ Newbie
 
Registered: Aug 2007
Posts: 18

Original Poster
Rep: Reputation: 2
Restoring filesystem from volume-managed partition

Quote:
Originally Posted by unSpawn View Post
Can you get to the LVM with 'vgchange -ay'? If that works does 'dmsetup status' or 'lvscan' then show the LVM as active?
perhaps i will described my configuration:

FC5. There is a /boot partition, and another volume-managed / root partition, 100G in size.
In the /boot are the initrd* files, which I un-cpio it and found a "init" file - shown as below.

#!/bin/nash

mount -t proc /proc /proc
setquiet
echo Mounting proc filesystem
echo Mounting sysfs filesystem
mount -t sysfs /sys /sys
echo Creating /dev
mount -o mode=0755 -t tmpfs /dev /dev
mkdir /dev/pts
mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
mkdir /dev/shm
mkdir /dev/mapper
echo Creating initial device nodes
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mknod /dev/systty c 4 0
mknod /dev/tty c 5 0
mknod /dev/console c 5 1
mknod /dev/ptmx c 5 2
mknod /dev/rtc c 10 135
mknod /dev/tty0 c 4 0
mknod /dev/tty1 c 4 1
mknod /dev/tty2 c 4 2
mknod /dev/tty3 c 4 3
mknod /dev/tty4 c 4 4
mknod /dev/tty5 c 4 5
mknod /dev/tty6 c 4 6
mknod /dev/tty7 c 4 7
mknod /dev/tty8 c 4 8
mknod /dev/tty9 c 4 9
mknod /dev/tty10 c 4 10
mknod /dev/tty11 c 4 11
mknod /dev/tty12 c 4 12
mknod /dev/ttyS0 c 4 64
mknod /dev/ttyS1 c 4 65
mknod /dev/ttyS2 c 4 66
mknod /dev/ttyS3 c 4 67
echo Setting up hotplug.
hotplug
echo Creating block device nodes.
mkblkdevs
echo "Loading scsi_mod.ko module"
insmod /lib/scsi_mod.ko
echo "Loading sd_mod.ko module"
insmod /lib/sd_mod.ko
echo "Loading libata.ko module"
insmod /lib/libata.ko
echo "Loading sata_nv.ko module"
insmod /lib/sata_nv.ko
echo "Loading jbd.ko module"
insmod /lib/jbd.ko
echo "Loading ext3.ko module"
insmod /lib/ext3.ko
echo "Loading dm-mod.ko module"
insmod /lib/dm-mod.ko
echo "Loading dm-mirror.ko module"
insmod /lib/dm-mirror.ko
echo "Loading dm-zero.ko module"
insmod /lib/dm-zero.ko
echo "Loading dm-snapshot.ko module"
insmod /lib/dm-snapshot.ko
echo Making device-mapper control node
mkdmnod
mkblkdevs
echo Scanning logical volumes
lvm vgscan --ignorelockingfailure
echo Activating logical volumes
lvm vgchange -ay --ignorelockingfailure VolGroup00
resume /dev/VolGroup00/LogVol01
echo Creating root device.
mkrootdev -t ext3 -o defaults,ro /dev/VolGroup00/LogVol00
echo Mounting root filesystem.
mount /sysroot
echo Setting up other filesystems.
setuproot
echo Switching to new root and running init.

Both vgchange and lvscan shows VolGroup00 as the exported volume group. Is that ok? I can never find any "LogVol00" logical volume. How do I do that? Few days back, immediately after the "setuproot" above, I was able to go into my root filesystem, except that it is readonly, which I want to make it read-writeable. But today, after setuproot, the kernel panic. All I have done was to have exported the volume group - which I thought is already exported, right?

Anyway, the underlying filesystem should be ext3, according to the above script, right? So how do I read the ext3 directly? Now I have no way of mounting it, as it is always not recognized by the mount command.

Alternatively I am thinking of dd the /dev/sdb5 partition, and pipe it to something to recover all the data - any thing like that possible?


Thanks.
 
Old 03-15-2008, 06:25 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by tthtlc View Post
I can never find any "LogVol00" logical volume.
After you "vgchange -ay" then "lvscan" should show the LV or 'readlink -f /dev/VolGroup00' should show a /dev/mapper/.* block device. BTW maybe a typo but you tried to "resume LogVol01" before and created "LogVol00" after?


Quote:
Originally Posted by tthtlc View Post
Few days back, immediately after the "setuproot" above, I was able to go into my root filesystem, except that it is readonly, which I want to make it read-writeable. But today, after setuproot, the kernel panic. All I have done was to have exported the volume group - which I thought is already exported, right?
Partitions being readonly are usually the result of a failure elsewhere like filesystem inconsistencies and in the case of LVM also partial LVs (and if this is about creating say a Xen dom then using the same PV/VG/LV names as the underlying dom is a bad idea). Other than that I don't have any idea of the configuration or commands you used or what they are part of or if the initrd looks for things in the right places. Besides you haven't shown me the output I wanted to see so I can't be of much help.


Quote:
Originally Posted by tthtlc View Post
Anyway, the underlying filesystem should be ext3, according to the above script, right?
Yes.


Quote:
Originally Posted by tthtlc View Post
I am thinking of dd the /dev/sdb5 partition, and pipe it to something to recover all the data - any thing like that possible?
Could try running testdisk on /dev/sdb5 and see what it thinks is there.
 
Old 03-16-2008, 03:02 AM   #5
tthtlc
LQ Newbie
 
Registered: Aug 2007
Posts: 18

Original Poster
Rep: Reputation: 2
Restoring data from LVM2 managed partition

[QUOTE=unSpawn;3089394]After you "vgchange -ay" then "lvscan" should show the LV or 'readlink -f /dev/VolGroup00' should show a /dev/mapper/.* block device. BTW maybe a typo but you tried to "resume LogVol01" before and created "LogVol00" after?

Ah......EXACTLY!!!! I MAY have executed that "resume" command - what does it do anyway?

After vgchange -ay ==> VolGroup00 is exported.

And lvscan ==> VolGroup00 is exported.

Both command give the same message.

Under /dev/ There is no VolGroup00, and "readlink" command as above returns nothing.

Anyway, everything else is as per listed below (Ubuntu LiveCD) - /dev/sdb5 is my target to be restored:


root@ubuntu:/home/ubuntu # vgchange -ay
Volume group "VolGroup00" is exported
root@ubuntu:/home/ubuntu # lvscan
Volume group "VolGroup00" is exported


root@ubuntu:/home/ubuntu # readlink -f /dev/VolGroup00
root@ubuntu:/home/ubuntu # readlink -f /dev/VolGroup00
root@ubuntu:/home/ubuntu # readlink -f /dev/VolGroup00

root@ubuntu:/home/ubuntu # ls /dev/mapper/
casper-cow casper-snapshot control

root@ubuntu:/home/ubuntu # fdisk -l /dev/sdb

Disk /dev/sdb: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 10443 83883366 7 HPFS/NTFS
/dev/sdb2 10444 20886 83883397+ 7 HPFS/NTFS
/dev/sdb3 * 20887 20899 104422+ 83 Linux
/dev/sdb4 20900 36481 125162415 5 Extended
/dev/sdb5 20900 36481 125162383+ 8e Linux LVM

root@ubuntu:/home/ubuntu # dmesg
000602 MSFT 0x00000097) @ 0x000000007ffbe040
ACPI: DSDT (v001 A0371 A0371001 0x00000001 INTL 0x02002026) @ 0x0000000000000000
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 15:3 APIC version 16
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Processor #1 15:3 APIC version 16
WARNING: NR_CPUS limit of 1 reached. Processor ignored.
ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 2, version 17, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: BIOS IRQ0 pin2 override ignored.
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 14 global_irq 14 high edge)
ACPI: INT_SRC_OVR (bus 0 bus_irq 15 global_irq 15 high edge)
ACPI: IRQ9 used by override.
ACPI: IRQ14 used by override.
ACPI: IRQ15 used by override.
Setting APIC routing to flat
Using ACPI (MADT) for SMP configuration information
Checking aperture...
CPU 0: aperture @ 4848000000 size 32 MB
Aperture from northbridge cpu 0 too small (32 MB)
No AGP bridge found
Built 1 zonelists
Kernel command line: casper/enable=true casper-udeb/snapshot/backing-file=/cdrom/casper/filesystem.cloop vga=normal initrd=/install/initrd.gz ramdisk_size=1048576 root=/dev/rd/0 rw -- BOOT_IMAGE=/install/vmlinuz console=tty0
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 131072 bytes)
time.c: Using 1.193182 MHz PIT timer.
time.c: Detected 2410.991 MHz processor.
Console: colour VGA+ 80x25
Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
Memory: 2055240k/2096832k available (1585k kernel code, 41012k reserved, 1008k data, 132k init)
Calibrating delay loop... 4767.74 BogoMIPS (lpj=2383872)
Security Framework v1.0.0 initialized
SELinux: Disabled at boot.
Mount-cache hash table entries: 256 (order: 0, 4096 bytes)
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 1024K (64 bytes/line)
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4800+ stepping 02
ACPI: Looking for DSDT in initrd... not found!
Using local APIC NMI watchdog using perfctr0
Using local APIC timer interrupts.
Detected 12.557 MHz APIC timer.
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
NET: Registered protocol family 16
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20050211
ACPI: Interpreter enabled
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (00:00)
PCI: Probing PCI hardware (bus 00)
PCI: Transparent bridge - 0000:00:12.0
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PB2P._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCE0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCE1._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCE2._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCE3._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCE4._PRT]
ACPI: PCI Interrupt Link [LNKA] (IRQs 16 17 18 19) *10
ACPI: PCI Interrupt Link [LNKB] (IRQs 16 17 18 19) *0, disabled.
ACPI: PCI Interrupt Link [LNKC] (IRQs 16 17 18 19) *0, disabled.
ACPI: PCI Interrupt Link [LNKD] (IRQs 16 17 18 19) *0, disabled.
ACPI: PCI Interrupt Link [LUB0] (IRQs 20 21 22 23) *10
ACPI: PCI Interrupt Link [LUB2] (IRQs 20 21 22 23) *10
ACPI: PCI Interrupt Link [LMAC] (IRQs 20 21 22 23) *10
ACPI: PCI Interrupt Link [LACI] (IRQs 20 21 22 23) *10
ACPI: PCI Interrupt Link [LMC9] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [LSMB] (IRQs 20 21 22 23) *10
ACPI: PCI Interrupt Link [LSA0] (IRQs 20 21 22 23) *11
ACPI: PCI Interrupt Link [LSA1] (IRQs 20 21 22 23) *11
ACPI: PCI Interrupt Link [LATA] (IRQs 20 21 22 23) *0, disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
pnp: PnP ACPI: found 18 devices
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: Using ACPI for IRQ routing
** PCI interrupts are no longer routed automatically. If this
** causes a device to stop working, it is probably because the
** driver failed to call pci_enable_device(). As a temporary
** workaround, the "pci=routeirq" argument restores the old
** behavior. If this argument makes the device work again,
** please email the output of "lspci" to bjorn.helgaas@hp.com
** so I can fix the driver.
PCI-DMA: Disabling IOMMU.
pnp: 00:0e: ioport range 0xc00-0xc0f has been reserved
pnp: 00:0e: ioport range 0xd00-0xd0f has been reserved
pnp: 00:0e: ioport range 0xa20-0xa2f has been reserved
pnp: 00:0e: ioport range 0xa30-0xa3f has been reserved
IA32 emulation $Id: sys_ia32.c,v 1.32 2002/03/24 13:02:28 ak Exp $
audit: initializing netlink socket (disabled)
audit(1205679442.322:0): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x0
Initializing Cryptographic API
Linux agpgart interface v0.100 (c) Dave Jones
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Serial: 8250/16550 driver $Revision: 1.90 $ 48 ports, IRQ sharing enabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 1048576K size 1024 blocksize
input: AT Translated Set 2 keyboard on isa0060/serio0
NET: Registered protocol family 2
IP: routing cache hash table of 16384 buckets, 128Kbytes
TCP: Hash tables configured (established 524288 bind 65536)
NET: Registered protocol family 8
NET: Registered protocol family 20
Restarting tasks...<6> Strange, khubd not stopped
Strange, kswapd0 not stopped
Strange, kseriod not stopped
done
ACPI wakeup devices:
PS2K PS2M UAR1 NSMB USB0 USB2 NMAC PB2P MC97 PCE0 PCE1 PCE2 PCE3 PCE4 PCE5 PWRB
ACPI: (supports S0 S1 S3 S4 S5)
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
VFS: Mounted root (ext2 filesystem).
Trying to move old root to /initrd ... okay
Freeing unused kernel memory: 132k freed
NET: Registered protocol family 1
ohci_hcd: 2004 Nov 08 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ACPI: PCI Interrupt Link [LUB0] enabled at IRQ 23
ACPI: PCI interrupt 0000:00:0b.0[A] -> GSI 23 (level, low) -> IRQ 23
ohci_hcd 0000:00:0b.0: PCI device 10de:005a (nVidia Corporation)
PCI: Setting latency timer of device 0000:00:0b.0 to 64
ohci_hcd 0000:00:0b.0: irq 23, pci mem 0xfebfe000
ohci_hcd 0000:00:0b.0: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 10 ports detected
ACPI: PCI Interrupt Link [LUB2] enabled at IRQ 22
ACPI: PCI interrupt 0000:00:0b.1[B] -> GSI 22 (level, low) -> IRQ 22
ehci_hcd 0000:00:0b.1: PCI device 10de:005b (nVidia Corporation)
PCI: Setting latency timer of device 0000:00:0b.1 to 64
ehci_hcd 0000:00:0b.1: irq 22, pci mem 0xfebffc00
ehci_hcd 0000:00:0b.1: new USB bus registered, assigned bus number 2
PCI: cache line size of 64 is not supported by device 0000:00:0b.1
ehci_hcd 0000:00:0b.1: USB 2.0 initialized, EHCI 1.00, driver 26 Oct 2004
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 10 ports detected
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
SCSI subsystem initialized
libata version 1.10 loaded.
sata_nv version 0.5
ACPI: PCI Interrupt Link [LSA0] enabled at IRQ 21
ACPI: PCI interrupt 0000:00:10.0[A] -> GSI 21 (level, low) -> IRQ 21
PCI: Setting latency timer of device 0000:00:10.0 to 64
ata1: SATA max UDMA/133 cmd 0xDC00 ctl 0xD882 bmdma 0xD400 irq 21
ata2: SATA max UDMA/133 cmd 0xD800 ctl 0xD482 bmdma 0xD408 irq 21
ata1: dev 0 cfg 49:2f00 82:346b 83:7d01 84:4023 85:3469 86:3c01 87:4023 88:407f
ata1: dev 0 ATA, max UDMA/133, 586072368 sectors: lba48
nv_sata: Primary device added
nv_sata: Primary device removed
nv_sata: Secondary device added
nv_sata: Secondary device removed
ata1: dev 0 configured for UDMA/133
scsi0 : sata_nv
ata2: dev 0 cfg 49:2f00 82:346b 83:7d01 84:4023 85:3469 86:3c01 87:4023 88:407f
ata2: dev 0 ATA, max UDMA/133, 586072368 sectors: lba48
nv_sata: Primary device added
nv_sata: Primary device removed
nv_sata: Secondary device added
nv_sata: Secondary device removed
ata2: dev 0 configured for UDMA/133
scsi1 : sata_nv
elevator: using anticipatory as default io scheduler
Vendor: ATA Model: ST3300622AS Rev: 3.AA
Type: Direct-Access ANSI SCSI revision: 05
Vendor: ATA Model: ST3300622AS Rev: 3.AA
Type: Direct-Access ANSI SCSI revision: 05
ACPI: PCI Interrupt Link [LSA1] enabled at IRQ 20
ACPI: PCI interrupt 0000:00:11.0[A] -> GSI 20 (level, low) -> IRQ 20
PCI: Setting latency timer of device 0000:00:11.0 to 64
ata3: SATA max UDMA/133 cmd 0xD080 ctl 0xD002 bmdma 0xC800 irq 20
ata4: SATA max UDMA/133 cmd 0xCC00 ctl 0xC882 bmdma 0xC808 irq 20
ata3: no device found (phy stat 00000000)
scsi2 : sata_nv
ata4: no device found (phy stat 00000000)
scsi3 : sata_nv
ieee1394: Initialized config rom entry `ip1394'
ohci1394: $Rev: 1223 $ Ben Collins <bcollins@debian.org>
ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 19
ACPI: PCI interrupt 0000:04:0b.0[A] -> GSI 19 (level, low) -> IRQ 19
ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[19] MMIO=[feaff800-feafffff] Max Packet=[2048]
SCSI device sda: 586072368 512-byte hdwr sectors (300069 MB)
SCSI device sda: drive cache: write back
SCSI device sda: 586072368 512-byte hdwr sectors (300069 MB)
SCSI device sda: drive cache: write back
/dev/scsi/host0/bus0/target0/lun0: p1 p2 p3 p4
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sdb: 586072368 512-byte hdwr sectors (300069 MB)
SCSI device sdb: drive cache: write back
SCSI device sdb: 586072368 512-byte hdwr sectors (300069 MB)
SCSI device sdb: drive cache: write back
/dev/scsi/host1/bus0/target0/lun0: p1 p2 p3 p4 < p5 >
Attached scsi disk sdb at scsi1, channel 0, id 0, lun 0
ieee1394: Host added: ID:BUS[0-00:1023] GUID[0011d8000098ab88]
ACPI: Processor [CPU1] (supports 8 throttling states)
usbcore: registered new driver usbkbd
drivers/usb/input/usbkbd.c: :USB HID Boot Protocol keyboard driver
usbcore: registered new driver hiddev
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
drivers/usb/serial/usb-serial.c: USB Serial support registered for Generic
usbcore: registered new driver usbserial_generic
usbcore: registered new driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial Driver core v2.0
vga16fb: initializing
vga16fb: mapped to 0x00000100000a0000
fb0: VGA16 VGA frame buffer device
Console: switching to colour frame buffer device 80x30
parport: PnPBIOS parport detected.
parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,ECP,DMA]
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
inserting floppy driver for 2.6.10-5-amd64-generic
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
NFORCE-CK804: IDE controller at PCI slot 0000:00:0f.0
NFORCE-CK804: chipset revision 243
NFORCE-CK804: not 100% native mode: will probe irqs later
NFORCE-CK804: 0000:00:0f.0 (rev f3) UDMA133 controller
ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hdaMA, hdbio
ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdcMA, hddio
Probing IDE interface ide0...
klogd[3884]: segfault at 000000000000003e rip 0000002a9568e70e rsp 0000007fbfffe270 error 6
hda: HL-DT-ST DVDRAM GSA-H10A, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: SAMSUNG HD400LD, ATA DISK drive
ide1 at 0x170-0x177,0x376 on irq 15
Probing IDE interface ide2...
Probing IDE interface ide3...
Probing IDE interface ide4...
Probing IDE interface ide5...
hdc: max request size: 1024KiB
hdc: Host Protected Area detected.
current capacity is 781420655 sectors (400087 MB)
native capacity is 781422768 sectors (400088 MB)
hdc: Host Protected Area disabled.
hdc: 781422768 sectors (400088 MB) w/8192KiB Cache, CHS=48641/255/63, UDMA(100)
hdc: cache flushes supported
/dev/ide/host0/bus1/target0/lun0: p1 p2 p3 < p5 p6 > p4
hda: ATAPI 48X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache
Uniform CD-ROM driver Revision: 3.20
sbp2: $Rev: 1219 $ Ben Collins <bcollins@debian.org>
ISO 9660 Extensions: Microsoft Joliet Level 3
ISO 9660 Extensions: RRIP_1991A
forcedeth.c: Reverse Engineered nForce ethernet driver. Version 0.30.
ACPI: PCI Interrupt Link [LMAC] enabled at IRQ 23
ACPI: PCI interrupt 0000:00:13.0[A] -> GSI 23 (level, low) -> IRQ 23
PCI: Setting latency timer of device 0000:00:13.0 to 64
eth0: forcedeth.c: subsystem: 01043:8141 bound to 0000:00:13.0
ACPI: PCI interrupt 0000:02:00.0[A] -> GSI 19 (level, low) -> IRQ 19
ACPI: PCI interrupt 0000:02:00.0[A] -> GSI 19 (level, low) -> IRQ 19
PCI: Setting latency timer of device 0000:02:00.0 to 64
eth%d: -- ERROR --
Class: internal Software error
Nr: 0x2bd
Msg: TWSI: transfer does not complete
sk98lin: SkGeInitAssignRamToQueues failed.
NET: Registered protocol family 17
cloop: Initializing cloop v2.01
cloop: loaded (max 8 devices)
loop: loaded (max 8 devices)
device-mapper: 4.3.0-ioctl (2004-09-30) initialised: dm-devel@redhat.com
cloop: losetup_file: 32753 blocks, 65536 bytes/block, largest block is 65562 bytes.
EXT2-fs warning: maximal mount count reached, running e2fsck is recommended
debconf[4439]: segfault at 0000000000000090 rip 0000002a95fa4f13 rsp 0000007fbfffeec0 error 4
lp0: using parport0 (interrupt-driven).
mice: PS/2 mouse device common for all mice
input: ImExPS/2 Generic Explorer Mouse on isa0060/serio1
Real Time Clock Driver v1.12
ts: Compaq touchscreen protocol output
Capability LSM initialized
md: md driver 0.90.1 MAX_MD_DEVS=256, MD_SB_DISKS=27
input: PC Speaker
cpci_hotplug: CompactPCI Hot Plug Core version: 0.2
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
shpchp: shpc_init : shpc_cap_offset == 0
shpchp: shpc_init : shpc_cap_offset == 0
shpchp: shpc_init : shpc_cap_offset == 0
shpchp: shpc_init : shpc_cap_offset == 0
shpchp: shpc_init : shpc_cap_offset == 0
shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
Evaluate _OSC Set fails. Status = 0x0005
pciehp: add_host_bridge: status 5
pciehp: Fails to gain control of native hot-plug
Evaluate _OSC Set fails. Status = 0x0005
pciehp: add_host_bridge: status 5
pciehp: Fails to gain control of native hot-plug
Evaluate _OSC Set fails. Status = 0x0005
pciehp: add_host_bridge: status 5
pciehp: Fails to gain control of native hot-plug
ACPI: PCI Interrupt Link [LACI] enabled at IRQ 22
ACPI: PCI interrupt 0000:00:0d.0[A] -> GSI 22 (level, low) -> IRQ 22
PCI: Setting latency timer of device 0000:00:0d.0 to 64
intel8x0_measure_ac97_clock: measured 49632 usecs
intel8x0: clocking to 46866
Evaluate _OSC Set fails. Status = 0x0005
pciehp: add_host_bridge: status 5
pciehp: Fails to gain control of native hot-plug
Evaluate _OSC Set fails. Status = 0x0005
pciehp: add_host_bridge: status 5
pciehp: Fails to gain control of native hot-plug
NET: Registered protocol family 10
Disabled Privacy Extensions on device ffffffff80350ec0(lo)
IPv6 over IPv4 tunneling driver
eth0: no IPv6 routers present
ACPI: Power Button (FF) [PWRF]
ibm_acpi: ec object not found




root@ubuntu:/home/ubuntu # dmsetup status
sdb3: 0 208845 linear
hdc2: 0 208845 linear
sdb2: 0 167766795 linear
hdc1: 0 195334272 linear
sdb1: 0 167766732 linear
sda4: 0 209567925 linear
casper-cow: 0 2097152 linear
sda3: 0 40965750 linear
lvm2|VolGroup00|LogVol01: 0 4063232 linear
sda2: 0 167766795 linear
lvm2|VolGroup00|LogVol00: 0 246153216 linear
hdc6: 0 208782 linear
sda1: 0 167766732 linear
hdc5: 0 208782 linear
casper-snapshot: 0 4192384 snapshot 21096/2097152
sdb5: 0 250324767 linear
hdc4: 0 208845 linear



Thank you very much for all the help rendered.
 
Old 03-16-2008, 03:10 AM   #6
tthtlc
LQ Newbie
 
Registered: Aug 2007
Posts: 18

Original Poster
Rep: Reputation: 2
Output from pvdisplay and lvdisplay

root@ubuntu:/home/ubuntu # pvdisplay
Physical volume "/dev/sdb5" of volume group "VolGroup00" is exported
--- Physical volume ---
PV Name /dev/sdb5
VG Name VolGroup00 (exported)
PV Size 119.34 GB / not usable 0
Allocatable yes
PE Size (KByte) 32768
Total PE 3819
Free PE 1
Allocated PE 3818
PV UUID GCQ5AQ-gSCZ-Nxiw-hRq1-gB4z-KRNE-kZBFu9

root@ubuntu:/home/ubuntu # lvdisplay
Volume group "VolGroup00" is exported

What happened here?? lvdisplay is supposed to show the logical volume right? Did the "resume" command change it?
 
Old 03-17-2008, 09:38 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I don't get it. If VolGroup00 is "exported" then "vgimport VolGroup00" should import it. But let's reset and start again. Please boot your FC5 installer CD in rescue mode and gather output of the following command chain: '( fdisk -l 2>&1; pvdisplay -v 2>&1; vgdisplay -v 2>&1; vgck 2>&1; vgchange -ay; lvmdiskscan 2>&1; lvdisplay -v 2>&1; dmsetup ls --tree 2>&1 ) | tee lvm.log' and post the contents of lvm.log.
 
Old 03-18-2008, 10:40 AM   #8
tthtlc
LQ Newbie
 
Registered: Aug 2007
Posts: 18

Original Poster
Rep: Reputation: 2
Recovery of lvm2 partition

Appreciate very much for your time, can I do this this coming monday? I am on course for this week.
 
Old 03-18-2008, 10:40 AM   #9
tthtlc
LQ Newbie
 
Registered: Aug 2007
Posts: 18

Original Poster
Rep: Reputation: 2
Recovery of lvm2 partition

Appreciate very much for your time, can I do this this coming monday? I am on course for this week. Thanks!!!
 
Old 03-18-2008, 11:16 AM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Sure, take your time. Notify is on so I'll see new entries soon enough.
 
Old 03-25-2008, 12:26 AM   #11
tthtlc
LQ Newbie
 
Registered: Aug 2007
Posts: 18

Original Poster
Rep: Reputation: 2
Hi unSpawn,

The information requested are as follows. Note that vgimport was the command that I was looking for - now the lvscan shows two volume at least.

root@ubuntu:~ # vgimport VolGroup00
Volume group "VolGroup00" successfully imported
root@ubuntu:~ # lvscan
inactive '/dev/VolGroup00/LogVol00' [117.38 GB] inherit
inactive '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
root@ubuntu:~ # fdisk -l 2>&1

Disk /dev/sda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 10443 83883366 7 HPFS/NTFS
/dev/sda2 10444 20886 83883397+ 7 HPFS/NTFS
/dev/sda3 20887 23436 20482875 7 HPFS/NTFS
/dev/sda4 23437 36481 104783962+ 7 HPFS/NTFS

Disk /dev/sdb: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 10443 83883366 7 HPFS/NTFS
/dev/sdb2 10444 20886 83883397+ 7 HPFS/NTFS
/dev/sdb3 * 20887 20899 104422+ 83 Linux
/dev/sdb4 20900 36481 125162415 5 Extended
/dev/sdb5 20900 36481 125162383+ 8e Linux LVM

Disk /dev/hdc: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdc1 1 12159 97667136 83 Linux
/dev/hdc2 12160 12172 104422+ 83 Linux
/dev/hdc3 12186 48641 292832820 5 Extended
/dev/hdc4 12173 12185 104422+ 83 Linux
/dev/hdc5 12186 12198 104391 83 Linux
/dev/hdc6 12199 12211 104391 83 Linux

Partition table entries are not in disk order
root@ubuntu:~ # pvdisplay -v 2>&1
Scanning for physical volume names
Physical volume "/dev/sdb5" of volume group "VolGroup00" is exported
--- Physical volume ---
PV Name /dev/sdb5
VG Name VolGroup00 (exported)
PV Size 119.34 GB / not usable 0
Allocatable yes
PE Size (KByte) 32768
Total PE 3819
Free PE 1
Allocated PE 3818
PV UUID GCQ5AQ-gSCZ-Nxiw-hRq1-gB4z-KRNE-kZBFu9

root@ubuntu:~ #
root@ubuntu:~ # vgdisplay -v 2>&1
Finding all volume groups
Finding volume group "VolGroup00"
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 119.34 GB
PE Size 32.00 MB
Total PE 3819
Alloc PE / Size 3818 / 119.31 GB
Free PE / Size 1 / 32.00 MB
VG UUID 4AW1CU-1ow7-NJal-S1rE-mBIx-Mqkr-KnUYIY

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID viCm26-k34Y-WPd4-oI3y-ol1G-0QUg-vyNlOc
LV Write Access read/write
LV Status NOT available
LV Size 117.38 GB
Current LE 3756
Segments 1
Allocation inherit
Read ahead sectors 0

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID bQUfOx-0n5z-QEE4-DcoM-bX67-TroC-2MXh70
LV Write Access read/write
LV Status NOT available
LV Size 1.94 GB
Current LE 62
Segments 1
Allocation inherit
Read ahead sectors 0

--- Physical volumes ---
PV Name /dev/sdb5
PV UUID GCQ5AQ-gSCZ-Nxiw-hRq1-gB4z-KRNE-kZBFu9
PV Status allocatable
Total PE / Free PE 3819 / 1

root@ubuntu:~ # vgck 2>&1

root@ubuntu:~ # vgchange -ay
2 logical volume(s) in volume group "VolGroup00" now active

root@ubuntu:~ # lvmdiskscan 2>&1
/dev/sda1 [ 80.00 GB]
/dev/hdc1 [ 93.14 GB]
/dev/sda2 [ 80.00 GB]
/dev/hdc2 [ 101.97 MB]
/dev/sda3 [ 19.53 GB]
/dev/sda4 [ 99.93 GB]
/dev/hdc4 [ 101.97 MB]
/dev/hdc5 [ 101.94 MB]
/dev/hdc6 [ 101.94 MB]
/dev/sdb1 [ 80.00 GB]
/dev/sdb2 [ 80.00 GB]
/dev/sdb3 [ 101.97 MB]
/dev/sdb5 [ 119.36 GB] LVM physical volume
0 disks
12 partitions
0 LVM physical volume whole disks
1 LVM physical volume
root@ubuntu:~ # lvdisplay -v 2>&1
Finding all logical volumes
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID viCm26-k34Y-WPd4-oI3y-ol1G-0QUg-vyNlOc
LV Write Access read/write
LV Status available
# open 0
LV Size 117.38 GB
Current LE 3756
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 254:17

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID bQUfOx-0n5z-QEE4-DcoM-bX67-TroC-2MXh70
LV Write Access read/write
LV Status available
# open 0
LV Size 1.94 GB
Current LE 62
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 254:18

root@ubuntu:~ # dmsetup ls --tree
Segmentation fault


root@ubuntu:~ # dmsetup status
sdb3: 0 208845 linear
hdc2: 0 208845 linear
sdb2: 0 167766795 linear
hdc1: 0 195334272 linear
sdb1: 0 167766732 linear
sda4: 0 209567925 linear
casper-cow: 0 2097152 linear
sda3: 0 40965750 linear
lvm2|VolGroup00|LogVol01: 0 4063232 linear
sda2: 0 167766795 linear
lvm2|VolGroup00|LogVol00: 0 246153216 linear
VolGroup00-LogVol01: 0 4063232 linear
hdc6: 0 208782 linear
sda1: 0 167766732 linear
VolGroup00-LogVol00: 0 246153216 linear
hdc5: 0 208782 linear
casper-snapshot: 0 4192384 snapshot 45120/2097152
sdb5: 0 250324767 linear
hdc4: 0 208845 linear


Now, the main problem is when I reboot - it is able to recognized lvm2 filesystem, and load the vmlinuz file in that filesystem, and while running all the fsck check, it throw an error "Either the superblock or the partition table is likely to be corrupt!".

/: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
fsck.ext3: Attempt to read block from filesystem resulted in short read while trying to open /dev/hdc3.

I did a check, the problem look exactly like:

http://www.experts-exchange.com/OS/L...l?qid=21675452

The reason, I have found, is because /etc/fstab is attempting to load a non-existence or corrupted partition (logically, if /etc/fstab cannot load the partition, I think it should just ignore it and continue with booting up). But no, it just stop there and produced the error as described in the above link.

Your magical solution "vgimport" solved it all (The LogVol00 disappeared when I first did the vgexport, well, I still don't know what is happening :-)). The 2nd magical solution is to bootup using a LiveCD like Ubuntu. Because after the screen as shown in the above expert-exchange website, the login will only give u a readonly image of /etc/fstab. There is simply no way of modifiying that file if LiveCD is not used.

After that I did a lvscan and see two logical volume (LogVol00 and LogVol01), and then did the following:

mount /dev/VolGroup00/LogVol00 /temp_dir

And under /temp_dir, I modified the etc/fstab to remove the illegal entries in the last few lines.

Save it, and now it worked!!! No recovery is needed. All because of some illegal entries in /etc/fstab.

Thank you for your help unSpawn!!!! One day I shall donate something!!!
 
Old 03-25-2008, 07:06 AM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by tthtlc View Post
Thank you for your help
I might have dropped the odd clue here and there but basically you did everything yourself. That's the kind of attitude and autonomy I like to see more GNU/Linux users have. Congratulations on the result and thanks for posting full details. It will help guide those that find this thread.
 
  


Reply



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
How do you mount another partition to read it? mdlinuxwolf Mandriva 6 03-01-2007 11:34 PM
Read-Only disk Apon Partition disown3d Slackware 3 08-21-2006 10:04 PM
How to mount a read write NTFS partition CircuitSix Linux - Hardware 3 12-07-2005 02:21 AM
I can mount but cannot read a WIN95 FAT32 partition wuqso Fedora - Installation 0 12-30-2004 07:57 PM
How do you mount and read from a disk? Roitoy Linux - Newbie 8 08-11-2004 08:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:12 PM.

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