• # Euh .... Comment dire ...

    Posté par . En réponse au message [Manjaro] Comment exclure de l'activation au démarrage une liste de volumes spécifiques?. Évalué à 2.

    J'ai d'abord pensé à écrire un simple script shell pour désactiver ces volumes une fois que la machine a démarré mais j'ai la flemme d'écrire une unité systemd juste pour ça.

    Tu veux qu'on le fasse à ta place ? Je peux, mais c'est pas gratuit ... Comme pour les devoirs d'étudiants ... :)

    J'ai aussi pensé à me servir du fichier de configuration /etc/lvm/lvm.conf mais je ne suis pas certain du résultat. Pas plus que de la façon d'y arriver, d'ailleurs.

    Ben Fais comme tout le monde : un coup de google et essai. Google m'a donné ça pour la recherche sur lvm.conf :

    https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/lvmconf_file

    Dans le fichier il y a plusieurs sections pour faire ce que tu veux :

     # Configuration option activation/volume_list.
     # Only LVs selected by this list are activated.
     # If this list is defined, an LV is only activated if it matches an
     # entry in this list. If this list is undefined, it imposes no limits
     # on LV activation (all are allowed).
     # 
     # Accepted values:
     # vgname
     # The VG name is matched exactly and selects all LVs in the VG.
     # vgname/lvname
     # The VG name and LV name are matched exactly and selects the LV.
     # @tag
     # Selects an LV if the specified tag matches a tag set on the LV
     # or VG.
     # @*
     # Selects an LV if a tag defined on the host is also set on the LV
     # or VG. See tags/hosttags. If any host tags exist but volume_list
     # is not defined, a default single-entry list containing '@*'
     # is assumed.
     # 
     # Example
     # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
     # 
     # This configuration option does not have a default value defined.
    
     # Configuration option activation/auto_activation_volume_list.
     # Only LVs selected by this list are auto-activated.
     # This list works like volume_list, but it is used only by
     # auto-activation commands. It does not apply to direct activation
     # commands. If this list is defined, an LV is only auto-activated
     # if it matches an entry in this list. If this list is undefined, it
     # imposes no limits on LV auto-activation (all are allowed.) If this
     # list is defined and empty, i.e. "[]", then no LVs are selected for
     # auto-activation. An LV that is selected by this list for
     # auto-activation, must also be selected by volume_list (if defined)
     # before it is activated. Auto-activation is an activation command that
     # includes the 'a' argument: --activate ay or -a ay. The 'a' (auto)
     # argument for auto-activation is meant to be used by activation
     # commands that are run automatically by the system, as opposed to LVM
     # commands run directly by a user. A user may also use the 'a' flag
     # directly to perform auto-activation. Also see pvscan(8) for more
     # information about auto-activation.
     # 
     # Accepted values:
     # vgname
     # The VG name is matched exactly and selects all LVs in the VG.
     # vgname/lvname
     # The VG name and LV name are matched exactly and selects the LV.
     # @tag
     # Selects an LV if the specified tag matches a tag set on the LV
     # or VG.
     # @*
     # Selects an LV if a tag defined on the host is also set on the LV
     # or VG. See tags/hosttags. If any host tags exist but volume_list
     # is not defined, a default single-entry list containing '@*'
     # is assumed.
     # 
     # Example
     # auto_activation_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
     # 
     # This configuration option does not have a default value defined.
    
     # Configuration option activation/read_only_volume_list.
     # LVs in this list are activated in read-only mode.
     # If this list is defined, each LV that is to be activated is checked
     # against this list, and if it matches, it is activated in read-only
     # mode. This overrides the permission setting stored in the metadata,
     # e.g. from --permission rw.
     # 
     # Accepted values:
     # vgname
     # The VG name is matched exactly and selects all LVs in the VG.
     # vgname/lvname
     # The VG name and LV name are matched exactly and selects the LV.
     # @tag
     # Selects an LV if the specified tag matches a tag set on the LV
     # or VG.
     # @*
     # Selects an LV if a tag defined on the host is also set on the LV
     # or VG. See tags/hosttags. If any host tags exist but volume_list
     # is not defined, a default single-entry list containing '@*'
     # is assumed.
     # 
     # Example
     # read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
     # 
     # This configuration option does not have a default value defined.
    

    A moon avis tu as eu juste la flemme tout court de chercher :). Mais puisque ça m'arrive aussi parfois, je t'ai répondu :)