-->

Previous | Table of Contents | Next

Page 287

TIP
If you need to remount a filesystem that already has an entry in the fstab file, you don't need to type in the mount command with all the parameters. Instead, simply pass the directory to mount as the parameter, as in

mount /dir/to/mount


where /dir/to/mount is the directory that needs to be mounted. mount will automatically look to the fstab file for all the details, such as which partition to mount and which options to use.

If you need to remount a large number of filesystems that are already listed in the fstab file, you can use the -a option in mount to try to remount all the entries in fstab like this:

mount -a


If it finds that a filesystem is already mounted, no action on that filesystem will be performed. If, on the other hand, it finds that an entry is not mounted, it will automatically mount it with the appropriate parameters.

WARNING
When setting up servers that mount filesystems from other servers, be wary of cross mounting. Cross mounting happens when two servers mount each other's filesystems. This can be dangerous if you do not configure the /etc/fstab file to mount these systems in the background (via the bg option) because it is possible for these two machines to deadlock during their boot sequence as each host waits for the other to respond.

For example, let's say you want host1 to mount /export/usr/local from host2, and host2 to mount /export/home/admin from host1. If both machines are restarted after a power outage, host1 will try to mount the directory from host2 before turning on its own NFS services. host2 is, at the same time, trying to mount the directory from host1 before it turns on its NFS services. The result is both machines waiting forever for the other machine to start.

If you use the bg option in the /etc/fstab entry for both hosts, they would fail on the initial mount, background the mount, and continue booting. Eventually, both machines would start their NFS daemons and allow each other to mount their respective directories.

Complete Sample Configuration Files

Listing 13.4 contains a complete /etc/exports file for a server.

Page 288

Listing 13.4. A complete /etc/exports file.


#

# /etc/exports for denon

#

# Share the home dirs:

/export/home        technics(rw) pioneer(rw) vestax(rw)

                              Âatus(rw) rane(rw)



#

# Share local software

#

/export/usr/local    technics(rw,no_root_squash)

                     Âvestax(rw,no_root_squash)

                     Âpioneer(rw,no_root_squash)

                     Âatus(rw,no_root_squash)

                     Ârane(rw,no_root_squash)

Listing 13.5 contains a complete /etc/fstab file for a client.

Listing 13.5. A complete /etc/fstab file.


#

# /etc/fstab for technics

#



/dev/hda1                    /                      ext2 rw              0 0

/dev/hda2                    swap                   swap

/dev/hda3                    /usr                   ext2 rw              0 0

/dev/hda4                    /var                   ext2 rw              0 0

denon:/export/home           /home                  nfs  rw,bg,intr,soft 0 0

denon:/export/usr/local      /usr/local             nfs  rw,bg,intr,soft 0 0

rane:/export/mail            /var/spool/mail        nfs  rw,bg,intr,soft 0 0

Connecting to the Net with PPP

Red Hat Linux has made connecting to the Internet through PPP (Point to Point Protocol) a much simplified process complete with a GUI interface. Before continuing, you need to be sure of the following:

Page 289

After you have these necessities set up, you can begin configuring PPP.

NOTE
Unless otherwise specified, all the commands in this section must be run as the root user.

Simple Client

If your Red Hat machine is a standalone unit with no other network configured or if you only want your Red Hat machine to connect to the Internet via the PPP connection, this is all the configuration you need. On the other hand, if you are planning a more elaborate network with your Red Hat machine being your interface to the Internet, this section is only the beginning, but necessary.

Begin by starting the netcfg tool for configuring your network. If you have already configured your DNS, the information for your host will be displayed (see Figure 13.5).


Figure 13.5. The Network
Configurator Names
menu with hostname
and domain information.

To configure the information in this window, perform the following steps:

  1. If you haven't specified a hostname for yourself, click in the Hostname: box and enter one.
  2. In the Domain: box, enter the domain name of your ISP.
  3. Leave the Search for hostnames in additional domains: box blank and skip to the Nameservers: box below it. In here, enter the DNS server IP address your ISP provided you (one IP address to a line).

Page 290

You are now ready to configure the PPP device. To do this, click the Interfaces button at the top of the window. The window will change to look like Figure 13.6.


Figure 13.6.
The Network
Configurator Interfaces
menu before configuring PPP.

  1. Click the Add button at the bottom of the window. Another window listing your interface options will appear. Select PPP as the Interface Type and click OK. The Interface Options window will close and the Create PPP Interface window will appear (see Figure 13.7).

Figure 13.7.
The Network
Configurator Create
PPP Interface menu.

Before continuing, be sure that no one with whom you don't want to share your PPP password is watching. At the PPP password prompt, the password will be shown on the screen in clear text and anyone reading over your shoulder will be able to see it.
  1. Click in the Phone Number: box and enter the phone number for your ISP. Be sure to include any special dialing prefixes you need to either disable call waiting or get to an outside line.
  2. Skip the Use PAP Authentication button unless your ISP requires it. Enter the appropriate information in the PPP login name: box and the PPP password: box.

Previous | Table of Contents | Next