Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Bloco de código
themeRDark
titleRetorno
0 logical volume(s) in volume group "totvs" now active

 

ETAPA 3 : Criação do Logical Volume

 

...


Bloco de código
themeRDark
titleComando para ciação do Logical Volume
lvcreate -L 2000G -n lv_stripe  totvs
Bloco de código
themeRDark
titleRetorno
WARNING: ext4 signature detected on /dev/totvs/lv_stripe at offset 1080. Wipe it? [y/n]: y

...


Wiping ext4 signature on /dev/totvs/lv_stripe.

...


Logical volume "lv_stripe" created.

[root@vmappserver01 ~]#


Verifique o Logical Volume

Bloco de código
themeRDark
titleComando para visualizar o volume criado
lvdisplay 

...

totvs/lv_stripe -m
Bloco de código
themeRDark
titleRetorno do comando
--- Logical volume ---

...


  LV Path                /dev/totvs/lv_stripe

...


  LV Name                lv_stripe

...


  VG Name                totvs

...


  LV UUID                s2q3rr-flaD-5Ahx-i4OJ-RYR7-mCse-7ijSMV

...


  LV Write Access        read/write

...


  LV Creation host, time prodvmprim, 2021-08-03 19:07:51 +0000

...


  LV Status              available

...


  # open                 0

...


  LV Size                1.95 TiB

...


  Current LE             256000

...


  Segments               4

...


  Allocation             inherit

...


  Read ahead sectors     auto

...


  - currently set to     256

...


  Block device           252:2

...

ETAPA 4 : Verifique o Logical Volume

 

...

[root@vmappserver01 ~]# lvdisplay totvs/lv_stripe -m

--- Logical volume ---

  LV Path                /dev/totvs/lv_stripe

  LV Name                lv_stripe

  VG Name                totvs

  LV UUID                s2q3rr-flaD-5Ahx-i4OJ-RYR7-mCse-7ijSMV

  LV Write Access        read/write

  LV Creation host, time prodvmprim, 2021-08-03 19:07:51 +0000

  LV Status              available

  # open                 0

  LV Size                1.95 TiB

  Current LE             256000

  Segments               4

  Allocation             inherit

  Read ahead sectors     auto

  - currently set to     256

  Block device           252:2

  --- Segments ---

  Logical extents 0 to 65534:

    Type                linear

    Physical volume     /dev/sdb

    Physical extents    0 to 65534

  Logical extents 65535 to 131069:

    Type                linear

    Physical volume     /dev/sdc

    Physical extents    0 to 65534

  Logical extents 131070 to 196604:

    Type                linear

    Physical volume     /dev/sdd

    Physical extents    0 to 65534

  Logical extents 196605 to 255999:

    Type                linear

    Physical volume     /dev/sde

    Physical extents    0 to 59394


--- Segments ---
  Logical extents 0 to 65534:
    Type                linear
    Physical volume     /dev/sdb
    Physical extents    0 to 65534
  Logical extents 65535 to 131069:
    Type                linear
    Physical volume     /dev/sdc
    Physical extents    0 to 65534
  Logical extents 131070 to 196604:
    Type                linear
    Physical volume     /dev/sdd
    Physical extents    0 to 65534
  Logical extents 196605 to 255999:
    Type                linear
    Physical volume     /dev/sde
    Physical extents    0 to 59394

ETAPA 5 : Formatar o LVM

Qualquer sistema de arquivos pode ser usado para formatar o volume lógico, no nosso caso o método utilizado de sistema de arquivos é o ext4 que até o momento está homologado.

É importante tomar cuidado com esse comando pois não é possível desfazer a formatação depois que concluída, caso tenha dados favor efetuar backup.

Bloco de código
titleComando para formatar o LVM
mkfs.ext4 /dev/totvs/lv_stripe


ETAPA 6 : Criação do Diretório, e montagem do LVM


