We all know that mounting a new partition as /home and maybe /boot is extremely useful. Or mounting a remote directory as /opt can be great for sharing system tools. Are there any other, maybe more esoteric, uses for extra partitions or hard drives or nifty ways to mount external volumes? Maybe even if anyone also has windows machines *shudder*, post some cool tricks involving partitioning and hard drive mounting.
|
FUSE (Filesystem in USErspace) allows many things to be accessible as ordinary files (not an exhaustive list by any means):
There are also many FUSE filesystems that present a view of another filesystem with filtering, renaming or modified metadata or content:
More possibilities on the FUSE site and elsewhere. You can also easily define your own in Erlang, Haskell, Lisp, Lua, Ocaml, Perl, Python, ... |
||||
|
|
|
You have someone who can only access your server over ftp and are confined to their home directory but you realise they they need access to some other directory not in their home folder. For example bob has ftp access to your web server, but also you want to let him view the log files in /var/logs/httpd/vhosts/bobssite.com/. It is a hassle to reconfigure everything so that apache writes logs for bobssite.com to bobs home folder but you can use the bind option to remount the folder like this
|
||||
|
Most unices have a logical volume manager. Use it.
|
||||
|
|
|
Most unices clean
By default, the filesystem can grow up to half your RAM. If you have a lot of swap, you might want to allow it to contain bigger files, e.g. to allow up to 2 GB:
(Making the filesystem larger has a negligible overhead; the virtual memory usage grows as needed. It's still a good idea to have a limit because a runaway program could fill it very fast, and it's better to run out of |
|||||||
|
|
If your OS supports it, make all your filesystems on RAID 1 arrays, even if you they're not replicated. That way, if you ever need to transfer the filesystem to a different disk, you can do it online and quickly by adding the partition on the second disk to the array, rebuilding the array and removing the first disk. Some LVM systems can mirror volumes, so you don't need another layers. ZFS does it without any external help. |
||||
|
|
|
Performance related: Avoid file access time writing:
Usability related: You can use alternative device names, e.g. labels or uuids. For example to identify my MP3 player I use this device name in my fstab:
You can print the uuids of connected devices via the blkid command. Analogous to that you can set a label at mkfs time or later via e2fstune and comparable tools. Then you can use
in the fstab or at the command line. |
||||
|
|
|
I like to have a separate partition for all personal data which I don't have to backup, e.g. svn checkouts, copies of data which mainly resides on an other server etc |
||||
|
|
|
An oldie. Keep your software on one disk, and your data on another. Therefore you can seek both at the same time. Makes for faster disk access. |
||||
|
|
|
Mount an .iso image as a loopback filesystem. I keep a number of .iso files around, and this can be a handy way to copy reference files on the disk image.
Or, if I want to read an offline copy of the installation manual, I can do that from the commandline: stefanl@host1:~ $ links ubuntu-10.04-server-amd64/doc/install/manual/en/index.html |
||||
|
|