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.078 ]
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
Particionando o HD sem perder os dados utilizando o FIPS
Ceph - Uma Plataforma de Armazenamento Distribuído
Implementando quotas de disco no Red Hat
Entendendo as permissões de arquivos (chmod)
Conciliando ZRAM Swap com Swap em arquivo ou partição
Servidor de Backup com Ubuntu Server 24.04 LTS, RAID e Duplicati (Dell PowerEdge T420)
Visualizar câmeras IP ONVIF no Linux sem necessidade de instalar aplicativos
Dicas para encontrar games Indies diferentes e criativos
Proteja seu Linux Mint com o Timeshift: Restaure o sistema mesmo que ele não inicie!
Instalar driver Nvidia no Debian 13
Redimensionando, espelhando, convertendo e rotacionando imagens com script
Ajuda com o Debian 13 - Video hibrido geforce 940 mx Wayland OFF (2)
Problema com impressoras de rede (1)
Rust é o "C da nossa geração"? (10)