On 13/12/26, Peter Sj?berg wrote: > On 12/26/2013 01:11 PM, Robert P. J. Day wrote: > > On Thu, 26 Dec 2013, Bart Trojanowski wrote: > > > >> Similar to chroots, I use bind mounts for containers. This is useful > >> to give all containers access to the same /home or for distributing > >> /etc/resolv.conf. The latter is actually a very cool use case of > >> bind mounts... you can bind a file, not just a directory. > > > > yes, i was playing with that very feature earlier this morning. it's > > not that there's a lack of info on bind mounts; rather, there's a lack > > of really good *examples* of its use. > > Besides what other already said I commonly use it to find out why / (or > any other fs with multiple fs mounted on top) is filled up > mount --bind / /mnt/root > du -sh /mnt/root/*|sort -h > since then all the mounted fs won't get included and it even catch if > someone manage to fill up /dev, /proc, /sys or /tmp before it's properly > mounted. Interesting... I would normally just use: du -hxd1 /|sort -h > Another use is when I booted a cd in rescue mode and the real fs is > mounted under /mnt. "chroot /mnt" kind of works but you have to mount > /proc, /sys & /dev properly and for that I normally use bind > mount --bind /dev /mnt/dev > and so on, and no issues to cleanly umount it later. All good tips coming out in this thread... > /ps slainte mhath, RGB -- Richard Guy Briggs -- ~\ -- ~\ <hpv.tricolour.net> <www.TriColour.net> -- \___ o \@ @ Ride yer bike! Ottawa, ON, CANADA -- Lo_>__M__\\/\%__\\/\% Vote! -- <greenparty.ca>_____GTVS6#790__(*)__(*)________(*)(*)_________________