Filesystem LVM
O intuito deste artigo é mostrar algumas funcionalidades do LVM. Sei que na Internet, e aqui mesmo no site, temos ótimos artigos. A minha intenção é agregar mais informações sobre seu uso.
[ Hits: 13.218 ]
Por: Faustino em 04/05/2016
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): d Selected partition 1 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.# fdisk /dev/sdj
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-2088, default 1): Using default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-2088, default 2088): Using default value 2088 Command (m for help): t Selected partition 1 Hex code (type L to list codes): 8e Changed system type of partition 1 to 8e (Linux LVM) Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.Para ter certeza que o processo foi feito corretamente utilize o comando:
Disk /dev/sdj: 17.2 GB, 17179869184 bytes 255 heads, 63 sectors/track, 2088 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x1b58e145 Device Boot Start End Blocks Id System /dev/sdj1 1 2088 16771828+ 8e Linux LVM2. Criando o PV:
Physical volume "/dev/sdj1" successfully created3. Criando o VG:
Volume group "backup_VG" successfully created4. Criando o LVOL:
Logical volume "backup_LV" createdAs opções -L se refere ao tamanho e a opção -n ao nome do VG
mke2fs 1.41.12 (17-May-2010) mkfs.ext4: invalid blocks count - /backup/# mkfs.ext4 /dev/backup_VG/backup_LV
mke2fs 1.41.12 (17-May-2010) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 1015808 inodes, 4063232 blocks 203161 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=4160749568 124 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 37 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.6. Montado o filesystem:
Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/backup_VG-backup_LV 15997904 170736 15014524 2% /backupAgora basta incluir na fstab para quando o servidor sofrer reboot, o filesystem montar.
Configurações Básicas no CentOS 7
Fazendo particionamento avançado no Debian
Entendendo e configurando o LVM manualmente
Instalando e configurando o NTFS-3G 1.0 final
Osiris - Integridade do sistema de arquivos
Atualizações de Apps, Desktop e Kernel agitam o ecossistema Linux nesta terça-feira
Miyoo Mini Plus + Onion OS (Linux)
IA local no bolso, novo visual no Raspberry Pi OS e mais destaques do software livre
Kernel turbinado, compatibilidade em alta e debate sobre sustentabilidade: o dia no mundo Linux
Kernel turbinado e GNOME 49 dominam o giro do dia no mundo Linux
Adicionando o repositório backports no Debian 13 Trixie
Como definir um IP estático no Linux Debian
Como colocar atalho para uma pasta na área de trabalho do Ubuntu 24.04... (1)
Como listar os arquivos em "bloquin... (0)
Como vencer a procrastinação? (8)
Adicional de convivdado em linux somente linha de comando (3)