• LVM - Attempt of mounting a logical volume


    Hi everyone,
    I am new. I have recently installed Antergos, some days ago.
    I’m now trying to use a USB Key where files from my previous computer.
    There are two issues involved :

    • one that you guys here will not deal with, as it’s another distribution (Linux Rosa) that is involved : that old computer has become autistic, does not want to recognize either internet or a USB Key;
    • the USB Key is one that I have used a couple of weeks ago, experimenting logical volumes. I used to have that USB Key permanently present, as if it was a part of the hard disk, with three logical volumes, each one mounted in a sub directory at /mnt.
      So … On my new laptop I have installed gparted and checked that it can see there are physical volumes on that USB Key … Then I have entered some command lines (logged as root) :
     1  lvdisplay
        2  cd /mnt
        3  mkdir orange
        4  cd orange
        5  mkdir -p racine/home
        6  mkdir -p racine/var
        7  mount /dev/VGcle/LVracine /mnt/orange/racine
        8  mount LVracine /mnt/orange/racine
        9   ls
       10  ls racine
       11  mount xl8LaN-uP2Y-5YPD-bG00-CcPs-YIet-MMD37k /mnt/orange/racine
    
    

    In spite of what says lvdisplay - I was then relieved - there’s no way to apply the mount command on a logical volume. Here is the message that I get after command number 7 :

    mount /dev/VGcle/LVracine /mnt/orange/racine
    mount: /mnt/orange/racine : le périphérique spécial /dev/VGcle/LVracine n'existe pas.
    

    Nonetheless “/dev/VGcle/LVracine” is the name of that logical volume, according to lvdisplay.

    So … How to mount it ?

  • Hi,

    If I’m not wrong, you first need to activate the volume group, and then you can mount the lvm logic volume.

    So, first, try to scan for your volume with:
    sudo vgscan

    If your volume shows up, then you can activate it. Imagine it’s called antergos, then you have to:
    sudo vgchange -ay antergos

    Then you can try to find your logical volume name (if you don’t remember it) with:
    sudo lvs

    If the name is ‘root’ (for instance) then you must mount it this way

    sudo mkdir /mnt/root
    sudo mount /dev/antergos/root /mnt/root
    

    Hope this helps!

  • So … I started with the lvdisplay command. As yesterday it gave me :

    [[email protected] ~]# lvdisplay
      WARNING: Device for PV 4Nzm45-1qmg-1r8m-wMVl-0Igs-v402-zFA3yT not found or rejected by a filter.
      Couldn't find device with uuid 4Nzm45-1qmg-1r8m-wMVl-0Igs-v402-zFA3yT.
      --- Logical volume ---
      LV Path                /dev/VGcle/LVhome
      LV Name                LVhome
      VG Name                VGcle
      LV UUID                a26GQj-CGZ0-TcYo-gOhh-3Mho-Q23Q-dADKKI
      LV Write Access        read/write
      LV Creation host, time sturgeon, 2018-03-26 19:51:22 -0600
      LV Status              NOT available
      LV Size                25,00 GiB
      Current LE             6400
      Segments               3
      Allocation             inherit
      Read ahead sectors     auto
       
      --- Logical volume ---
      LV Path                /dev/VGcle/LVvar
      LV Name                LVvar
      VG Name                VGcle
      LV UUID                txkQtY-2PWt-8bmM-1eFe-XW4g-y0I9-nqJrNp
      LV Write Access        read/write
      LV Creation host, time sturgeon, 2018-03-26 19:55:53 -0600
      LV Status              NOT available
      LV Size                <1,40 GiB
      Current LE             358
      Segments               1
      Allocation             inherit
      Read ahead sectors     auto
       
      --- Logical volume ---
      LV Path                /dev/VGcle/LVracine
      LV Name                LVracine
      VG Name                VGcle
      LV UUID                xl8LaN-uP2Y-5YPD-bGO0-CcPs-YIet-MMD37k
      LV Write Access        read/write
      LV Creation host, time sturgeon, 2018-03-26 19:56:14 -0600
      LV Status              NOT available
      LV Size                1,35 GiB
      Current LE             346
      Segments               2
      Allocation             inherit
      Read ahead sectors     auto
    
    

    Then I did, as you asked, a vgscan that gave this :

    [[email protected] ~]# vgscan
      Reading volume groups from cache.
      WARNING: Device for PV 4Nzm45-1qmg-1r8m-wMVl-0Igs-v402-zFA3yT not found or rejected by a filter.
      Couldn't find device with uuid 4Nzm45-1qmg-1r8m-wMVl-0Igs-v402-zFA3yT.
      Found volume group "VGcle" using metadata type lvm2
    [[email protected] ~]# lvs
      WARNING: Device for PV 4Nzm45-1qmg-1r8m-wMVl-0Igs-v402-zFA3yT not found or rejected by a filter.
      Couldn't find device with uuid 4Nzm45-1qmg-1r8m-wMVl-0Igs-v402-zFA3yT.
      LV       VG    Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
      LVhome   VGcle -wi-----p- 25,00g                                                    
      LVracine VGcle -wi-------  1,35g                                                    
      LVvar    VGcle -wi------- <1,40g   
    

    I launched the vgchange -ay command, as you said. It gave this :

    [[email protected] mnt]# vgchange -ay VGcle
      WARNING: Device for PV 4Nzm45-1qmg-1r8m-wMVl-0Igs-v402-zFA3yT not found or rejected by a filter.
      Couldn't find device with uuid 4Nzm45-1qmg-1r8m-wMVl-0Igs-v402-zFA3yT.
      Refusing activation of partial LV VGcle/LVhome.  Use '--activationmode partial' to override.
      2 logical volume(s) in volume group "VGcle" now active
    
    

    LVhome is the biggest and most important logical volume.
    I launched then this :

    [[email protected] mnt]# vgchange -ay --activationmode partial VGcle
      PARTIAL MODE. Incomplete logical volumes will be processed.
      WARNING: Device for PV 4Nzm45-1qmg-1r8m-wMVl-0Igs-v402-zFA3yT not found or rejected by a filter.
      Couldn't find device with uuid 4Nzm45-1qmg-1r8m-wMVl-0Igs-v402-zFA3yT.
      3 logical volume(s) in volume group "VGcle" now active
    
    

    Big relief : there are 3 active logical volumes in that USB Key, and all of them are active. Let’s use them ? but it failed :

    [[email protected] mnt]# mkdir LVracine
    [[email protected] mnt]# mount /dev/VGcle/LVracine /mnt/LVracine
    mount: /mnt/LVracine : mauvais type de système de fichiers, option erronée, superbloc erroné sur /dev/mapper/VGcle-LVracine, page de code ou programme auxiliaire manquant, ou autre erreur.
    
    

    There’s either a bad format or … something else.

  • Attempting to find reasons why it fails, I have opened Gparted.

    Gparted does not give a view on the logical volumes, but shows the underlying physical volumes.
    0_1533740499747_2018-08-08-gparted.png

    There are several physical volumes that were altogether merged into one volume group, that I named VGcle (“the volume group that is in my key”).

    I have installed a more powerful tool : the KDE partition manager.
    It gives more details. We can see how are the logical volumes.

    0_1533740571581_2018-08-08-partitionmanager-2.png

    Two of the logical volumes are jfs, the other one (the most important : home) is “unknown”.

    Is there a problem with the jfs format ?

  • To see the physical volumes that are in my USB Key (currently at /dev/sdc), instead of opening a partition manager (like the default one : Gparted) I can launch this command : parted … print. It gives me this :

    [[email protected] mnt]# parted /dev/sdc print
    Modèle: Generic Flash Disk (scsi)
    Disque /dev/sdc : 31,0GB
    Taille des secteurs (logiques/physiques): 512B/512B
    Table de partitions : gpt
    Disk Flags: 
    
    Numéro  Début   Fin     Taille  Système de fichiers  Nom       Fanions
     1      1049kB  1000MB  999MB                        info
     2      1000MB  11,0GB  9999MB                       part01
     3      11,0GB  21,0GB  10,0GB                       part02
     4      21,0GB  30,0GB  9000MB                       parti03
     5      30,0GB  31,0GB  1037MB                       derniere
    
    

    One of the physical volumes has an “unknown” name. It should be /dev/sdc3 but it’s just “unknown”.
    This shows up when typing this command :

    [[email protected] mnt]# vgdisplay -v
      WARNING: Device for PV 4Nzm45-1qmg-1r8m-wMVl-0Igs-v402-zFA3yT not found or rejected by a filter.
      Couldn't find device with uuid 4Nzm45-1qmg-1r8m-wMVl-0Igs-v402-zFA3yT.
        There are 1 physical volumes missing.
      
    SAME DISPLAY AS WITH LVDISPLAY. Then :
       
      --- Physical volumes ---
      PV Name               /dev/sdc2     
      PV UUID               ZzRr4U-Pyyx-jQ44-Neu8-Ntz6-85Ne-3XG1A1
      PV Status             allocatable
      Total PE / Free PE    2383 / 0
       
      PV Name               [unknown]     
      PV UUID               4Nzm45-1qmg-1r8m-wMVl-0Igs-v402-zFA3yT
      PV Status             allocatable
      Total PE / Free PE    2384 / 0
       
      PV Name               /dev/sdc4     
      PV UUID               mbcmGr-myIS-WJdb-773J-yFx9-WuHJ-S9S7du
      PV Status             allocatable
      Total PE / Free PE    2145 / 0
       
      PV Name               /dev/sdc1     
      PV UUID               mXcwc3-R5Mf-xV5w-I2Pl-lDNc-RAZP-tgusVq
      PV Status             allocatable
      Total PE / Free PE    238 / 46
       
      PV Name               /dev/sdc5     
      PV UUID               jaczWu-S93U-WiXa-WqpG-TSXy-PjrG-wDMIjU
      PV Status             allocatable
      Total PE / Free PE    247 / 247
    
    

    The unknown physical volume whose UUID begins with 4Nzm45 is the one that appears in the warnings.

  • My conclusion is that I will use that USB Key once I install again Linux Rosa on another computer.

installation289 Posts 6Views 272
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.