User`s guide

Using Command-Line Tools 37
Step 7: Add a second partition
Create and name a second partition formatted as HFS out of the remaining free space listed
in the partition map. The session, with output, looks like this:
Top level command (? for help): C
First block: 120628272
Length in blocks: 120626448
Name of partition: hfs2
Type of partition: Apple_HFS
Command (? for help): p
/dev/rdisk2 map block size=512
Device block size=512, Number of Blocks=241254720
Step 8: Write the new partition map
At the prompt, type w to close the map and save (write) the new partitions. A warning
message says that writing the map destroys what was there before. This is what you want to
do, so type
yes at the prompt.
Step 9: Exit
Type q to exit the pdisk tool.
Step 10: Initialize the new partitions
Use newfs_hfs to initialize the partitions. You will now have new dev entries related to the
partition maps available in /dev/disk*. In this example, use the cd command to change to the
/dev directory, then list the partition on the first disk. The session looks like this:
# newfs_hfs -w -v HFSVolume /dev/disk2s1
Initialized /dev/disk2s1 as a 58 GB HFS Plus volume
# newfs_hfs -w -v HFSVolume1 /dev/disk2s2
Initialized /dev/disk2s2 as a 58 GB HFS Plus volume
Step 11: Mount the new volumes
Restart the server, which will automatically mount the new volumes. You can then log in
remotely to perform any additional tasks, such as installing an operating system.
#: type name length base (size)
1: Apple_HFS hfs1 120626448@ 1824 (57.5G)
2: Apple_HFS hfs2 120626448 @ 120628272 (57.5G)
LL2133.book Page 37 Friday, May 24, 2002 11:17 AM