Bloco de código
themeRDark
titleComando para criação do diretório
mkdir /totvs
Bloco de código
titleComando para a montagem do diretório
mount /dev/totvs/lv_stripe /totvs
Bloco de código
titleComando para visualizar os volumes montados
df -lh
Bloco de código
themeRDark
titleRetorno do comando df -lh
Filesystem                   Size  Used Avail Use% Mounted on
devtmpfs                      32G     0   32G   0% /dev
tmpfs                         32G     0   32G   0% /dev/shm
tmpfs                         32G   17M   32G   1% /run
tmpfs                         32G     0   32G   0% /sys/fs/cgroup

 

ETAPA 5 : Formatar o LVM

 

 

ETAPA 6 : Criação do Diretório, e montagem do LVM

 

[root@vmappserver01 ~]# mkdir /totvs

[root@vmappserver01 ~]#

[root@vmappserver01 ~]# mount /dev/totvs/lv_stripe /totvs

[root@vmappserver01 ~]#

[root@vmappserver01 ~]#

[root@vmappserver01 ~]# df -lh

Filesystem                   Size  Used Avail Use% Mounted on

devtmpfs                      32G     0   32G   0% /dev

tmpfs                         32G     0   32G   0% /dev/shm

tmpfs                         32G   17M   32G   1% /run

tmpfs                         32G     0   32G   0% /sys/fs/cgroup

/dev/mapper/ocivolume-root    36G   12G   25G  33% /

...


/dev/mapper/ocivolume-oled    10G  109M  9.9G   2% /var/oled

...


/dev/sda2                   1014M  277M  738M  28% /boot

...


/dev/sda1                    100M  5.1M   95M   6% /boot/efi

...


tmpfs                        6.3G      6.3G   0% /run/user/989

...


tmpfs                        6.3G      6.3G   0% /run/user/1000

...


/dev/mapper/totvs-lv_stripe  2.0T   81M  1.9T   1% /totvs

...


ETAPA 7 : Iniciando automaticamente o volume criado para o uso dos dados na máquina primária.

 

...




Bloco de código
themeRDark
echo 

...

'/dev/mapper/totvs-lv_stripe /totvs ext4 defaults,_netdev,nofail 0 2' | tee -a /etc/fstab

...

Bloco de código
themeRDark
cat 

...

/etc/fstab
Bloco de código
themeRDark
titleArquivo fstab
#

...


# /etc/fstab

...


# Created by anaconda on Tue Jun 15 16:59:24 2021

...


#

...


# Accessible filesystems, by reference, are maintained under '/dev/disk/'.

...


# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.

...


#

...


# After editing this file, run 'systemctl daemon-reload' to update systemd

...


# units generated from this file.

...


#

...


/dev/mapper/ocivolume-root /                       xfs     defaults        0 0

...


UUID=6408a2f9-7367-4952-8e0b-4bf42e8e041c /boot                   xfs     defaults        0 0

...


UUID=C675-9E96          /boot/efi               vfat    defaults,uid=0,gid=0,umask=077,shortname=winnt 0 2

...


/dev/mapper/ocivolume-oled /var/oled               xfs     defaults        0 0

...


tmpfs                   /dev/shm                tmpfs   defaults,nodev,nosuid,noexec      0 0

...


######################################

...


## ORACLE CLOUD INFRASTRUCTURE CUSTOMERS

...


##

...


## If you are adding an iSCSI remote block volume to this file you MUST

...


## include the '_netdev' mount option or your instance will become

...


## unavailable after the next reboot.

...


## SCSI device names are not stable across reboots; please use the device UUID instead of /dev path.

...


##

...


## Example:

...


## UUID="94c5aade-8bb1-4d55-ad0c-388bb8aa716a"   /data1    xfs       defaults,noatime,_netdev           2

...


##

...


## More information:

...


## https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Tasks/connectingtoavolume.htm

...


/.swapfile      none    swap    sw,comment=cloudconfig  0       0

...


/dev/mapper/totvs-lv_stripe /totvs ext4 defaults,_netdev,nofail 0 2