View previous topic :: View next topic |
Author |
Message |
Nullbodu n00b

Joined: 20 Aug 2016 Posts: 11
|
Posted: Wed Aug 24, 2016 10:45 pm Post subject: [Solved]Grub can't connect to lvmetad.socket. |
|
|
Hi,
I'm currently finishing my Gentoo installation and I get a bunch of errors when I install grub:
Code: | /run/lvm/lvmetad.socket: connect failed: No such file or directory
WARNING: Failed to connect to lvmetad. Falling back to internal scanning. |
The first thing I did was to run rc-update -v show and I saw there that lvmtad service was disabled.
I tried rc-service lvmetad start and I got a warning that I should not start services in chrooted envirnment. I exited chroot and checked (rc-service lvmetad status) if lvmetad was working outside of chroot and it did:
So what's the problem?
Also, do I need lvmetad service for actually running the system?
I've done some research and people say that it is basically unnecessary, but is it? Does anybody here use it? I've read that it provides better lvm performance if using multiple disks at the cost of some overhead.
I don't have much experience with LVM so I want to ask you for advice whether I need lvmtad service. So here is my setup:
I'm going to run the system on a laptop with core i3-4030U with two disks - one SSD (240gb) and one HDD (1TB).
2 PV groups, 2 LVs (one for SSD, another for HDD), 5 VGs (2 on SSD, 3 on HDD)
Since we are here, I'm going to run LUKS and see that dm-crypt service is disabled. Should I enable it? If so, at which runlevel? Default? Boot? Any other?
Thanks a lot in advance
Last edited by Nullbodu on Fri Aug 26, 2016 7:53 pm; edited 1 time in total |
|
Back to top |
|
 |
324874 Apprentice

Joined: 26 Jul 2014 Posts: 168
|
Posted: Thu Aug 25, 2016 8:08 am Post subject: |
|
|
Hi nullbodu!
A search would have allowed to answer the most important questions. (Your presentation is good. )
I don't know GRUB but you search in the manual (man or info) for an explanation of the error messages.
chroot means change root (man chroot). In the handbook, the new root is /mnt/gentoo.
lvmetad wrote: | lvmetad is a metadata caching daemon for LVM. The daemon receives notifications from udev rules (which must be installed for LVM to work correctly when lvmetad is in use).
Through these notifications, lvmetad has an up-to-date and consistent image of the volume groups available in the system. |
Your error message about lvmetad (man 8 lvmetad) is meaningful.
Code: | /run/lvm/lvmetad.socket: connect failed: No such file or directory. |
There is no file or directory named /mnt/gentoo/run/lvm/lvmetad.socket.
nullbody wrote: | ... I exited chroot and checked ... lvmetad status ... So what's the problem? |
Linux (kernel) is loaded into memory at startup. chroot creates a new environment (based on the previous one?) in memory (process). (see also chroot guide, chroot, 32 bits chroot guide)
nullbody wrote: | ... I don't have much experience with LVM ... I'm going to run LUKS ... If so, at which runlevel? Default? Boot? Any other? ... |
See also LVM and Dm-crypt wiki pages and read appropriate manual pages.
Another useful guide: (Guidelines: read before posting)
Best regards, feng. |
|
Back to top |
|
 |
Nullbodu n00b

Joined: 20 Aug 2016 Posts: 11
|
Posted: Thu Aug 25, 2016 6:17 pm Post subject: |
|
|
feng wrote: | Code: | /run/lvm/lvmetad.socket: connect failed: No such file or directory. |
There is no file or directory named /mnt/gentoo/run/lvm/lvmetad.socket.
|
Yep, you know, I've been thinking about that... And I thought what if I can mount /run/lvm/lvmetad.socket of my Live environment to /mnt/gentoo/run/lvm? I've been reading man mount and I guess I should run
Code: | mount --rbind /run/lvm/lvmetad.socket /mnt/gentoo/run/lvm |
but I'm sort of unsure and scared to break things, can somebody, please, clarify that I'm doing right thing? |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 44195 Location: 56N 3W
|
Posted: Thu Aug 25, 2016 6:35 pm Post subject: |
|
|
Nullbodu,
Code: | /run/lvm/lvmetad.socket: connect failed: No such file or directory
WARNING: Failed to connect to lvmetad. Falling back to internal scanning. |
That's a feature, not a fatal error. Internal scanning will work for some time yet.
When you install grub, it wants to consult /etc/mtab, which is missing in the chroot, since all the mounts happened and were recorded in the /etc/mtab outside the chroot.
/etc/mtab is not usually a file any more, its a symbolic link.
Code: | $ ls /etc/mtab -l
lrwxrwxrwx 1 root root 17 May 4 2015 /etc/mtab -> /proc/self/mounts |
Provided that you mounted proc inside the chroot, that sill works.
What makes you think that grub did not install? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
Nullbodu n00b

Joined: 20 Aug 2016 Posts: 11
|
Posted: Fri Aug 26, 2016 7:52 pm Post subject: |
|
|
NeddySeagoon wrote: |
What makes you think that grub did not install? |
Well, I got errors and I then thought that it wouldn't work... Should have tested before creating a thread.
Anyway, it works, thanks! |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|