Unable to mount an LVM Hard-drive after upgrade

14,016

Solution 1

Solution discovered hours later!

This is a problem of LVM config not being preserved during the fresh install, and the install takes no interest in other disks in the system (sigh).

The clue for this came from: http://linuxwave.blogspot.sg/2007/11/mounting-lvm-disk-using-ubuntu-livecd.html

(This mini-editor makes a mess of text output!)

  • pvscan
  • vgscan
  • lvscan
  • vgchange -a y

root@argentine:/home/bruce# pvscan

 PV /dev/sdb1   VG tera01   lvm2 [931.00 GiB / 0    free]
Total: 1 [931.00 GiB] / in use: 1 [931.00 GiB] / in no VG: 0 [0   ]

root@argentine:/home/bruce# vgscan

Reading all physical volumes.  This may take a while...
Found volume group "tera01" using metadata type lvm2

root@argentine:/home/bruce# lvscan

inactive          '/dev/tera01/teravol00' [931.00 GiB] inherit

root@argentine:/home/bruce# vgchange -a y

1 logical volume(s) in volume group "tera01" now active

root@argentine:/home/bruce# lvscan

ACTIVE            '/dev/tera01/teravol00' [931.00 GiB] inherit

root@argentine:/home/bruce# mount -t ext3 /dev/sdb1 /tera

mount: /dev/sdb1 already mounted or /tera busy

root@argentine:/home/bruce# mount -t ext3 /dev/tera01/teravol00 /tera

root@argentine:/home/bruce# ls -l /tera

total 32
drwxr-xr-x. 3 root root  4096 Jun  2  2008 export
drwxrwxrwx. 5 root root  4096 Nov 15  2009 kept
drwx------  2 root root 16384 May 16  2009 lost+found

root@argentine:/home/bruce#

Bingo!!! (I really didn't want to dig them out of the backups!)

I then tried to add the following to to /etc/fstab (for re-boot)

/dev/tera01/teravol100 /tera ext3 defaults 0 2

but that didn't work, so I finally used the GUI system-config-lvm to set it to mount on re-boot. (I think it did something in the background to also activate LVM on re-boot.)

  • Hope this helps someone in the future.

Solution 2

I had a similar problem, but it was because webmin with Ubuntu 12.04 wanted to mount my old lvm volume as an ext4 file system, instead of an ext3 system. When I changed the fstab mount command to ext3 it mounted correctly.

I note in your texts initially your command referenced ext4 and later ext3. Might your problem not have been the same as mine?

Share:
14,016

Related videos on Youtube

Bruce Staples
Author by

Bruce Staples

Updated on September 18, 2022

Comments

  • Bruce Staples
    Bruce Staples over 1 year

    I imagine this is a basic gotcha ... but I can't see it. I have a system with 2(physical) harddrives.

    The boot system (/dev/sda) was running 10.04 & the second drive (/dev/sdb) was just a mounted filesystem.

    I did a clean load of Ubuntu 12.04 overwriting /dev/sda (not an upgrade) & now cannot mount the second drive. so I do not know what to enter it into the fstab ... I had expected to use:

    /dev/sdb /tera ext4 defaults 0 2

    But even manual mounting fails (I also have tried various "-t" options on the off chance!)

    sudo mount -t ext4 /dev/sdb1 /tera

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

    Output from disk queries indicate that it is a Linux LVM & a healthy disk still.

    sudo lshw -C disk

       *-disk:0
       description: ATA Disk
       product: WDC WD5000AACS-0
       vendor: Western Digital
       physical id: 0
       bus info: scsi@2:0.0.0
       logical name: /dev/sda
       version: 01.0
       serial: WD-WCASU1401098
       size: 465GiB (500GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 signature=00015a55
       *-disk:1
       description: ATA Disk
       product: WDC WD10EADS-00L
       vendor: Western Digital
       physical id: 1
       bus info: scsi@3:0.0.0
       logical name: /dev/sdb
       version: 01.0
       serial: WD-WCAU47836304
       size: 931GiB (1TB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5
    

    sudo fdisk -l

    Disk /dev/sda: 500.1 GB, 500106780160 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976771055 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: 0x00015a55

    Device Boot Start End Blocks Id System /dev/sda1 * 2048 972580863 486289408 83 Linux /dev/sda2 972582910 976769023 2093057 5 Extended /dev/sda5 972582912 976769023 2093056 82 Linux swap / Solaris

    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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

    Device Boot Start End Blocks Id System

    /dev/sdb1 1 1953525167 976762583+ 8e Linux LVM

    LVM doesn't appear to be an option for mount or fstab.

    ... and here's a Smart data Screenshot from Disk Utility.

    • Mitch
      Mitch almost 12 years
      Does the drive support NCQ? What is the status of Native Command Queuing (NCQ) on the drive in question?
    • Bruce Staples
      Bruce Staples almost 12 years
      Don't know, and not sure how that helps.
    • Bruce Staples
      Bruce Staples almost 12 years