Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Find out what's under a mount point? -- solved
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2435

PostPosted: Wed May 02, 2018 7:00 pm    Post subject: Find out what's under a mount point? -- solved Reply with quote

Hi,

I have a production box. There is a data directory on its own filesystem. Let's call it /data. The root filesystem is filling up and I can't see where the files are. I've been using du -hs `ls -A` to navigate the largest used points, but the numbers don't add up. There are several gigabytes used which are not accounted for. As well there is a period of time for which data are missing.

I suspect that somehow during a maintenance cycle the /data filesystem was unmounted, data written and the /data filesystem mounted again.

I can't justify taking the services down to unmount that filesystem, is there a way to peek without unmounting?

Thanks.


Last edited by 1clue on Wed May 02, 2018 7:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
Atom2
Apprentice
Apprentice


Joined: 01 Aug 2011
Posts: 185

PostPosted: Wed May 02, 2018 7:14 pm    Post subject: Re: Find out what's under a mount point? Reply with quote

1clue wrote:
I can't justify taking the services down to unmount that filesystem, is there a way to peek without unmounting?

1clue,
I have no access to a system currently, so can't test whether it actually works. Having said that, I assume the following should actually work:

Code:
# mkdir /mnt/datapeek
# mount --bind / /mnt/datapeek
# ls -l /mnt/datapeek/data


In my view, that should list the files in the original root filesystem excluding the mounted file system under /data (which, while being mounted, hides what's currently in /data)

I hope that helps and would appreciate a quick feedback whether the stuff actually works as I expect.

Regards Atom2
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 5486
Location: Removed by Neddy

PostPosted: Wed May 02, 2018 7:16 pm    Post subject: Reply with quote

sounds like you need a --bind mount
_________________
The best argument against democracy is a five-minute conversation with the average voter
Great Britain is a republic, with a hereditary president, while the United States is a monarchy with an elective king
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2435

PostPosted: Wed May 02, 2018 7:50 pm    Post subject: Reply with quote

It works, thanks guys!

And yes that's my problem.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum