Questo contenuto non è disponibile nella lingua selezionata.

3.2. Configuring an LVM Volume with an ext4 File System


This use case requires that you create an LVM logical volume on storage that is shared between the nodes of the cluster.
The following procedure creates an LVM logical volume and then creates an ext4 file system on that volume. In this example, the shared partition /dev/sdb1 is used to store the LVM physical volume from which the LVM logical volume will be created.

Note

LVM volumes and the corresponding partitions and devices used by cluster nodes must be connected to the cluster nodes only.
Since the /dev/sdb1 partition is storage that is shared, you perform this procedure on one node only,
  1. Create an LVM physical volume on partition /dev/sdb1.
    [root@z1 ~]# pvcreate /dev/sdb1
      Physical volume "/dev/sdb1" successfully created
    
    Copy to Clipboard Toggle word wrap
  2. Create the volume group my_vg that consists of the physical volume /dev/sdb1.
    [root@z1 ~]# vgcreate my_vg /dev/sdb1
      Volume group "my_vg" successfully created
    
    Copy to Clipboard Toggle word wrap
  3. Create a logical volume using the volume group my_vg.
    [root@z1 ~]# lvcreate -L450 -n my_lv my_vg
      Rounding up size to full physical extent 452.00 MiB
      Logical volume "my_lv" created
    
    Copy to Clipboard Toggle word wrap
    You can use the lvs command to display the logical volume.
    [root@z1 ~]# lvs
      LV      VG      Attr      LSize   Pool Origin Data%  Move Log Copy%  Convert
      my_lv   my_vg   -wi-a---- 452.00m
      ...
    
    Copy to Clipboard Toggle word wrap
  4. Create an ext4 file system on the logical volume my_lv.
    [root@z1 ~]# mkfs.ext4 /dev/my_vg/my_lv
    mke2fs 1.42.7 (21-Jan-2013)
    Filesystem label=
    OS type: Linux
    ...
    
    Copy to Clipboard Toggle word wrap
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat