Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.