Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #202648 > unrolled thread

Mounting LVM logical volumes in break=premount

Started bySophie Loewenthal <sophie@klunky.co.uk>
First post2018-11-21 09:50 +0100
Last post2018-11-21 23:20 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.debian.user

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Mounting LVM logical volumes in break=premount Sophie Loewenthal <sophie@klunky.co.uk> - 2018-11-21 09:50 +0100
    Re: Mounting LVM logical volumes in break=premount Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-11-21 20:40 +0100
      Re: Mounting LVM logical volumes in break=premount Sophie Loewenthal <sophie@klunky.co.uk> - 2018-11-21 22:20 +0100
        Re: Mounting LVM logical volumes in break=premount Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-11-21 23:20 +0100

#202648 — Mounting LVM logical volumes in break=premount

FromSophie Loewenthal <sophie@klunky.co.uk>
Date2018-11-21 09:50 +0100
SubjectMounting LVM logical volumes in break=premount
Message-ID<wWwmR-44i-5@gated-at.bofh.it>
Hi,

I could not mount some LVM ext4 filesystems on a server earlier this week and was trying to work out what I had to do to make it work.  

I had booted into break=premount ( added to the end of the linux line in Grub ) to fix an error in /etc/fstab that caused root from mounting

I could access volume groups via the LVM command:
%  lvm vgs
VG  #PV #LV #SN Attr   VSize    VFree   
vg0 1   4   0 wz--n-  <99.50g  <28.11g
vg1 1   1   0 wz--n- <500.00g 1020.00m

but when I ran ,
% mount /dev/mapper/vg0-root /tmp/a
I recall a message stating the fs count not be mounted because of wrong file system type.

Did I miss a module that had to be loaded for this to work, or is premount the wrong place to try this?

( In the end I rolled back to a snapshot that worked, but I should know for the future. )

Regards, S
Sent from phone, thus brief

[toc] | [next] | [standalone]


#202670

FromPascal Hambourg <pascal@plouf.fr.eu.org>
Date2018-11-21 20:40 +0100
Message-ID<wWGvU-20E-3@gated-at.bofh.it>
In reply to#202648
Le 21/11/2018 à 09:31, Sophie Loewenthal a écrit :
> 
> I could not mount some LVM ext4 filesystems on a server earlier this week and was trying to work out what I had to do to make it work.
> 
> I had booted into break=premount ( added to the end of the linux line in Grub ) to fix an error in /etc/fstab that caused root from mounting
> 
> I could access volume groups via the LVM command:
> %  lvm vgs
> VG  #PV #LV #SN Attr   VSize    VFree
> vg0 1   4   0 wz--n-  <99.50g  <28.11g
> vg1 1   1   0 wz--n- <500.00g 1020.00m
> 
> but when I ran ,
> % mount /dev/mapper/vg0-root /tmp/a
> I recall a message stating the fs count not be mounted because of wrong file system type.

1) Make sure the LV is activated, e.g. with vgchange -ay
2) The mount command in the initramfs may require to specify the 
filesystem type explicitly with -t.

[toc] | [prev] | [next] | [standalone]


#202673

FromSophie Loewenthal <sophie@klunky.co.uk>
Date2018-11-21 22:20 +0100
Message-ID<wWI4F-34H-3@gated-at.bofh.it>
In reply to#202670

On November 21, 2018 8:33:25 PM CET, Pascal Hambourg <pascal@plouf.fr.eu.org> wrote:
>Le 21/11/2018 à 09:31, Sophie Loewenthal a écrit :
>> 
>> I could not mount some LVM ext4 filesystems on a server earlier this
>week and was trying to work out what I had to do to make it work.
>> 
>> I had booted into break=premount ( added to the end of the linux line
>in Grub ) to fix an error in /etc/fstab that caused root from mounting
>> 
>> I could access volume groups via the LVM command:
>> %  lvm vgs
>> VG  #PV #LV #SN Attr   VSize    VFree
>> vg0 1   4   0 wz--n-  <99.50g  <28.11g
>> vg1 1   1   0 wz--n- <500.00g 1020.00m
>> 
>> but when I ran ,
>> % mount /dev/mapper/vg0-root /tmp/a
>> I recall a message stating the fs count not be mounted because of
>wrong file system type.
>
>1) Make sure the LV is activated, e.g. with vgchange -ay
>2) The mount command in the initramfs may require to specify the 
>filesystem type explicitly with -t.

Hi Pascal,
Thanks. I must have been alseep and missed the -t ext4 . makes sence hevause there is no fstab available for it to look up the fs type.

I know the vg was activated.

Thanks.

[toc] | [prev] | [next] | [standalone]


#202675

FromPascal Hambourg <pascal@plouf.fr.eu.org>
Date2018-11-21 23:20 +0100
Message-ID<wWJ0J-3Fo-1@gated-at.bofh.it>
In reply to#202673
Le 21/11/2018 à 22:09, Sophie Loewenthal a écrit :
> 
>>> but when I ran ,
>>> % mount /dev/mapper/vg0-root /tmp/a
>>> I recall a message stating the fs count not be mounted because of
>> wrong file system type.
>>
>> 1) Make sure the LV is activated, e.g. with vgchange -ay
>> 2) The mount command in the initramfs may require to specify the
>> filesystem type explicitly with -t.
> 
> Hi Pascal,
> Thanks. I must have been alseep and missed the -t ext4 . makes sence hevause there is no fstab available for it to look up the fs type.

AFAIK mount does not look up fstab when both the device and the mount 
point are specified. The initramfs uses a different mount command (from 
klibc-utils) from the regular mount (from util-linux). Util-linux mount 
auto-detects the filesystem type when missing, klibc-utils mount does not.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web