AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / server / Perguntas / 1128612
Accepted
m.divya.mohan
m.divya.mohan
Asked: 2023-04-14 01:04:06 +0800 CST2023-04-14 01:04:06 +0800 CST 2023-04-14 01:04:06 +0800 CST

A data de nascimento dos arquivos está ausente se o arquivo for criado em um volume lógico com tamanho inferior a 512 MB

  • 772

Eu tenho um grupo de volumes em meu sistema, criado com um único volume físico.

Estou criando dois volumes lógicos - um com tamanho de 100M e outro com tamanho de 512M.

Qualquer arquivo criado no LV com tamanho de 100M não exibe o atributo de horário de nascimento. LV com tamanho 512M não tem esse problema.

Alguma pista sobre por que isso acontece?

Volume físico e grupo de volumes:

# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda4
  VG Name               VG_System
  PV Size               400.00 GiB / not usable 4.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              102399
  Free PE               38099
  Allocated PE          64300
  PV UUID               Awnq0n-24v1-Z53P-MC09-3Fvv-dc0r-6QvAyX


# vgdisplay VG_System
  --- Volume group ---
  VG Name               VG_System
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  25
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                24
  Open LV               22
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <400.00 GiB
  PE Size               4.00 MiB
  Total PE              102399
  Alloc PE / Size       64300 / 251.17 GiB
  Free  PE / Size       38099 / 148.82 GiB
  VG UUID               Zg53rH-kuCI-dWKa-Uo3H-Mr2i-G2As-Wflm0d

Primeiro VL:

# lvcreate --stripes 1 -n testing -L 100M VG_System
  Logical volume "testing" created.

# mkfs.ext4 /dev/VG_System/testing
mke2fs 1.45.6 (20-Mar-2020)
Discarding device blocks: done
Creating filesystem with 102400 1k blocks and 25688 inodes
Filesystem UUID: ac9c1782-7770-4031-bad8-9b76f7577467
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done


# blkid /dev/VG_System/testing
/dev/VG_System/testing: UUID="ac9c1782-7770-4031-bad8-9b76f7577467" BLOCK_SIZE="1024" TYPE="ext4"

# mount /dev/VG_System/testing /mnt/test
# mount | grep test
/dev/mapper/VG_System-testing on /mnt/test type ext4 (rw,relatime,stripe=4)

# touch /mnt/test/a
# stat /mnt/test/a
  File: /mnt/test/a
  Size: 0               Blocks: 0          IO Block: 1024   regular empty file
Device: 252,23  Inode: 12          Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2023-04-13 22:13:43.000000000 +0530
Modify: 2023-04-13 22:13:43.000000000 +0530
Change: 2023-04-13 22:13:43.000000000 +0530
 Birth: -

Aqui o Birthcampo está vazio.

Segundo VL:

# lvcreate  -n testing2 -L 512M VG_System
  Logical volume "testing2" created.

# mkfs.ext4 /dev/VG_System/testing2
mke2fs 1.45.6 (20-Mar-2020)
Discarding device blocks: done
Creating filesystem with 131072 4k blocks and 32768 inodes
Filesystem UUID: 0b5e24a9-cdf1-4749-9089-bf0cf1495185
Superblock backups stored on blocks:
        32768, 98304

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done


# blkid /dev/VG_System/testing2
/dev/VG_System/testing2: UUID="0b5e24a9-cdf1-4749-9089-bf0cf1495185" BLOCK_SIZE="4096" TYPE="ext4"

# mount /dev/VG_System/testing2 /mnt/test2
# mount | grep test
/dev/mapper/VG_System-testing2 on /mnt/test2 type ext4 (rw,relatime)

# touch /mnt/test2/a
# stat /mnt/test2/a
  File: /mnt/test2/a
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: 252,24  Inode: 12          Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2023-04-13 22:19:01.873047858 +0530
Modify: 2023-04-13 22:19:01.873047858 +0530
Change: 2023-04-13 22:19:01.873047858 +0530
 Birth: 2023-04-13 22:19:01.873047858 +0530

