Linux – USB Drive on Linux (Redhat Ent 5.3) appears to use up available space on the primary drive

disk-space-utilizationfileslinuxmountusb

I have about 3.6 'Terabyte' drive that is used for the root of the filesystem. When I look at the Disk Usage Analyzer, it shows that only about 1 'Terabyte' of that space is used. I have a 2 Terrabyte USB drive that is mounted to /media/disk. Whatever amount of data I store on this disk seems to be counted as used space on the root drive path. So the USB drive has 1.5 'Terabyte' of data used and the disk usage analyzer still only shows the 1 tb of space youed on the inteernal root drive, however a DF reveals that there is only less than a 'Terabyte' avalable on the root drive. Also, when I dismount the USB drive, I can still read and right the data to the /media/disk directory, so I am sure that Linux is keeping a temporary copy on the main file system.

Am I crazy or is this really how it works? Does it really store a copy of the data on the USB drive somewhere on the primary root drive? How can I change this or can you change it?

Best Answer

Type 'mount' after you think the drive is mounted and see if the external drive is really mounted where you think. I'm betting it's either mounted somewhere else, or it's not mounted at all.

The fact that you can see the files under /media/disk means that you didn't have the drive mounted there when you put the files there.

Remember that mounting a filesystem on a particular path 'hides' that path. So, if you copied files to /media/disk, then mounted the USB drive on /media/disk, then looked at /media/disk, you'd see the files on the USB disk. But the files you copied beforehand are still on the main disk, and will become visible again after you unmount the USB drive.

Related Topic