TheKoguryo's Tech Blog

 Version 2024-11-29

Warning

This content has been generated by machine translation. The translations are automated and have not undergone human review or validation.

3.6.4 Formatting Block Volumes

  1. After connecting to the Compute Instance with SSH, format the Block Volume. You can format the file system type by changing it to anything you want.

    sudo mkfs -t <fs type> /dev/sdb
    
    • Examples of execution

      • After looking up the Block Volume as shown below, it was formatted.
      [opc@examplelinuxinstance ~]$ lsblk -f
      NAME   FSTYPE LABEL UUID                                 MOUNTPOINT
      sdb
      sda
      ├─sda2 swap         7c02c8fa-405c-4583-bf26-72fcfff63ccf [SWAP]
      ├─sda3 xfs          daec0eb0-26cf-43cb-bcb1-896cdc193242 /
      └─sda1 vfat         61E0-20B8                            /boot/efi
      
      [opc@examplelinuxinstance ~]$ sudo mkfs -t xfs /dev/sdb
      meta-data=/dev/sdb               isize=256    agcount=4, agsize=3276800 blks
               =                       sectsz=4096  attr=2, projid32bit=1
               =                       crc=0        finobt=0, sparse=0, rmapbt=0
               =                       reflink=0
      data     =                       bsize=4096   blocks=13107200, imaxpct=25
               =                       sunit=0      swidth=0 blks
      naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
      log      =internal log           bsize=4096   blocks=6400, version=2
               =                       sectsz=4096  sunit=1 blks, lazy-count=1
      realtime =none                   extsz=4096   blocks=0, rtextents=0
      
      [opc@examplelinuxinstance ~]$ lsblk -f
      NAME   FSTYPE LABEL UUID                                 MOUNTPOINT
      sdb    xfs          c15dcf4c-e7af-4150-b1f8-07953032464a
      sda
      ├─sda2 swap         7c02c8fa-405c-4583-bf26-72fcfff63ccf [SWAP]
      ├─sda3 xfs          daec0eb0-26cf-43cb-bcb1-896cdc193242 /
      └─sda1 vfat         61E0-20B8                            /boot/efi
      


As an individual, this article was written with my personal time. There may be errors in the content of the article, and the opinions in the article are personal opinions.

Last updated on 10 Jan 2022