You have various devices on UNIX/Linux that represent physical drives so for example on Linux:
/dev/sda - Would designate SCSI drive with ID of 0 or lately more commonly ID:0 on SATA.
/dev/sdb - Would be secondary device, etc
Linux when it installs will ask you where to install it on and you can designate /dev/sda
as your OS drive and you can designate /dev/sdb
as the location for /home
which will be formatted and mounted if you choose it to be.
You will create partitions on the OS drive designating one for swap
, /boot
, /
filesystems, which will basically create devices like /dev/sda1, 2, 3
which will look to your system as physical devices and they will be made accessible to the OS in forms of directories.
So in this set up /dev/sda
would be Windows equivalent of C:\
drive and /dev/sdb
would be the equivalent of the data drive, whatever letter designation you choose.
So if you choose to reinstall Linux all you will have to be careful of is actually not reformatting /dev/sdb
or the partitions that you set up on it so that the data you have on that driver remains intact.
Now similar concept can be applied if there is only one drive on the system, but this will be a little more complex of a concept that Windows also support but most commonly not being used.
If the mount is busy it shouldn't be able to unmount*.
An easy way to make a mount busy is to have at least one process with its CWD
(Current Working Directory) under the mount point.
*Lazy unmounts will still return but it shouldn't actually unmount until the filesystem is no longer busy.
Best Answer
Advisory locking is for processes that cooperate "peacefully". The kernel keeps track of the locks but doesn't enforce them - it's up to the applications to obey them. This way the kernel doesn't need to deal with situations like dead-locks.
Mandatory locking was introduced in System V Unix, but it turns out that the design was not the brightest thing. (That is, there are ways around it.) If you need something like true mandatory locking under unixy systems, then follow a client-server design pattern where the server is the authority on the shared resource(s).