Mount vs bind mount: Difference between revisions

From HPCWIKI
Jump to navigation Jump to search
No edit summary
(Fix: remove --- horizontal lines (7 removed))
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Status
|status=Draft
|owner=Knowledge Agent
|last_update=2026-07-16
|review=Pending
}}
{{TOC}}
== Overview ==
Mount vs bind mount에 대한 기술 문서입니다.
=== Summary ===
* 무엇인가? - Mount vs bind mount
* 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
* 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시
== Purpose ==
이 문서가 존재하는 이유
* Goal: Mount vs bind mount에 대한 기술 정보 제공
* Scope: Mount vs bind mount의 개념, 사용법, 설정
* Non-goals: 다른 주제로의 확장
== Key Concepts ==
{| class="wikitable"
! Concept
! Description
! Related
|-
| Mount vs bind mount
| HPC/서버 환경에서 중요한 기술 개념
| [[Linux]], [[Server]]
|}
== Detailed Explanation ==
In [[Linux]] systems, '''we can mount a device in a directory using the ''mount'' command'''. This allows us to access the device’s filesystem<syntaxhighlight lang="bash">
In [[Linux]] systems, '''we can mount a device in a directory using the ''mount'' command'''. This allows us to access the device’s filesystem<syntaxhighlight lang="bash">
$ findmnt --real
$ findmnt --real
Line 6: Line 50:
└─/boot/efi          /dev/sda1 vfat    rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
└─/boot/efi          /dev/sda1 vfat    rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
</syntaxhighlight>However, '''we can also mount a directory on another directory''' by using the ''mount'' command with the --b''ind'' parameter.<ref>https://www.baeldung.com/linux/bind-mounts</ref>
</syntaxhighlight>However, '''we can also mount a directory on another directory''' by using the ''mount'' command with the --b''ind'' parameter.<ref>https://www.baeldung.com/linux/bind-mounts</ref>
bind mount source can be any directory,
bind mount source can be any directory,
* If the source directory is a device’s mount point, then the whole device is bind-mounted on the destination directory.  
* If the source directory is a device’s mount point, then the whole device is bind-mounted on the destination directory.  
* If instead, the source is a device’s subdirectory, then the device is bind-mounted starting from that subdirectory.  
* If instead, the source is a device’s subdirectory, then the device is bind-mounted starting from that subdirectory.  
When we use the --''bind'' parameter, mount points inside the source directory aren’t remounted. So, if we want to bind mount a directory and all submounts inside that directory, we have to use the ''--rbind'' parameter instead. '''After doing a bind mount, we won’t have access to the original content in the target directory'''.
bind mount enable to access files hidden by a mount point and allows us to access files outside of chroot environment. [https://www.baeldung.com/linux/bind-mounts This article] shows the usage of bind mount
<references />


== Best Practices ==


When we use the --''bind'' parameter, mount points inside the source directory aren’t remounted. So, if we want to bind mount a directory and all submounts inside that directory, we have to use the ''--rbind'' parameter instead. '''After doing a bind mount, we won’t have access to the original content in the target directory'''.
* 최신 버전 사용 권장
* 공식 문서 참고
* 테스트 환경에서 먼저 검증


== Usage of bind mount ==
bind mount enable to access files hidden by a mount point and allows us to access files outside of chroot environment. [https://www.baeldung.com/linux/bind-mounts This article] shows the usage of bind mount


== References ==
== References ==
<references />


[[Category: storage]]
* [https://wiki.hpcmate.com Mount vs bind mount]
 
 
== Related Pages ==
 
* [[Linux]]
* [[Server]]
* [[Hardware]]
* [[Network]]
 
 
[[Category:Hardware]]
== Knowledge Graph ==
 
Related
 
→ [[Linux]]
→ [[Server]]
→ [[Hardware]]
→ [[Network]]
 
[[Category:Reference]]

Latest revision as of 11:29, 17 July 2026

Template:Status

Template:TOC

Overview

Mount vs bind mount에 대한 기술 문서입니다.

Summary

  • 무엇인가? - Mount vs bind mount
  • 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
  • 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시


Purpose

이 문서가 존재하는 이유

  • Goal: Mount vs bind mount에 대한 기술 정보 제공
  • Scope: Mount vs bind mount의 개념, 사용법, 설정
  • Non-goals: 다른 주제로의 확장


Key Concepts

Concept Description Related
Mount vs bind mount HPC/서버 환경에서 중요한 기술 개념 Linux, Server


Detailed Explanation

In Linux systems, we can mount a device in a directory using the mount command. This allows us to access the device’s filesystem

$ findmnt --real
TARGET                SOURCE    FSTYPE  OPTIONS
/                     /dev/sda5 ext4    rw,relatime,errors=remount-ro
├─/sys/kernel/tracing tracefs   tracefs rw,nosuid,nodev,noexec,relatime
└─/boot/efi           /dev/sda1 vfat    rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro

However, we can also mount a directory on another directory by using the mount command with the --bind parameter.[1]

bind mount source can be any directory,

  • If the source directory is a device’s mount point, then the whole device is bind-mounted on the destination directory.
  • If instead, the source is a device’s subdirectory, then the device is bind-mounted starting from that subdirectory.

When we use the --bind parameter, mount points inside the source directory aren’t remounted. So, if we want to bind mount a directory and all submounts inside that directory, we have to use the --rbind parameter instead. After doing a bind mount, we won’t have access to the original content in the target directory. bind mount enable to access files hidden by a mount point and allows us to access files outside of chroot environment. This article shows the usage of bind mount


Best Practices

  • 최신 버전 사용 권장
  • 공식 문서 참고
  • 테스트 환경에서 먼저 검증


References


Related Pages

Knowledge Graph

Related

LinuxServerHardwareNetwork