Linux Storage Help - symlinking vs. binding

VanFanel89

2[H]4U
Joined
Apr 21, 2004
Messages
2,933
Greetings!

I am trying to find the best way to achieve the following:

Have a folder on a tiny partition that hosts a bunch of data and I want that data to be hosted on a folder that is on a much larger partition so:

/tinypart/events -> /hugepart/events

Currently, I am using the following in fstab:

/hugepart/events /tinypart/events none defaults,bind 0 2

However, what I find happening is that data is now written on both.... so I am pretty sure I messed something up in fstab. How can I force data to be written only on the /hugepart/events folder and NOT on the /tinypart/events folder?

Thanks!
 
Just a dumb suggestion...instead of using mounts (which can be complicated), just use a sym link for the redirect. If you're using ubuntu with a process that's controlled by apparmor, be sure to include the additional directories in the apparmor config.
 
Yep just the standard "ln" (L & N) is perfect for this. And what's really nice is if you don't want the link anymore you can always just do a simple rm on the link and your data is perfectly safe in it's real location.

Also useful in Windows as well.
 
Yep just the standard "ln" (L & N) is perfect for this. And what's really nice is if you don't want the link anymore you can always just do a simple rm on the link and your data is perfectly safe in it's real location.

Also useful in Windows as well.

I don't think hard links can span partitions as they are inode pointers iirc. A symlink should work though
 
Bind mounts suck, don't do it unless you absolute have to.

They can cause a lot of headache for all kinds of things crawling the whole system, such as backups and find jobs.

One use is for chroots but I would bind the minimum amount of stuff you get a away with.
 
Back
Top