LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-02-2016, 09:54 AM   #1
circus78
Member
 
Registered: Dec 2011
Posts: 273

Rep: Reputation: Disabled
/tmp mounted on /var/tmp


Hi,
on my VPS (cPanel server) I see this:

Code:
# mount
..
/tmp on /var/tmp type none (rw,noexec,nosuid,bind)
..
How is it possible to mount a folder on top of another?

I tried to do this but without success:

Code:
# dd if=/dev/zero of=/root/loopfile bs=512 count=1000
# mkfs.ext2 /root/loopfile                                  
# mkdir /test
# mount -o loop /root/loopfile /test

# mount
/dev/sda3 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/root/loopfile on /test type ext2 (rw,loop=/dev/loop0) <===========

# mkdir /folder
# mount /test /folder
mount: you must specify the filesystem type

I think that in my case, /tmp is actually /usr/tmpDSK loop file.
Anyway, how can I track from which loop file (or device) is /tmp mounted?

Thank you
 
Old 09-02-2016, 09:58 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
n/m. brain fart.
 
Old 09-02-2016, 12:00 PM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,308
Blog Entries: 3

Rep: Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721Reputation: 3721
Quote:
Originally Posted by circus78 View Post
How is it possible to mount a folder on top of another?
Do you mean with a bind mount?

Code:
mount --bind /home/foo/ /home/bar/
That would make the contents of /home/foo/ also appear under /home/bar/

It can be done in fstab too according to the "mount" man page and according to what you have posted from your VPS.

Last edited by Turbocapitalist; 09-02-2016 at 12:01 PM.
 
Old 09-02-2016, 12:16 PM   #4
circus78
Member
 
Registered: Dec 2011
Posts: 273

Original Poster
Rep: Reputation: Disabled
[QUOTE=Turbocapitalist;5599849]Do you mean with a bind mount?

Code:
mount --bind /home/foo/ /home/bar/
Yes, sorry I missed the "bind" option
Anyway, I have no such entry in my fstab. Maybe there is some script during boot process that accomplish this.
Thank you!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rpmbuild error bad exit status from /var/tmp/rpm-tmp.86594 error anis123 Linux - Software 1 08-20-2014 04:06 PM
Bad exit status from /var/tmp/rpm-tmp.Cs9Mt5 (%build) imbrij Linux - Virtualization and Cloud 11 10-27-2012 10:55 AM
how to securing /tmp , /var/tmp and /dev/shm hackintosh Linux - Security 7 10-17-2007 11:26 PM
kde, /tmp, /var/tmp and all that garba Linux - Software 4 06-17-2005 12:31 PM
Newbie question - /tmp /var/tmp Mr happy Linux - Security 3 01-27-2003 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration