Java Reference
In-Depth Information
case (we don't want to muddy the waters with LVM 1 or RAID 2 at this
point—most Linux distributions do not do LVM or RAID “out-of-the-box”),
if you have more than one partition or disk drive, these are “mounted” at dif-
ferent points on the directory tree. For example, Mr. Schwarz's laptop's mount
table looks like this:
$ mount
/dev/hda2 on / type ext3 (rw)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda1 on /boot type ext3 (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
$
We have one large partition mounted at / , or root, and a small partition
mounted at /boot . In all of our hard link examples so far, we have been making
links on the root filesystem. Example 6.1 shows what happens when an attempt
is made to hardlink between two different mounted devices.
This is what we mean when we say a link cannot cross filesystems. 3
The other problem is more “touchy-feely.” With a hard link, you can see
by the link count that other links exist, but you don't know where they are.
Symbolic links get you around both of these issues.
6.2.1.2
In a sense, symbolic links are much simpler than hard links. A symbolic link is
a file that contains the name of another file or directory. Because it is marked
as a symbolic link, the system will replace it with the contents of the linked file.
Example 6.2 will make this more clear.
Symbolic Links, or Symlinks
1. Logical Volume Manager. This is a tool that lets you arbitrarily aggregate disk drives and
partitions into a “logical volume” that may be mounted and unmounted as a unit. Such tools
are commonly used in serious production servers, but are rare on workstations or simple Linux
servers.
2. Redundant Array of Inexpensive Disks. Another heavy server feature that allows multiple
disk drives to be linked up as if they were a single disk drive and to act as backup to one another
silently and transparently.
3. In a similar vein, there are some networked filesystems that do not support hard links at all
because the server or host system doesn't support the concept. Attempts to make links on or
to such systems will also fail.
Search WWH ::




Custom Search