Mount Points vs Physical Drives

Hi there

i need a way ( some sort of script maybe) to check if a mont point exist when but the physical drive does not

for example if i look in / and see that user_data2 directory exist but there is no user_data2 drive.

another hurdle would be that some of the machines have raided drives so i cannot just check for /dev/sdc to see if it exists

any help would be great thanks

A

Drives aren't named the same thing as the directories inside them, usually. The disks are device files somewhere under /dev/.

On many UNIX systems, /etc/fstab is a tabular file describing what device files should be mounted on what directories, and /etc/mtab is another tabular file describing what disks are mounted on what directories.

For further details we need to know your system and shell.

sorry i dont think i was clear,
what i am looking for is a way to see if the user_data2 direcoty exist if the dirve does not,
i understand that the drive is not called user_data2, but the issue is that people are running to the direcotry user_data2 and therefore filling up the boot drive

/etc/mtab may help you then, it's usually a table of what devices are mounted on what directories. You can also try df, which should list what files are mounted where along with a little statistics on them.

But, I repeat: If you need more detail than that, we need to know your system, because not all varieties of UNIX and Linux do everything the exact same way.