vg and lv group devices not created at boot time

My system is running SUSE 12.1

Linux crafty 3.1.0-1.2-desktop #1 SMP PREEMPT Thu Nov 3 14:45:45 UTC 2011 (187dde0) i686 athlon i386 GNU/Linux

After installation I added the following line to /etc/fstab
to gain access to my data disk which was created under Fedora 15 as a logical volume.

/dev/vg_data/lv_data /BigDisk ext4 defaults,noatime 1 2

This worked for several months but now (I think after an update last week)
when I reboot the system – /dev/vg_data/lv_data – is no longer created.

As root from the command line I can create it by

vgchange -ay vg_data

then

mount /dev/vg_data/lv_data /BigDisk -o rw,user

will give me access to the second disk

How do I get the vgscan to happen at boot time?
I assume there is a module not loading, if so whats it called?

Welcome her new poster.

While waiting for a usefull answer, please read this on how to post computer output in such a way that it’s layout is not lost: http://forums.opensuse.org/english/information-new-users/advanced-how-faq-read-only/451526-posting-code-tags-guide.html

On 02/01/2012 04:56 PM, gdr01 wrote:
>
> My system is running SUSE 12.1
>
> Linux crafty 3.1.0-1.2-desktop #1 SMP PREEMPT Thu Nov 3 14:45:45 UTC
> 2011 (187dde0) i686 athlon i386 GNU/Linux
>
> After installation I added the following line to /etc/fstab
>
> to gain access to my data disk which was created under Fedora 15 as a
> logical volume.
>
> /dev/vg_data/lv_data /BigDisk ext4 defaults,noatime 1 2
>
>
> This worked for several months but now (I think after an update last
> week)

has this machine had other than 12.1 installed? i mean, you say it
worked ok for several months but, 12.1 was only born 2.5 months ago…

anyway, i wonder if any of those disks are some level of RAID and if you
are booting systemd or systemv

wait: i see it is LVM…which means i can’t help…

but, yes i also guess if you installed a newer kernel you may also have
to compile a new lvm module for it…maybe?? while waiting for a real
guru to ride over the hill, maybe some of these will be a little helpful

http://www.google.com/search?q=site%3Adoc.opensuse.org+compile+lvm+kernel+module

http://www.google.com/search?q=compile+linux+lvm+kernel+module

on the other hand, why wouldn’t YaST do that automatically? hmmmmm

hmmmm, wait: you can give commands to have those disks mounted without
loading a driver…so ???


DD http://tinyurl.com/DD-Caveat
Read what Distro Watch writes: http://tinyurl.com/SUSEonDW

The problem here is a bit that you are not very sure about that update. I mean when the problem started with the first boot after an update you should know. And then you could try to rollback that to see if it goes away. And then maybe file a bug report.

Yes that should be weeks not months. I installed SUSE 12.1 from the LXF153 magazine’s DVD in early December 2011.
The PC originally ran WIn XP. This is my partners PC who I have finally converted to Linux. I let her try Fedora with the various Desktops and as
she preferred KDE I went with SUSE as to me they are the KDE experts. The PC has 2 disks. I disconnected the 2nd disk and installed SUSE 12.1.
Once the PC was up and running ok I added the mount line to /etc/fstab and everything worked fine.
Last week I invoked an update through YAST and never noticed that the second disk was not automatically mounting after a reboot.
This is why the ‘when’ is vague as the second disk only has photos on and only accessed when new photo’s are added.

PC just booted


root ~ #  lsblk -f                                                                                                                                                               
NAME   FSTYPE      LABEL MOUNTPOINT                                                                                                                                                
sda                                                                                                                                                                                
├─sda1 swap              [SWAP]                                                                                                                                                    
├─sda2 ext4              /                                                                                                                                                         
└─sda3 ext4              /home                                                                                                                                                     
sdb                                                                                                                                                                                
└─sdb1 LVM2_member

sr0
root ~ #  mount -t ext4 |column -t                                                                                                                                                 
   /dev/sda2  on  /      type  ext4  (rw,relatime,user_xattr,acl,barrier=1,data=ordered)                                                                                              
   /dev/sda3  on  /home  type  ext4  (rw,relatime,user_xattr,acl,barrier=1,data=ordered)                      
  

After running commands to mount 2nd disk


root ~ #  vgscan                                                                                                                                                                   
    Reading all physical volumes.  This may take a while...                                                                                                                          
    Found volume group "vg_data" using metadata type lvm2                                                                                                                            

root ~ #  vgchange -ay vg_data                                                                                                                                                     
   1 logical volume(s) in volume group "vg_data" now active                                                                                                                         

root ~ #  mount /dev/vg_data/lv_data /BigDisk -o rw,user                                                                                                                           

root ~ #  mount -t ext4 |column -t                                                                                                                                                 
/dev/sda2                    on  /         type  ext4  (rw,relatime,user_xattr,acl,barrier=1,data=ordered)                                                                         
/dev/sda3                    on  /home     type  ext4  (rw,relatime,user_xattr,acl,barrier=1,data=ordered)                                                                         
/dev/mapper/vg_data-lv_data  on  /BigDisk  type  ext4  (rw,nosuid,nodev,noexec,relatime,user_xattr,acl,barrier=1,data=ordered)       

