Technical article 127210

On SCO OpenServer 6.0.0, how can I change a Filesystem type of a non-root filesystem on the root disk without destroying the other filesystems including the root FS?

OpenServer 6.0.0

Written · Last revised

Problem

On SCO OpenServer 6.0.0, how can I change a Filesystem type of a non-root filesystem on the root disk without destroying the other filesystems including the root FS?

In this case, the /dev/u filesystem was set to HTFS during the OSR6 installation on the root disk. We need to change it from HTFS to vxfs.

This is how my divvy table look like on /dev/hd01 :

+--------------+------------+----+---+---------+---------+
| Name         | Type       | New| # | First   | Last    |
|              |            | FS |   | Block   | Block   |
+--------------+------------+----+---+---------+---------+
| boot         | EAFS       | no | 0 |     8001|    59199|
| swap         | NON FS     | no | 1 |  2145419|  4115593|
| root         | vxfs       | no | 2 |  4115594| 20473992|
| c0b0t0d0p1s3 | NOT USED   | no | 3 |        -|        -|
| u            | HTFS       | no | 4 | 20473993| 71673991|
| c0b0t0d0p1s5 | NOT USED   | no | 5 |        -|        -|
| recover      | NON FS     | no | 6 |    59200|  2145418|
| d00017all    | WHOLE DISK | no | 7 |        0| 71681997|
| c0b0t0d0p1sd | NON FS     | no | 13|        0|     8000|
+--------------+------------+----+---+---------+---------+

Solution

To change the filesystem type of the /u filesystem, log into the server as root and do the following:

1- Make a backup of your data on /u

2- Unmount /u (Make sure it is not busy)

# umount /u

3 - Remove the existing /dev/u fileysystem entry using:

# mkdev fs

choosing option 2 (Remove a filesystem), selecting the /dev/u fileysystem......

4- To delete and recreate the /dev/u filesystem, you need to run divvy on /dev/hd01:

  # divvy /dev/hd01
+--------------+------------+----+---+---------+---------+
| Name         | Type       | New| # | First   | Last    |
|              |            | FS |   | Block   | Block   |
+--------------+------------+----+---+---------+---------+
| c0b0t0d0p1s0 | EAFS       | no | 0 |     8001|    59199|
| c0b0t0d0p1s1 | NON FS     | no | 1 |  2145419|  4115593|
| c0b0t0d0p1s2 | vxfs       | no | 2 |  4115594| 20473992|
| c0b0t0d0p1s3 | NOT USED   | no | 3 |        -|        -|
| u            | HTFS       | no | 4 | 20473993| 71673991|
| c0b0t0d0p1s5 | NOT USED   | no | 5 |        -|        -|
| c0b0t0d0p1s6 | NON FS     | no | 6 |    59200|  2145418|
| hd01         | WHOLE DISK | no | 7 |        0| 71681997|
| c0b0t0d0p1sd | NON FS     | no | 13|        0|     8000|
+--------------+------------+----+---+---------+---------+
71673997 1K blocks for divisions, 8001 1K blocks reserved
for the system
n[ame]    Name or rename a division.
c[reate]  Create a new file system on this division.
d[elete]  Delete a file system on this division.
t[ype]    Select or change filesystem type on new filesystems.
p[revent] Prevent a new file system from being created
          on this division.
s[tart]   Start a division on a different block.
e[nd]     End a division on a different block.
u[ndo]    Undo the last change.
r[estore] Restore the original division table.

Make a note of the start and end block for division 4 (/dev/u), in this case Start Block is 20473993 and end block is 71673991.

Choose "d" to delete a filesystem on division 4 --> 4 where /dev/u is located.

