Tag Info

New answers tagged

4

The mount command accepts --bind or -o bind. In the /etc/fstab file, you can use the following line: /proc /chroot/mysql/proc none defaults,bind 0 0


7

If I had a volume mounted at /media/3tb-vol1/Private/, and I wanted to bind it to /srv/Private I have a /etc/fstab like this. /media/3tb-vol1/Private/ /srv/Private none bind


0

I probably should have thought about this harder. While I don't see how to bind the filesystem, I can turn mount -t proc ro /chroot/mysql/proc/ into proc /chroot/mysql/proc proc ro 1 0


7

As has been mentioned in the comments, grab the disk's UUID and stick this in your fstab; UUID=66a7ba58-b1e2-4d91-9b5e-085064a954ab /stor ext4 defaults 0 0 (replace the UUID value with that of your own). As simple ls -la /dev/disk/by-uuid (which is just a collection of symlinks named the UUID of the disk which point to the real device's identifer ...


2

Symlink will not help you. You will need not only the /bin/sh, but the libraries. And special devices like /dev/null or /dev/zero. And more things. Best way is not only symlink, but the hardlink. And system update will be VERY tricky. mount looks a little better, but you better look at autofs - so, it could mount the user directory only when it is needed, ...


5

Long term, this is the sort of tasks that configuration management tools (e.g., puppet, chef, ansible) are made for. For a short term solution, I'd use something like func or fabric to push out your fstab file. Going to run through an example of using fabric since that's the one I'm most familiar with. Installation depends on your distro. One of these is ...


1

Assuming I have an admin account on each server available via SSH with public-key auth, I would simply remotely run sed or other text editing tool using this SSH account, in a bash loop.


1

I agree with Peter that using a deployment tool is the neatest solution. However I disagree that mouning stuff from cron is ever a good idea! If the deployment tool is too much of a leap, I'd go with a late init/systemd script (which might fetch the definitions from a central respository) and mount the filesystems.


1

Using a mass deployment tool like automateit, salt, puppet, ansible, etc. you could run a script (in puppet use exec) or a cronjob like below to use mount to run a mass deployed fstab: mount -a --fstab pathtofile And my old answer (if your mount is too old to have --fstab / -T): in such a mass deployment tool, you could do some terrible hackery to emulate ...


2

By default, the samba (cifs) package on some distributions doesn't use the hosts file to resolve the name. Instead, it uses the NetBIOS name to resolve to the IP. There are two ways to go about this: Set samba to use the hosts file for resolution. In your smb.conf file, find and modify or create the following line: [global] name resolve order = ...



Top 50 recent answers are included