Cannot mount LVM partitions on external HDD

Hey Guys,

I have a 160GB hard drive here with an LVM2 partition that contains two EXT3 partitions that I'm trying to mount.

However, when I try to mount either of those two partitions inside the LVM2, I get the error:

mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Open in new window


Also, when I run
fdisk

Open in new window

, it shows the two partitions as not containing "a valid partition table"

Disk /dev/sdd: 160.0 GB, 16004188696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0002d815

Device		Boot	Start		End		Blocks		Id	System
/dev/sdd1	*	63		305234		152586		83	Linux
/dev/sdd2		305235		4498199		2096482+	82	Linux swap / Solaris
/dev/sdd3		4498200		312576704	154039252+	8e	Linux LVM

Disk /dev/mapper/VolGroup00-lv_root: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylindars, total 41943040
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/VolGroup00-lv_root doesn't contain a valid partition table

Disk /dev/mapper/VolGroup00-lv_usr2: 136.2 GB, 136197439488 bytes
255 heads, 63 sectors/track, 16558 cylindars, total 266010624 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/VolGroup00-lv_usr2 doesn't contain a valid partition table

Open in new window



Here are the contents of lvdisplay:

  --- Logical volume ---
  LV Name                /dev/VolGroup00/lv_root
  VG Name                VolGroup00
  LV UUID                jOeBez-2QxJ-Rwth-ufsK-kohE-dHrW-XwDeEi
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                20.00 GiB
  Current LE             640
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:0
   
  --- Logical volume ---
  LV Name                /dev/VolGroup00/lv_usr2
  VG Name                VolGroup00
  LV UUID                YvbvFJ-yq2t-gSoV-6CqL-Imby-qx6E-uNu3Iz
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                126.84 GiB
  Current LE             4059
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:1

Open in new window




Do you guys have any advice? I am positive they are ext3 partitions..
dannymyungAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Daniel HelgenbergerCommented:
Hello,

what startles me:
mount: wrong fs type, bad option, bad superblock on /dev/loop0
Why are you mounting a loop device in your fist snippet?

How did you plug the drive in? Is this your volume group? Do you know the name of the volume group you are looking for?
/dev/VolGroup00

Open in new window

I suppose this is your local LVM your OS is running on? Please post the output of mount to verify.

Did you know you need to run vgchange after plugging in the LVM?:
vgscan && vgchange -ay

Open in new window


ALSO: Be aware you may not have the same VG name TWICE on your system. Make sure your old VG is not called VolGroup00 also. If this is the case, rename the VG on your disk on another system (like a live or rescue system).

Is it maybe an encrypted volume?
0
dbompartCommented:
Please, collect more info:

# To check if the device is in fact ext3 (even though your 100% convinced)

blkid /dev/mapper/VolGroup00-lv_root      

# If it returned the fstype = ext3 then we're so far so good.

# Next run:

pvscan;
vgscan;
vgchange -ay;
lvscan;
lvchange -ay;

# If it still fails to mount, then check that there are Physical Volumes associated with a Volume Group XXX, and these Logical Volumes (/dev/VolGroup00/lv_root and /dev/VolGroup00/lv_usr2) are associated with the same Volume Group XXX. Also check that vgs shows the active flag for the volume group; do the same for lvs.

# So, run:

pvs;
vgs;
lvs;

If you cant still mount your partitions, then I would imagine you're probably trying to mount an external hard drive which had a LVM2 VG configured, and you should copy into your new system the lvm2 metadata file located inside /etc/lvm/backup from the machine were you created the volume group the first time, open these files and change inside the names of the volume groups and logical volumes accordingly to be different from your current (mounted) vg and lv, then use vgcfrestore command to make the new volume group and logical volumes active, this way you will be able to mount them on your new host.
0
dannymyungAuthor Commented:
Hey guys, I appreciate your quick responses.


Helge:
I'm trying to mount the hard drive like so:


linux@linux:~$ sudo mount -t ext3 /dev/mapper/VolGroup00-lv_root ./lv_root

mount: wrong fs type, bad option, bad superblock on /dev/mapper/VolGroup00-lv_root,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Open in new window


The LVM is on an external hard drive, attached via SATA to USB adapter

Here is the output to your command:
  Reading all physical volumes.  This may take a while...
  /dev/dm-0: read failed after 0 of 4096 at 21474770944: Input/output error
  /dev/dm-0: read failed after 0 of 4096 at 21474828288: Input/output error
  /dev/dm-0: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-0: read failed after 0 of 4096 at 4096: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 136197373952: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 136197431296: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 4096: Input/output error
  Found volume group "VolGroup00" using metadata type lvm2
  WARNING: Running as a non-root user. Functionality may be unavailable.
  No volume groups found

Open in new window

0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Daniel HelgenbergerCommented:
Please do run vgchange with sudo:
sudo vgscan
sudo vgchange -ay

And - please paste the output of mount here

Are you sure VolGroup00 is the one you are looking for and not your current boot volume?

