13.07.2015 Views

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

Java™ Application Development on Linux - Dator

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6.2 Use <strong>Linux</strong> Features to Make Multiple Java SDKs Play Nicely Together171case (we d<strong>on</strong>’t want to muddy the waters with LVM 1 or RAID 2 at thispoint—most <strong>Linux</strong> distributi<strong>on</strong>s do not do LVM or RAID “out-of-the-box”),if you have more than <strong>on</strong>e partiti<strong>on</strong> or disk drive, these are “mounted” at differentpoints <strong>on</strong> the directory tree. For example, Mr. Schwarz’s laptop’s mounttable looks like this:$ mount/dev/hda2 <strong>on</strong> / type ext3 (rw)n<strong>on</strong>e <strong>on</strong> /proc type proc (rw)usbdevfs <strong>on</strong> /proc/bus/usb type usbdevfs (rw)/dev/hda1 <strong>on</strong> /boot type ext3 (rw)n<strong>on</strong>e <strong>on</strong> /dev/pts type devpts (rw,gid=5,mode=620)n<strong>on</strong>e <strong>on</strong> /dev/shm type tmpfs (rw)$We have <strong>on</strong>e large partiti<strong>on</strong> mounted at /, or root, and a small partiti<strong>on</strong>mounted at /boot. In all of our hard link examples so far, we have been makinglinks <strong>on</strong> the root filesystem. Example 6.1 shows what happens when an attemptis made to hardlink between two different mounted devices.This is what we mean when we say a link cannot cross filesystems. 3The other problem is more “touchy-feely.” With a hard link, you can seeby the link count that other links exist, but you d<strong>on</strong>’t know where they are.Symbolic links get you around both of these issues.6.2.1.2 Symbolic Links, or SymlinksIn a sense, symbolic links are much simpler than hard links. A symbolic link isa file that c<strong>on</strong>tains the name of another file or directory. Because it is markedas a symbolic link, the system will replace it with the c<strong>on</strong>tents of the linked file.Example 6.2 will make this more clear.1. Logical Volume Manager. This is a tool that lets you arbitrarily aggregate disk drives andpartiti<strong>on</strong>s into a “logical volume” that may be mounted and unmounted as a unit. Such toolsare comm<strong>on</strong>ly used in serious producti<strong>on</strong> servers, but are rare <strong>on</strong> workstati<strong>on</strong>s or simple <strong>Linux</strong>servers.2. Redundant Array of Inexpensive Disks. Another heavy server feature that allows multipledisk drives to be linked up as if they were a single disk drive and to act as backup to <strong>on</strong>e anothersilently and transparently.3. In a similar vein, there are some networked filesystems that do not support hard links at allbecause the server or host system doesn’t support the c<strong>on</strong>cept. Attempts to make links <strong>on</strong> orto such systems will also fail.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!