LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-09-2015, 02:57 PM   #1
rizean
LQ Newbie
 
Registered: Jun 2009
Posts: 7

Rep: Reputation: 0
LVM mount via USB


My father passed away about 6 months ago and I'm just getting around to going threw all 18 hard drives... I have been using Ubuntu 14.04 for over a year now and while I'm not a pro I can handle most things.

One drive has LVM on it. I have attached it via a USB2.0 to SATA cable. I followed the instructions here: http://linuxers.org/howto/how-mount-...rtitions-linux

Code:
michael [ ~ ]$ sudo fdisk -l
[sudo] password for michael: 

Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x38431b10

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048  1464322047   732160000    7  HPFS/NTFS/exFAT
/dev/sda2      1464322048  2930272255   732975104    7  HPFS/NTFS/exFAT

Disk /dev/sdb: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders, total 500118192 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: 0x000656a3

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048    33560575    16779264   82  Linux swap / Solaris
/dev/sdb2   *    33560576    75505663    20972544   83  Linux
/dev/sdb3        75505664   500117503   212305920   83  Linux

Disk /dev/sdc: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 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: 0x000da346

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        2048      499711      248832   83  Linux
/dev/sdc2          501758  1465147391   732322817    5  Extended
/dev/sdc5          501760  1465147391   732322816   8e  Linux LVM
michael [ ~ ]$ sudo pvs
  PV         VG         Fmt  Attr PSize   PFree
  /dev/sdc5  ubuntu1-vg lvm2 a--  698.39g    0 
michael [ ~ ]$ sudo lvdisplay /dev/ubuntu1-vg
  --- Logical volume ---
  LV Path                /dev/ubuntu1-vg/root
  LV Name                root
  VG Name                ubuntu1-vg
  LV UUID                StErnb-Mtop-NaEy-faw4-wNk0-bY5I-6ARBmI
  LV Write Access        read/write
  LV Creation host, time ubuntu1, 2014-08-12 18:45:21 +0900
  LV Status              NOT available
  LV Size                694.39 GiB
  Current LE             177765
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
   
  --- Logical volume ---
  LV Path                /dev/ubuntu1-vg/swap_1
  LV Name                swap_1
  VG Name                ubuntu1-vg
  LV UUID                62DxMC-qLAo-6cU9-kA5H-kNoL-7B4t-1ZCQcK
  LV Write Access        read/write
  LV Creation host, time ubuntu1, 2014-08-12 18:45:21 +0900
  LV Status              NOT available
  LV Size                4.00 GiB
  Current LE             1024
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
   
michael [ ~ ]$ mount /dev/ubuntu1-vg/root /mnt
mount: only root can do that
michael [ ~ ]$ sudo mount /dev/ubuntu1-vg/root /mnt
mount: special device /dev/ubuntu1-vg/root does not exist
So where did I go wrong?
 
Old 01-09-2015, 04:39 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by rizean View Post
Code:
michael [ ~ ]$ sudo lvdisplay /dev/ubuntu1-vg
  --- Logical volume ---
  LV Path                /dev/ubuntu1-vg/root
  LV Name                root
  VG Name                ubuntu1-vg
  LV UUID                StErnb-Mtop-NaEy-faw4-wNk0-bY5I-6ARBmI
  LV Write Access        read/write
  LV Creation host, time ubuntu1, 2014-08-12 18:45:21 +0900
  LV Status              NOT available
  LV Size                694.39 GiB
  Current LE             177765
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
 ...
michael [ ~ ]$ sudo mount /dev/ubuntu1-vg/root /mnt
mount: special device /dev/ubuntu1-vg/root does not exist
So where did I go wrong?
Presumably, you need to activate that LV:
Code:
lvchange -ay /dev/ubuntu1-vg/root
 
Old 01-09-2015, 07:36 PM   #3
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
You can enter
Code:
sudo lvm
to enter LVM commands. Type help to get a list of all commands, quit to leave the command environment.
Code:
lvm> help
  Available lvm commands:
  Use 'lvm help <command>' for more information
   
  dumpconfig      Dump active configuration
  formats         List available metadata formats
  help            Display help for commands
  lvchange        Change the attributes of logical volume(s)
  lvconvert       Change logical volume layout
  lvcreate        Create a logical volume
  lvdisplay       Display information about a logical volume
  lvextend        Add space to a logical volume
  lvmchange       With the device mapper, this is obsolete and does nothing.
  lvmdiskscan     List devices that may be used as physical volumes
  lvmsadc         Collect activity data
  lvmsar          Create activity report
  lvreduce        Reduce the size of a logical volume
  lvremove        Remove logical volume(s) from the system
  lvrename        Rename a logical volume
  lvresize        Resize a logical volume
  lvs             Display information about logical volumes
  lvscan          List all logical volumes in all volume groups
  pvchange        Change attributes of physical volume(s)
  pvresize        Resize physical volume(s)
  pvck            Check the consistency of physical volume(s)
  pvcreate        Initialize physical volume(s) for use by LVM
  pvdata          Display the on-disk metadata for physical volume(s)
  pvdisplay       Display various attributes of physical volume(s)
  pvmove          Move extents from one physical volume to another
  pvremove        Remove LVM label(s) from physical volume(s)
  pvs             Display information about physical volumes
  pvscan          List all physical volumes
  segtypes        List available segment types
  vgcfgbackup     Backup volume group configuration(s)
  vgcfgrestore    Restore volume group configuration
  vgchange        Change volume group attributes
  vgck            Check the consistency of volume group(s)
  vgconvert       Change volume group metadata format
  vgcreate        Create a volume group
  vgdisplay       Display volume group information
  vgexport        Unregister volume group(s) from the system
  vgextend        Add physical volumes to a volume group
  vgimport        Register exported volume group with system
  vgmerge         Merge volume groups
  vgmknodes       Create the special files for volume group devices in /dev
  vgreduce        Remove physical volume(s) from a volume group
  vgremove        Remove volume group(s)
  vgrename        Rename a volume group
  vgs             Display information about volume groups
  vgscan          Search for all volume groups
  vgsplit         Move physical volumes into a new or existing volume group
  version         Display software and driver version information
lvm> quit
  Exiting.
 
Old 01-10-2015, 06:53 PM   #4
rizean
LQ Newbie
 
Registered: Jun 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by rknichols View Post
Presumably, you need to activate that LV:
Code:
lvchange -ay /dev/ubuntu1-vg/root

Thanks this work!
 
Old 01-10-2015, 07:45 PM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by rizean View Post
Thanks this work!
Please use the thread tools at the top to mark this SOLVED. Oops, now I see you did.

Last edited by rknichols; 01-10-2015 at 07:47 PM.
 
  


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 to mount a LVM filesysem on USB drive? Arodef Linux - Hardware 2 01-14-2011 06:37 PM
mount multiple lvm to single mount point mplike Linux - Software 3 03-02-2010 04:43 AM
mount an external usb lvm scc28y Linux - General 4 01-12-2009 09:35 PM
mount refusing to mount lvm volumes linuxmandrake Fedora 2 07-20-2005 06:06 PM
mount usb module then mount usb hard drive guanyu Linux - Hardware 1 10-08-2003 11:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:43 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