The divvy table will look like this:
+--------------+------------+----+---+---------+---------+
| Name         | Type       | New| # | First   | Last    |
|              |            | FS |   | Block   | Block   |
+--------------+------------+----+---+---------+---------+
| c0b0t0d0p1s0 | EAFS       | no | 0 |     8001|    59199|
| c0b0t0d0p1s1 | NON FS     | no | 1 |  2145419|  4115593|
| c0b0t0d0p1s2 | vxfs       | no | 2 |  4115594| 20473992|
| c0b0t0d0p1s3 | NOT USED   | no | 3 |        -|        -|
|              | NOT USED   | no | 4 |        -|        -|
| c0b0t0d0p1s5 | NOT USED   | no | 5 |        -|        -|
| c0b0t0d0p1s6 | NON FS     | no | 6 |    59200|  2145418|
| hd01         | WHOLE DISK | no | 7 |        0| 71681997|
| c0b0t0d0p1sd | NON FS     | no | 13|        0|     8000|
+--------------+------------+----+---+---------+---------+

to create a new /dev/u filesystem with vxfs, you need to carry out the following order:

Now define the start and end block for division 4 using the same value before the delete:

s[tart] Start a division on a different block. --> 4 --> 20473993

e[nd] End a division on a different block. --> 4 --> 71673991

Give the division 4 a name:

n[ame] Name or rename a division. --> 4 --> u

Creat a filesystem on division 4 c[reate] Create a new file system on this division. --> 4

This will now change the third filed on the divvy table for division 4 from "no" to "yes".

Choose the type of filesystem on division 4
t[ype] Select or change filesystem type on new filesystems.
--> 4
Choose from the following filesystem types:
0.  NON FS (overwrite first 64K of filesystem with zeros)
1.  AFS
2.  EAFS
3.  HTFS
4.  S51K
5.  vxfs
Please enter your choice: 5

The divvy table will now should now look like this:

+--------------+------------+----+---+---------+---------+
| Name         | Type       | New| # | First   | Last    |
|              |            | FS |   | Block   | Block   |
+--------------+------------+----+---+---------+---------+
| c0b0t0d0p1s0 | EAFS       | no | 0 |     8001|    59199|
| c0b0t0d0p1s1 | NON FS     | no | 1 |  2145419|  4115593|
| c0b0t0d0p1s2 | vxfs       | no | 2 |  4115594| 20473992|
| c0b0t0d0p1s3 | NOT USED   | no | 3 |        -|        -|
| u            | vxfs       | Yes| 4 | 20473993| 71673991|
| c0b0t0d0p1s5 | NOT USED   | no | 5 |        -|        -|
| c0b0t0d0p1s6 | NON FS     | no | 6 |    59200|  2145418|
| hd01         | WHOLE DISK | no | 7 |        0| 71681997|
| c0b0t0d0p1sd | NON FS     | no | 13|        0|     8000|
+--------------+------------+----+---+---------+---------+

Save this divvy table by quiting with "q" and then "i" to install the division table as above.

You will see a message "Making filesystems"

The making of the FS might take some time depending on the size of the division.

5- to check if the above operation was successful:

# dtype /dev/u
/dev/u  : vxfs filesystem

6- To add the new /dev/u filesystem into the /etc/default/filesys file, you need to run "mkdev fs" again.

# mkdev fs

Choosing option 1 (Add a new filesystem to system), with /dev/u as the device and /u as the mounting point.....

7- Mount the /dev/u onto /u
# mount /dev/u /u
# dfspace
/       : Disk space: 13400.50 MB of 15974.99 MB  available (83.88%).
/stand  : Disk space:    37.89 MB of    49.99 MB  available (75.80%).
/u      : Disk space: 48431.55 MB of 49999.99 MB  available (96.86%).

Total Disk Space: 61869.95 MB of 66024.99 MB available (93.71%)

8- Now restore the data back to /u

All this operation was carried out while OSR6 server was live and without a single reboot!

From the Xinuos technical article database, record 127210. Reproduced with permission. The original is at www.sco.com/ta/127210, which is reachable but blocked from search engines.

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.