Will formatting my OS drive affect a folder on another drive accessed through a bind mount?
Asked by
do-not-fold
My operating system is installed on drive A, while a folder containing data is stored on drive B. The folder on drive B is exposed through a bind mount somewhere on drive A. If I boot from a USB installer and install a new distribution by formatting or replacing drive A, will the contents of the folder on drive B remain safe?
Answers
Yes, the data on drive B should remain intact as long as the installer only formats or repartitions drive A. A bind mount is just a kernel-level mapping; removing the operating system removes that mapping, but it does not delete the source folder on drive B. Youโll need to recreate the bind mount in the new installation, usually through your mount configuration.
Reply to this answer
Be careful not to confuse formatting a partition with deleting files through a mounted directory. A command such as recursive removal can delete files inside a mounted filesystem, but installing a new distro from USB normally operates on the partitions you explicitly select. Since the old OS is not running, its bind mount will not automatically be active in the installer environment.
do-not-fold: That makes sense. Iโll disconnect or clearly identify drive B and double-check the installerโs partition choices before proceeding.
Reply to this answer
Add your answer
Answers are reviewed before publication.
PAPER_trimmer: The important part is to carefully verify the selected disk and partitions in the installer. Donโt format, delete, or recreate the partition on drive B.