• Aucun résultat trouvé

Update the mount entries in /etc/fstab

Dans le document A / UX® Local System Administration (Page 183-187)

Making and mounting an A!UX ftle system

8. Update the mount entries in /etc/fstab

You'll also want to update the file system table in /etc/fstab.

When changing an important system file like this, it is always a good idea to make a copy of it first. That way, if something goes wrong, you can always reinstate the copy to its original name and restore your system to its previous state. Mter copying

/etc/fstab, edit the file to include this line:

/dev/dsk/cndOsO mount-point 4.2 rw 0 2

For an explanation of the fields in /etc/fstab, see Figure 8-6, "A Description of Sample Entries in /etc/fstab." See the section "Multiple File Systems and fsck,"

in Chapter 8, for more information on the relevance of these fields. You can also refer to fstab(4) in A!UX Programmer's Reference.

Using newfs

The command to make a file system differs for UFS and SVFS. Use the newfs command to make a UFS file system. With newf s you don't have to enter the size of the partition in inode blocks, as required for mkfs; simply enter the disk type and let newfs calculate it for you.

The newf s program creates file systems by placing the correct initial values into a superblock and storing them at the starting block offset for the associated partition.

To run newfs, you must supply a slice number and SCSI ID number as part of a special filename construct. This construct identifies the partition and disk to receive the file system (see "Using Partition Administration Commands," earlier in this chapter).

5-34 A!UX Local System Administration

030-0762-A

! '~

The syntax for newf s is

newfs /dev/dsk/c?d?s? device-type

where device type can be substituted for the disk type listed in your / et c / di s kt ab file-for example, HD 80S c. If you have a third-party disk, use the Apple designation for disks of the same size.

The mkfs command is still supported for making SVFS file systems. To create a new SVFS file system, use the mkfs command, which is described in the mkfs(1M) man page.

• Note: The file system initially created by newf s contains one directory called

lost+found, which is where the file system check program (fsck) stores files that have become disconnected from the file system.

The newf s Commando dialog box shown in Figure 5-8 simplifies using this command by prompting you to build the appropriate newf s command line.

• Figure 5-8 The newfs Commando dialog box

~newfs Options

.···Required ... ~ r··Disk type ... ;

I (

Choose deuice file )

I !

@ Specify Disk type: ·

I

0 HD 1 60SC

I I

t ... j

D Uerbose mode ! 0 HDOOSC

IOHD40SC

!

OHD20SC

! 0 1440K floppy disk

! 0 OOOK floppy disk

~

(DiSk parameters) (More disk parameters

f(

Output & Error)

newfs

fcommand Line

I

r-Help Construct a new Berkeley 4.2 file system. If you w;sh to create a System [ Cancel )

v file system, use the mkfs(l M) program.

C

mm.lfi- D

Chapter 5 Preparing an Apple HD SC for A/UX 5-35

Follow these steps to create a UFS file system using the newfs Commando dialog:

1. As the root user, type newfs and press COMMAND-K from a CommandShell window.

2. Click your appropriate disk type radio button.

If you do not have one of those listed, click Specify and refer to your disk drive manufacturer's specifications for the correct entry.

3. To specify the device to mount, click "Choose device ftIe."

When specifying the device name for a hard disk, begin with the prefix / dev / dsk.

4. Select / dey / dsk from the file dialog.

To open the dev folder, double-click it. To open the dsk folder, double-click it. A list of the extensions to the device name / dev / dsk is displayed. Scroll down to the one that describes your partition. Double-click it.

The extension to a device name has the form cndOsx, where n is the SCSI ID number for the disk and x is the slice number for the partition. If you created a partition for user files, use slice number 3. If you created a / u s r partition, use slice number 2.

• Note: If your disk constains two A!UX partitions, you'll have to run newf s twice.

If you need to trace your way back to the / directory, press and drag down on the current directory name displayed at the top of the dialog Lox and select /.

5. After selecting a name, you return to the newfs dialog box. The full device name you specified is shown in the command-line box.

6. Click newfs to return to the CommandShell window.

7. Press RETURN to run the command.

5-36 A!UX Local System Administration

I

\

Mounting a ftle system permanently: fsentry

Use the fsentry(1M) command to mount a file system and to create an entry in the file system table, / etc / f stab. You can make one entry each time you invoke the command. After the entry is made, the command automatically mounts the file system unless you set an option in the command line to override this action. For a description of the Commando dialog box for fsentry, see "Mounting a File System," in Chapter 4 of Setting Up Accounts and Peripherals for A!UX.

To create a file system table entry using fsentry, become the superuser, then enter fsentry

at the command line, followed by these required command line arguments

- t type device-file

mount-point

For example,

The type of file system: enter 4 .2 for UFS; 5.2 for SVFS (or nf s).

The file system to be mounted; for example, /dev/dsk/cndosx, where n is the SCSI ID number of the hard disk that contains the file system, and x

is the slice number (usually 0 to 29, inclusive-never use slice 30 or 31).

The full pathname of a directory on the local machine that is to be used as a mount point; for example, an A/UX user file system may be mounted at /users (the A/UX convention) or /user. The /usr directory tree may be mounted at directory /usr. The fsentry command creates this

directory if it does not exist.

fsentry -4.2 /dev/dsk/c5dOs3 /user

creates a file system table entry that shows that the file system located at / dev / dsk/ c5dO s3 is to be mounted at /user .

• Note: If you have more than one A/UX file system on the disk, enter the fsentry command once for each of them.

Chapter 5 Preparing an Apple HD SC for A/UX 5-37

See the fsentry(1M) man page in AlUX Command Reference for additional options that allow you to override default values. Examples are the number of passes that fsck, the file system checker makes; and the dump frequency used by the dump. bsd command discussed in Chapter 4, "Backing Up Your System."

Dans le document A / UX® Local System Administration (Page 183-187)