root ~ #  ls -l  /dev/vg_data/lv_data                                                                                                                                                   
lrwxrwxrwx 1 root root 7 Feb  2 08:39 /dev/vg_data/lv_data -> ../dm-0      
                              

The /dev/vg_data/lv_data link only appears after the vgchange command is run.

I have created a wee script to do this but one needs to be root at the command line to run it.

So why does the system not scan for logical volumes at boot?

Again, I can only guess. When this was on a new 12.1 iinstall after it worked on say 11.4, I would suggest going to sysvinit instead of systemd. Now when you say it worked allready in 12.1 (under systemd) that may be useless. But OTOH systemd is quite new and it may thus be likely that it was updated in that famous update (making it worse for you instead of better).

Thus my suggestion: try to boot in using sysvinit and see what happens.

On 02/02/2012 09:56 AM, gdr01 wrote:
> So why does the system not scan for logical volumes at boot?

i can’t answer that question…but hopefully someone else will step up
here…

if not you may need to visit the next higher level of expertise (we here
are mostly users helping users…the real hackers/guru’s hang on mail
lists and/or Internet Relay Chat, you can easily contact them by
starting here: http://en.opensuse.org/openSUSE:Communication_channels)

depending on time of day and who is awake i guess you will get a quick
answer…

one thing you might do before contacting them is nail down (if you can)
the likely bad update actors…you should be able to find the potentials
black hat updates in /var/log/zypp/history or with an rpm command i
can’t pull out of the cobwebs this second…

hmmmm, i think you could drop the wee script into the mix and have it
executed as root, see here: systemd using the after.local script in
openSUSE 12.1, at http://tinyurl.com/6r8hxpd

BUT, i think that is kludge, and i think you probably have discovered a
bug in the update or systemd or or…and instead of masking it with a
auto-run script i think it would be best to chat with the devs…

i’d expect you soon to find someone in mail/irc who can tell you the
mistake (you) made :slight_smile: and how to fix it, or ask you to put it into a bug…

in fact, a bug might be the best next step if you don’t soon get a good
answer here, start: http://tinyurl.com/nzhq7j

no matter which way it goes, please keep this thread in the loop (so
those who google in on the problem words can find what is
happening…especially: when/if you have a bug number/URL drop that into
this thread, please…

and, you can reference this thread to the devs/hackers with:
http://forums.opensuse.org/showthread.php?t=471935


DD
Read what Distro Watch writes: http://tinyurl.com/SUSEonDW

On 2012-02-02 12:09, DenverD wrote:

> or with an rpm command i can’t pull
> out of the cobwebs this second…

rpm -qa --last

Or a rather involved line I use:


rpm -q -a --queryformat "%{INSTALLTIME};%{INSTALLTIME:day}; \
%{BUILDTIME:day}; %{NAME};%{VERSION}-%-7{RELEASE};%{arch}; \
%{VENDOR};%{PACKAGER};%{DISTRIBUTION};%{DISTTAG}
" \
| sort | cut --fields="2-" --delimiter=\; \
| tee rpmlist.csv | less -S

or

rpm -q -a --queryformat "%{INSTALLTIME}	%{INSTALLTIME:day} \
%{BUILDTIME:day} %-30{NAME}	%15{VERSION}-%-7{RELEASE}	%{arch} \
%25{VENDOR}%25{PACKAGER} == %{DISTRIBUTION} %{DISTTAG}
" \
| sort | cut --fields="2-" > rpmlist

The first version produces a .csv file you can import on a calc sheet.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

gdr01 wrote:
> The /dev/vg_data/lv_data link only appears after the vgchange command
> is run.
>
> I have created a wee script to do this but one needs to be root at the
> command line to run it.
>
> So why does the system not scan for logical volumes at boot?

I can’t help much, but here’s what I do know. I use LVM and scan various
mail lists and these forums but haven’t seen anything similar to this
problem with 12.1. So there’s a chance it’s a new problem. It might be
worth searching bugzilla or googling to see if you can find other reports.

I have an external USB disk that uses LVM and it sometimes shows a
similar symptom but that machine runs 11.3. (no screams from the
righteous, please). But usually it boots OK and I haven’t figured what
the circumstances are that cause the problem.

Apart from looking for other reports of the same problem, I can think of
two approaches:
-1- trace through the initialization code and see if you can spot what’s
not working
-2- dig through the update logs and see if you can guess which part of
what update broke your system

HTH, Dave

As this was not my own system I gave up trying to find a fix. I have not got my head around systemd yet.
I read on the Fedora forums that some people had found that read/writes on logical volume filesystems were slower than using a normal ext4 fle system.
So I backed up all the data and recreated it as a ext4 filesystem, added the mount line to /etc/fstab and it all works as expected now.
As for a speed difference - I am not sure. Copying the data back seemed quicker but that could be because everything would have been contigous - the source and the target.

Thanks for the suggestions - I see you want to keep this open to snag other similar incidents - for me I am done.
cheers

On 02/07/2012 11:46 AM, gdr01 wrote:
> As this was not my own system I gave up trying to find a fix.

did you also not file a bug???


DD
Read what Distro Watch writes: http://tinyurl.com/SUSEonDW

Pity, I would have liked to see if the issue existed when booting with sysvinit instead of systemd.