Redimensionar OEL/RHE 7 btrfs / (Barra) Azure

Hoje a dica é de como redimensionar o barra de um RHE ou OEL 7 sem parada e com facilidade, procurei vários artigos e achei confuso, dessa forma criei um com mais facilidade e aplicabilidade.

1 – Disco inicial com 30gb, irei redimensionar para 100gb.

[root@vm-oracle ~]# fdisk /dev/sda <================================================ DISCO A SER REDIMENSIONADO
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Welcome to fdisk (util-linux 2.23.2).
 
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
 
 
Command (m for help): p <================================================ LISTAR PARTIÇÕES 
 
Disk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: gpt
Disk identifier: CC07BBFF-E48E-4614-B09E-BFD7ED16E3D9
 
 
#         Start          End    Size  Type            Name
 1      1026048      2050047    500M  Microsoft basic
 2      2050048     62912511     29G  Microsoft basic
14         2048        10239      4M  BIOS boot
15        10240      1024000    495M  EFI System      EFI System Partition
 
Command (m for help): m <================================================
Command action
   d   delete a partition
   g   create a new empty GPT partition table
   G   create an IRIX (SGI) partition table
   l   list known partition types
   m   print this menu
   n   add a new partition <================ OPÇÃO DE NOVA PARTIÇÃO
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)
 
Command (m for help): n <================================================ ADICIONANDO UMA NOVA PARTIÇÃO COM O NOVO ESPAÇO EM DISCO SEM FORMATAR
Partition number (3-13,16-128, default 3):
First sector (34-209715166, default 62912512):
Last sector, +sectors or +size{K,M,G,T,P} (62912512-209715166, default 209715166):
Created partition 3
 
 
Command (m for help): w <================================================ SALVANDO
The partition table has been altered!
 
Calling ioctl() to re-read partition table.
 
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
Command (m for help): q <================================================ SAINDO
 
 
[root@vm-oracle ~]# partprobe <====================== INFORMA O KERNEL DO SISTEMA OPERACIONAL DAS ALTERAÇÕES NA TABELA DE PARTIÇÕES, SOLICITANDO QUE O SISTEMA OPERACIONAL LEIA NOVAMENTE A TABELA DE PARTIÇÕES.
[root@vm-oracle ~]# fdisk /dev/sda
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Welcome to fdisk (util-linux 2.23.2).
 
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
 
 
Command (m for help): p
 
Disk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: gpt
Disk identifier: CC07BBFF-E48E-4614-B09E-BFD7ED16E3D9
 
 
#         Start          End    Size  Type            Name
 1      1026048      2050047    500M  Microsoft basic
 2      2050048     62912511     29G  Microsoft basic
 3     62912512    209715166     70G  Linux filesyste <====================== NOVA PARTIÇÃO SEM FORMATAÇÃO
14         2048        10239      4M  BIOS boot
15        10240      1024000    495M  EFI System      EFI System Partition
 
Command (m for help):
Command (m for help):
Command (m for help):
Command (m for help): q
 
 
[root@vm-oracle ~]# ls -lat /dev/sd* <====================== VERIFICANDO DISCOS 
brw-rw----. 1 root disk 8,  3 Mar  3 10:32 /dev/sda3 <====================== NOVO DISCO DA PARTIÇÃO CRIADA SEM FORMATAÇÃO
brw-rw----. 1 root disk 8,  2 Mar  3 10:32 /dev/sda2
brw-rw----. 1 root disk 8,  1 Mar  3 10:32 /dev/sda1
brw-rw----. 1 root disk 8, 14 Mar  3 10:32 /dev/sda14
brw-rw----. 1 root disk 8, 15 Mar  3 10:32 /dev/sda15
brw-rw----. 1 root disk 8,  0 Mar  3 10:32 /dev/sda
brw-rw----. 1 root disk 8, 17 Mar  3 10:32 /dev/sdb1
brw-rw----. 1 root disk 8, 16 Mar  3 10:32 /dev/sdb
[root@vm-oracle ~]# btrfs device add /dev/sda3 / <====================== ADICIONANDO O SDA3 PARA O BARRA /
Performing full device TRIM /dev/sda3 (70.00GiB) ...
[root@vm-oracle ~]#
[root@vm-oracle ~]#
[root@vm-oracle ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        3.8G     0  3.8G   0% /dev
tmpfs           3.8G     0  3.8G   0% /dev/shm
tmpfs           3.8G   17M  3.8G   1% /run
tmpfs           3.8G     0  3.8G   0% /sys/fs/cgroup
/dev/sda2       100G  1.5G   96G   2% /     <====================== BARRA / COM ESPAÇO EM DISCO REDIMENSIONADO
/dev/sda1       497M  210M  288M  43% /boot
/dev/sda15      495M  9.7M  486M   2% /boot/efi
/dev/sdb1        16G  2.1G   13G  14% /mnt/resource
tmpfs           769M     0  769M   0% /run/user/1000
[root@vm-oracle ~]#
ShellScript

Leave a Reply

Your email address will not be published. Required fields are marked *

search previous next tag category expand menu location phone mail time cart zoom edit close