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 / ubuntu / Perguntas / 1530646
Accepted
DanW58
DanW58
Asked: 2024-10-21 01:25:21 +0800 CST2024-10-21 01:25:21 +0800 CST 2024-10-21 01:25:21 +0800 CST

Em /etc/fstab, qual é a diferença entre "/dev/disk/by-uuid/" e "UUID="?

  • 772

Adicionei 3 partições que quero montar na inicialização, mas o conselho que encontrei em outro lugar sobre a nova sintaxe do fstab só concorda com um dos DOIS estilos já presentes no meu fstab, o que me deixa muito confuso. O conselho que encontrei em outro lugar foi,

Entry in /etc/fstab:
<UUID> <mount directory> <FS type> <mount options> <dump> <pass>
Example:
UUID=5caaee32-c3d3-429e-bad7-2898cf923805  /data  ext4  defaults 0 0

Mas o conteúdo do meu /etc/fstab dizia:

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/disk/by-uuid/42301925-9786-4ab8-b56c-a3252accf5ef / ext4 defaults 0 1
/dev/disk/by-uuid/F759-075A /boot/efi vfat defaults 0 1
/dev/disk/by-uuid/df063034-c8da-4f14-b1c8-52cdccecc06f /tmp ext4 defaults 0 2
UUID=da0ad11a-8fd7-431a-a49a-d883037aa2c8 /LamaSpace ext4 defaults 0 2
/dev/disk/by-uuid/4acdc978-c30b-4b3f-bbf6-0b7b99094463 /home ext4 defaults 0 2

Note que somente minha partição /LamaSpace usa a sintaxe dada acima; as outras partições usam /dev/disk/by-uuid/ ... de resto, sintaxe idêntica. Essas duas expressões idiomáticas são equivalentes?

Informações extras: Estou no Ubuntu 24.04. Todas as minhas partições estão em um único HDD Barracuda de 8 TB:

 $ blkid
/dev/sda3: UUID="42301925-9786-4ab8-b56c-a3252accf5ef" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="1f981653-4a7f-48ff-958e-d9e7ec1de51e"
/dev/sda1: UUID="F759-075A" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="91e5f592-dc00-455a-af9a-90c3ba7e914b"
/dev/sda2: UUID="da0ad11a-8fd7-431a-a49a-d883037aa2c8" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="fdcdf7ad-c10b-4a98-b730-7a20db907e91"
/dev/sda4: UUID="4acdc978-c30b-4b3f-bbf6-0b7b99094463" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="7e2715ef-3ae8-44da-8581-bbcc8c59b9a8"
/dev/sda5: UUID="c2bd1f6c-67af-4ea8-98ef-a9c88d92f433" TYPE="swap" PARTUUID="c703710a-6545-49c2-8845-8be9dfc53e2e"
/dev/sda6: UUID="30DD-1315" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="SpareEFI" PARTUUID="eccf77e6-ee55-4f01-bd05-abf9b9dcc24a"
/dev/sda7: UUID="df063034-c8da-4f14-b1c8-52cdccecc06f" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="NEWTEMP" PARTUUID="c752818c-9dd4-453c-9892-fac0db4a2b4a"
/dev/sda8: UUID="89de958a-8997-44e3-92e0-122e1272675c" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Virtual" PARTUUID="bc89cc7e-0798-4ff7-90cd-cfd36aa9cc6e"
/dev/sda9: UUID="73e18c48-92d7-4f37-b55b-da655f461824" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Sandbox" PARTUUID="5e210dd0-d9fa-4968-a27b-a2753e9c0476"

(Minhas três novas partições são sda6, sda8 e sda9, que montei manualmente, mas ainda não estão presentes em /etc/fstab.)

fstab
  • 1 1 respostas
  • 641 Views

1 respostas

  • Voted
  1. Best Answer
    muru
    2024-10-21T02:16:54+08:002024-10-21T02:16:54+08:00

    Atualmente não há diferença, mas UUIDé preferível. Veja man 8 mount:

    The recommended setup is to use tags (e.g. UUID=uuid) rather than
    /dev/disk/by-{label,uuid,id,partuuid,partlabel} udev symlinks in the /etc/fstab file. Tags
    are more readable, robust and portable. The mount(8) command internally uses udev
    symlinks, so the use of symlinks in /etc/fstab has no advantage over tags. For more
    details see libblkid(3).
    
    • 10

relate perguntas

Sidebar

Stats

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

    Existe um comando para listar todos os usuários? Também para adicionar, excluir, modificar usuários, no terminal?

    • 9 respostas
  • Marko Smith

    Como excluir um diretório não vazio no Terminal?

    • 4 respostas
  • Marko Smith

    Como descompactar um arquivo zip do Terminal?

    • 9 respostas
  • Marko Smith

    Como instalo um arquivo .deb por meio da linha de comando?

    • 11 respostas
  • Marko Smith

    Como instalo um arquivo .tar.gz (ou .tar.bz2)?

    • 14 respostas
  • Marko Smith

    Como listar todos os pacotes instalados

    • 24 respostas
  • Martin Hope
    Flimm Como posso usar o docker sem sudo? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    led-Zepp Como faço para salvar a saída do terminal em um arquivo? 2014-02-15 11:49:07 +0800 CST
  • Martin Hope
    ubuntu-nerd Como descompactar um arquivo zip do Terminal? 2011-12-11 20:37:54 +0800 CST
  • Martin Hope
    TheXed Como instalo um arquivo .deb por meio da linha de comando? 2011-05-07 09:40:28 +0800 CST
  • Martin Hope
    Ivan Como listar todos os pacotes instalados 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    David Barry Como determino o tamanho total de um diretório (pasta) na linha de comando? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher "Os seguintes pacotes foram retidos:" Por que e como resolvo isso? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford Como os PPAs podem ser removidos? 2010-07-30 01:09:42 +0800 CST

Hot tag

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

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