Observe se é relevante, mas as opções de montagem do primeiro LV têm stripe=4, enquanto o segundo não tem isso. Fora isso, ambos os LVs são semelhantes.

# lvdisplay VG_System/testing
  --- Logical volume ---
  LV Path                /dev/VG_System/testing
  LV Name                testing
  VG Name                VG_System
  LV UUID                n19sRr-SqHW-znjI-0fEW-MkQX-JRUn-MTmZHF
  LV Write Access        read/write
  LV Creation host, time controller, 2023-04-13 22:12:45 +0530
  LV Status              available
  # open                 0
  LV Size                100.00 MiB
  Current LE             25
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:23


# lvdisplay VG_System/testing2
  --- Logical volume ---
  LV Path                /dev/VG_System/testing2
  LV Name                testing2
  VG Name                VG_System
  LV UUID                94oJKP-r2Ob-ReHr-sDSO-t3HY-isJB-ZtEPsq
  LV Write Access        read/write
  LV Creation host, time controller, 2023-04-13 22:18:01 +0530
  LV Status              available
  # open                 1
  LV Size                512.00 MiB
  Current LE             128
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:24

linux
  • 1 1 respostas
  • 1715 Views

1 respostas

  • Voted
  1. Best Answer
    Prem
    2023-04-14T04:39:35+08:002023-04-14T04:39:35+08:00

    Não é problema com LVM. É problema com Ext4.

    Quando o tamanho do sistema de arquivos é inferior a 512 MB, o Ext4 usa o tamanho padrão do inode = 128 bytes, o que não é suficiente para armazenar os "metadados estendidos".

    Quando o tamanho do sistema de arquivos é superior a 512 MB, o Ext4 usa o tamanho padrão do inode = 256 bytes, o que é suficiente para armazenar os "metadados estendidos", incluindo "hora do nascimento" @ deslocamento 0x90 e deslocamento 0x94.

    Mais detalhes:
    https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#Inode_Table

    Você pode tentar isso:

    mkfs.ext4 -I 256 /dev/VG_System/testing  
    

    Isso forçará Inode Size = 256 no sistema de arquivos menor.

    Mais detalhes:
    https://manpages.debian.org/bullseye/e2fsprogs/mke2fs.8.en.html

    • 36

relate perguntas

  • Como descobrir detalhes sobre hardware na máquina Linux?

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Você pode passar usuário/passar para autenticação básica HTTP em parâmetros de URL?

    • 5 respostas
  • Marko Smith

    Ping uma porta específica

    • 18 respostas
  • Marko Smith

    Verifique se a porta está aberta ou fechada em um servidor Linux?

    • 7 respostas
  • Marko Smith

    Como automatizar o login SSH com senha?

    • 10 respostas
  • Marko Smith

    Como posso dizer ao Git para Windows onde encontrar minha chave RSA privada?

    • 30 respostas
  • Marko Smith

    Qual é o nome de usuário/senha de superusuário padrão para postgres após uma nova instalação?

    • 5 respostas
  • Marko Smith

    Qual porta o SFTP usa?

    • 6 respostas
  • Marko Smith

    Linha de comando para listar usuários em um grupo do Windows Active Directory?

    • 9 respostas
  • Marko Smith

    O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL?

    • 3 respostas
  • Marko Smith

    Como determinar se uma variável bash está vazia?

    • 15 respostas
  • Martin Hope
    Davie Ping uma porta específica 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    kernel O scp pode copiar diretórios recursivamente? 2011-04-29 20:24:45 +0800 CST
  • Martin Hope
    Robert ssh retorna "Proprietário incorreto ou permissões em ~/.ssh/config" 2011-03-30 10:15:48 +0800 CST
  • Martin Hope
    Eonil Como automatizar o login SSH com senha? 2011-03-02 03:07:12 +0800 CST
  • Martin Hope
    gunwin Como lidar com um servidor comprometido? 2011-01-03 13:31:27 +0800 CST
  • Martin Hope
    Tom Feiner Como posso classificar a saída du -h por tamanho 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent Como determinar se uma variável bash está vazia? 2009-05-13 09:54:48 +0800 CST

Hot tag

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve