# Creating segments

This chapter discusses when to use segments and how to create them using different EVMS interfaces.

## When to create a segment

A disk can be subdivided into smaller storage objects called disk segments. A segment manager plug-in provides this capability. Another reason for creating disk segments is to maintain compatibility on a dual boot system where the other operating system requires disk partitions. Before creating a disk segment, you must choose a segment manager plug-in to manage the disk and assign the segment manager to the disk. An explanation of when and how to assign segment managers can be found in .

## Example: create a segment

This section provides a detailed explanation of how to create a segment with EVMS by providing instructions to help you complete the following task:

> ### Create a 100MB segment

> Create a 100MB segment from the freespace segment sde_freespace1. This freespace segment lies on a drive controlled by the DOS Segment Manager.

### Using the EVMS GUI

To create a segment using the GUI, follow the steps below:

1. Select Actions Create Segment to see a list of segment manager plug-ins.

2. Select DOS Segment Manager. Click Next.

   The next dialog window lists the free space storage objects suitable for creating a new segment.

3. Select `sde_freespace1`. Click Next.

   The last dialog window presents the free space object you selected as well as the available configuration options for that object.

4. Enter 100 MB. Required fields are denoted by the "*" in front of the field description. The DOS Segment Manager provides default values, but you might want to change some of these values.

   After you have filled in information for all the required fields, the Create button becomes available.

5. Click Create. A window opens to display the outcome.

Alternatively, you can perform some of the steps to create a segment from the GUI context sensitive menu:

1. From the Segments tab, right click on `sde_freespace1`.

2. Click Create Segment...

3. Continue beginning with step 4 of the GUI instructions.

### Using Ncurses

To create a segment using Ncurses, follow these steps:

1. Select Actions CreateSegment to see a list of segment manager plug-ins.

2. Select DOS Segment Manager. Activate Next.

   The next dialog window lists free space storage objects suitable for creating a new segment.

3. Select `sde_freespace1`. Activate Next.

4. Highlight the size field and press spacebar.

5. At the "::" prompt enter `100MB`. Press Enter.

6. After all required values have been completed, the Create button becomes available.

7. Activate Create.

Alternatively, you can perform some of the steps to create a segment from the context sensitive menu:

1. From the Segments view, press Enter on `sde_freespace1`.

2. Activate Create Segment.

3. Continue beginning with step 4 of the Ncurses instructions.

### Using the CLI

To create a data segment from a freespace segment, use the `Create` command. The arguments the `Create` command accepts vary depending on what is being created. The first argument to the `Create` command indicates what is to be created, which in the above example is a segment. The remaining arguments are the freespace segment to allocate from and a list of options to pass to the segment manager. The command to accomplish this is:

    Create: Segment,sde_freespace1, size=100MB

#### NOTE

The `Allocate` command also works to create a segment.

The previous example accepts the default values for all options you don't specify. To see the options for this command type:

    query:plugins,plugin=DosSegMgr,list options