Technical article 109223

How can a filesystem be removed if there is no delete function in divvy?

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6

Written · Last revised

Problem

A filesystem needs to be removed and/or re-created for some reason. There is no delete function in divvy that will allow the filesystem to be removed and divvy won't allow a filesystem to be created on a division where a filesystem already exists.

Solution

This article will detail the steps to remove and re-create a
filesystem when using divvy.  However, it is beyond the scope
of this article to discuss where and when these steps should be
used.  The reader of this article must determine whether it is
safe to follow this procedure.

This article references the output from an SCO OpenServer 5.0.x system but is applicable to earlier releases of SCO UNIX Operating Systems.

The divvy table for this exercise starts out looking like this:

+-------------------+------------+--------+---+-------------+------------+
| Name              | Type       | New FS | # | First Block | Last Block |
+-------------------+------------+--------+---+-------------+------------+
| boot              | EAFS       |  no    | 0 |            0|       14999|
| swap              | NON FS     |  no    | 1 |        15000|      137999|
| root              | HTFS       |  no    | 2 |       138000|      499999|
| u                 | HTFS       |  no    | 3 |       500000|      829345|
|                   | NOT USED   |  no    | 4 |            -|           -|
|                   | NOT USED   |  no    | 5 |            -|           -|
| recover           | NON FS     |  no    | 6 |       829346|      829355|
| hd0a              | WHOLE DISK |  no    | 7 |            0|      830361|
+-------------------+------------+--------+---+-------------+------------+
829356 1K blocks for divisions, 1006 1K blocks reserved for the system

SECTION I - This section describes the steps to remove the u filesystem.

A. Select the e[nd] option from the divvy main menu. Enter the number 3 to select the u division in the table.

B. Enter the first block value in the last block field. In the above table, enter 500000 as the ending block for the u filesystem.

C. After entering the ending block, the division table should now look like this:

+-------------------+------------+--------+---+-------------+------------+
| Name              | Type       | New FS | # | First Block | Last Block |
+-------------------+------------+--------+---+-------------+------------+
| boot              | EAFS       |  no    | 0 |            0|       14999|
| swap              | NON FS     |  no    | 1 |        15000|      137999|
| root              | HTFS       |  no    | 2 |       138000|      499999|
| u                 | HTFS       |  no    | 3 |            -|           -|
|                   | NOT USED   |  no    | 4 |            -|           -|
|                   | NOT USED   |  no    | 5 |            -|           -|
| recover           | NON FS     |  no    | 6 |       829346|      829355|
| hd0a              | WHOLE DISK |  no    | 7 |            0|      830361|
+-------------------+------------+--------+---+-------------+------------+
829356 1K blocks for divisions, 1006 1K blocks reserved for the system

If the u filesystem is going to be re-created, go to Section II and skip part D and E of this section.

D. Select q to quit and i[nstall] to exit divvy and rewrite the table. The u filesystem will no longer exist on the system.

E. The nodes for the filesystem and the mount point still exist on the system and should be removed if the u filesystem is not going to be recreated.

The nodes and mount point can be removed with the following steps:

1. As the root account, enter the following command:

# rm /dev/u /dev/ru

This will remove the nodes for the u filesystem.

2. Remove the mount point for the u filesystem.  If the mount
point was called u, it can be removed with this command:
# rmdir /u
3. Remove the automount command for the u filesystem.  This
command is found in /etc/default/filesys.  Using a text editor,
edit this file and remove the entry that mounts the u filesystem.

II. The following steps will detail how to continue in divvy to re-create a new u filesystem and to add another filesystem.

A. Enter c[reate].  Enter the number 3 to re-create the u filesystem.

B. Enter e[nd] to put in the ending block for the u filesystem. Enter the number 3 to select the u division in the table.

C. Enter a new value for the ending block (or use the old ending
block if you want to re-create the u filesystem with the same size
as before).  Divvy will automatically put the starting value into
the first block field.  If a value of 650000 was used for the ending
block for the u filesystem, the divvy table would now display this:
+-------------------+------------+--------+---+-------------+------------+
| Name              | Type       | New FS | # | First Block | Last Block |
+-------------------+------------+--------+---+-------------+------------+
| boot              | EAFS       |  no    | 0 |            0|       14999|
| swap              | NON FS     |  no    | 1 |        15000|      137999|
| root              | HTFS       |  no    | 2 |       138000|      499999|
| u                 | HTFS       |  yes   | 3 |       500000|      650000|
|                   | NOT USED   |  no    | 4 |            -|           -|
|                   | NOT USED   |  no    | 5 |            -|           -|
| recover           | NON FS     |  no    | 6 |       829346|      829355|
| hd0a              | WHOLE DISK |  no    | 7 |            0|      830361|
+-------------------+------------+--------+---+-------------+------------+
829356 1K blocks for divisions, 1006 1K blocks reserved for the system

Now it will be possible to create a new filesystem for position 4 in the divvy table using the unused blocks on the disk.

D. Select the c[reate] option.  Enter the number 4 to select the
fourth entry in the table.

E. Select the e[nd] option. Enter the number 4 to select the fourth entry in the table and enter 829345 for the last block. The starting block will be filled automatically by divvy.

F. Select the n[ame] option. Enter the number 4 to select the fourth entry in the table and enter a name for this new filesystem. For the example, the new filesystem will be called v.

H. Select the t[ype] option.  Enter the number 4 to select the
fourth entry in the table and select the type of filesystem to
create.  For the example, the new filesystem will be of a DTFS
filesystem.

After completing these steps, the divvy table should now look like this:

+-------------------+------------+--------+---+-------------+------------+
| Name              | Type       | New FS | # | First Block | Last Block |
+-------------------+------------+--------+---+-------------+------------+
| boot              | EAFS       |  no    | 0 |            0|       14999|
| swap              | NON FS     |  no    | 1 |        15000|      137999|
| root              | HTFS       |  no    | 2 |       138000|      499999|
| u                 | HTFS       |  yes   | 3 |       500000|      650000|
| v                 | DTFS       |  yes   | 4 |       650001|      829345|
|                   | NOT USED   |  no    | 5 |            -|           -|
| recover           | NON FS     |  no    | 6 |       829346|      829355|
| hd0a              | WHOLE DISK |  no    | 7 |            0|      830361|
+-------------------+------------+--------+---+-------------+------------+
829356 1K blocks for divisions, 1006 1K blocks reserved for the system

I. Select q to quit and i[nstall] to create the new filesystems. The system should respond that it is making filesystems.

J. Since the u filesystem existed previously, no additional steps are required. The u filesystem should be mountable and accessible. The v filesystem requires additional steps to create the mount point and the nodes for the filesystem. From the command line, follow these steps to finish the setup for the v filesystem:

1. Run the command "mkdev fs".

2. Select option 1, "Add a new filesystem to system".

3. Select the filesystem to add: /dev/v
4. Select the mount point to create: /v
The v filesystem should now be mountable and accessible.  One
additional step is required if the v filesystem is to automount at
boot time.  The /etc/default/filesys file must be modified to add
an entry for the v filesystem. Once an entry for the v filesystem
has been added, the v filesystem should mount at boot time.

From the Xinuos technical article database, record 109223. Reproduced with permission. The original is at www.sco.com/ta/109223, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.