LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-01-2016, 04:36 PM   #1
FrizzledOldButt
Member
 
Registered: Dec 2015
Posts: 129

Rep: Reputation: Disabled
USB HDDs confuse LVM mount


Not sure this is the right category, but here goes;

I have set up a file server around Ubuntu Server 14.04 LTS

The storage is a LVM made of of six internal HDDs, /dev/sdb1.../dev/sbf1

This works fine on boot, provided no other (USB) drives are plugged in. Once the system is running I can plug the USB drives in and they will be assigned device names in sequence, i.e., /dev/sdh1 etc....

However, if the USB drives are plugged in before booting the system, they are assigned at /dev/sbc.... and I am finding that the lvm01 no longer mounts correctly. I assume from the behaviour that the LVM is assembled by device names, rather than a unique identifier?

I checked the PC's BIOS and see that in the HDD hardware list the USB drives appear after the fixed HDDs, so it seems unlikely that the BIOS drive priority is at fault.

Irrespective, is there away around this undesired behaviour, i.e. that plugged in USB drives don't upset the mounting of the LVM?

NB: I should add that I want to mount a couple of USB HDDs at boot for backup purposes.

Thanks...
 
Old 04-01-2016, 05:12 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
The LVM structure is assembled be examining the UUIDs in the LVM PV headers. The device names don't matter other than being checked against a filter list that can exclude some device names from being scanned. If you have ever copied partitions or entire drives then you could have duplicate UUIDs, and that would definitely cause confusion.

With the USB drives connected, run the "blkid" command (as root) and see if you have any duplicate UUIDs listed.
 
Old 04-01-2016, 05:29 PM   #3
FrizzledOldButt
Member
 
Registered: Dec 2015
Posts: 129

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
With the USB drives connected, run the "blkid" command (as root) and see if you have any duplicate UUIDs listed.
Thanks for your response. I had already checked the UUIDs. They are all unique.

I have tracked the problem to a single USB HDD, a Seagate 4T USB3 unit. It is, of course, the one that figures most critically in my backup strategy ;-)

Re the UUIDs, I thought they were in hardware? If not, would re-partitioning assign a new UUID?

Last edited by FrizzledOldButt; 04-01-2016 at 05:42 PM.
 
Old 04-01-2016, 06:28 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
The UUIDs are recorded in the data structures on the drives. Each LVM physical volume has a UUID recorded in the PV header. The structure of the volume group is replicated in the header of every PV in the VG and lists the UUIDs of all the PVs in the group. You can see a neatly formatted representation of the data in the files in the /etc/lvm/backup driectory. It is those UUIDs, and not the device names, that are used to assemble the volume group. If you look at the files in /etc/lvm/backup, you will see device names there with a comment, "# Hint only". Those fields are mostly for human consumption, and show where each PV was last found.

A little more detail beyond "no longer mounts correctly" is needed. Is the volume group assembled correctly? What does "lvs" show? What are the relevant lines in /etc/fstab for mounting the LVs? Just what is failing?
 
Old 04-01-2016, 06:53 PM   #5
FrizzledOldButt
Member
 
Registered: Dec 2015
Posts: 129

Original Poster
Rep: Reputation: Disabled
Thanks RK. It gives me something to go on.

I'll get my head around it and will fiddle about over the weekend.

Cheers
 
Old 04-01-2016, 09:04 PM   #6
FrizzledOldButt
Member
 
Registered: Dec 2015
Posts: 129

Original Poster
Rep: Reputation: Disabled
SOLVED: USB HDDs confuse LVM mount

Fixed! There was faulty power connector on one of the internal drives. Replaced it and I can now mount all drives at boot.

Thanks

Last edited by FrizzledOldButt; 04-01-2016 at 09:05 PM. Reason: Mark as solved
 
Old 04-01-2016, 10:23 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Thanks for update - bloody power glitches ... :0)

Use "thread tools" (first post) to mark it solved.
 
  


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
[SOLVED] LVM mount via USB rizean Linux - Newbie 4 01-10-2015 07:45 PM
How to mount a LVM filesysem on USB drive? Arodef Linux - Hardware 2 01-14-2011 06:37 PM
Setup slack13 over 2 dm-crypted lvm hdds carlitoco Slackware 4 09-24-2009 02:18 PM
mount an external usb lvm scc28y Linux - General 4 01-12-2009 09:35 PM
lvm issues: trouble adding HDDs spargonaut Linux - Software 1 04-28-2007 02:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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