Also, try to mount without -t
if ext3, the kernel will detect the file system
0
dannymyungAuthor Commented:
The HDD is 160GB so I am sure VolGroup00 is part of this drive


sudo vgscan

  Reading all physical volumes.  This may take a while...
  /dev/dm-0: read failed after 0 of 4096 at 21474770944: Input/output error
  /dev/dm-0: read failed after 0 of 4096 at 21474828288: Input/output error
  /dev/dm-0: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-0: read failed after 0 of 4096 at 4096: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 136197373952: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 136197431296: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 4096: Input/output error
  Found volume group "VolGroup00" using metadata type lvm2

Open in new window



sudo vgchange -ay

  /dev/dm-0: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 0: Input/output error
  2 logical volume(s) in volume group "VolGroup00" now active

Open in new window



sudo pvscan

  /dev/dm-0: read failed after 0 of 4096 at 21474770944: Input/output error
  /dev/dm-0: read failed after 0 of 4096 at 21474828288: Input/output error
  /dev/dm-0: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-0: read failed after 0 of 4096 at 4096: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 136197373952: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 136197431296: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 4096: Input/output error
  No matching physical volumes found

Open in new window



sudo lvscan

  /dev/dm-0: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 0: Input/output error
  ACTIVE            '/dev/VolGroup00/lv_root' [20.00 GiB] inherit
  ACTIVE            '/dev/VolGroup00/lv_usr2' [126.84 GiB] inherit

Open in new window


blkid /dev/mapper/VolGroup00-lv_root

returns nothing

Open in new window


sudo pvs

  /dev/dm-0: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 0: Input/output error
  PV         VG         Fmt  Attr PSize   PFree 
  /dev/sdd3  VolGroup00 lvm2 a-   146.88g 32.00m

Open in new window


sudo vgs

  /dev/dm-0: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 0: Input/output error
  VG         #PV #LV #SN Attr   VSize   VFree 
  VolGroup00   1   2   0 wz--n- 146.88g 32.00m

Open in new window


sudo lvs

  /dev/dm-0: read failed after 0 of 4096 at 0: Input/output error
  /dev/dm-1: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdd1: read failed after 0 of 2048 at 0: Input/output error
  /dev/sdd2: stat failed: No such file or directory
  Path /dev/sdd2 no longer valid for device(8,50)
  /dev/sdd3: stat failed: No such file or directory
  Path /dev/sdd3 no longer valid for device(8,51)
  /dev/disk/by-id/ata-ST3160815AS_6RACDBRE-part3: stat failed: No such file or directory
  Path /dev/disk/by-id/ata-ST3160815AS_6RACDBRE-part3 no longer valid for device(8,51)
  /dev/disk/by-path/pci-0000:00:14.0-usb-0:3:1.0-scsi-0:0:0:0-part3: stat failed: No such file or directory
  Path /dev/disk/by-path/pci-0000:00:14.0-usb-0:3:1.0-scsi-0:0:0:0-part3 no longer valid for device(8,51)
  /dev/disk/by-id/scsi-SST3160815AS_ERBDCAR6-part3: stat failed: No such file or directory
  Path /dev/disk/by-id/scsi-SST3160815AS_ERBDCAR6-part3 no longer valid for device(8,51)
  /dev/block/8:51: stat failed: No such file or directory
  Path /dev/block/8:51 no longer valid for device(8,51)
  No volume groups found

Open in new window


sudo mount /dev/mapper/VolGroup00-lv_root

mount: you must specify the filesystem type

Open in new window


sudo mount /dev/VolGroup00/lv_root ./lv_root

mount: you must specify the filesystem type

Open in new window


sudo mount -t ext3 /dev/VolGroup00/lv_root ./lv_root

mount: wrong fs type, bad option, bad superblock on /dev/mapper/VolGroup00-lv_root,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Open in new window

0
Daniel HelgenbergerCommented:
Can you please try to mount the other volume:
sudo mount /dev/VolGroup00/lv_usr2 /mnt

Open in new window

If this works, I suspect lv_root damaged.
0
dannymyungAuthor Commented:
sudo mount /dev/mapper/VolGroup00-lv_usr2 ./lv_usr2

mount: you must specify the filesystem type

Open in new window


sudo mount /dev/VolGroup00/lv_usr2 ./lv_usr2

mount: you must specify the filesystem type

Open in new window

0
Daniel HelgenbergerCommented:
Your drive seems to be garbage.
But please try it in another computer.
0
dbompartCommented:
Hahahaha its not garbage, lets start from the beggining again with more accurate and clear information:

Please, post the output of:

First run:

partprobe

Open in new window


Then run:

lsblk -o NAME,FSTYPE,LABEL,MOUNTPOINT,MODEL,SIZE

Open in new window


And just for debugging purposes also post the output of:

ls /etc/lvm/backup

Open in new window


and the content of each file inside this directory or attach them. (All this after of course having run pvscan, vgscan, lvscan, vgchange -ay and lvchange -ay.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dannymyungAuthor Commented:
drive has no data on it, thanks for the help though
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.