Will formatting my OS drive affect a folder on another drive accessed through a bind mount?

0
6
Asked By MellowPanda47 On

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?

2 Answers

Answered By QuietFalcon21 On

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.

MellowPanda47 -

That makes sense. I’ll disconnect or clearly identify drive B and double-check the installer’s partition choices before proceeding.

Answered By CedarGlow8 On

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.

OrbitMango3 -

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.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.