• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 325
  • Last Modified:

Relocating File System

I have a new FS as follows:

Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t0d0s0    10326052 6376528 3846264    63%    /
/proc                      0       0       0     0%    /proc
fd                         0       0       0     0%    /dev/fd
mnttab                     0       0       0     0%    /etc/mnttab
swap                 1077040      16 1077024     1%    /var/run
swap                 1078264    1240 1077024     1%    /tmp
/dev/dsk/c0t0d0s3    27631775       9 27355449     1%    /space

I would like to remove /space and create two new mount points.
/var = 10G
/opt = 20G.
How can I do that, with the command please?

Another simple question is how can I mount CDRom?
1 Solution
"Another simple question is how can I mount CDRom?"

Enter --> rmmount

See --> man rmmount

You haven't bothered to specify the VERSION of Solaris you're using. Modern versions include an auto-mounter which should detect the CD-ROM and mount it in /cdrom

You don't have 30 GB of space in /dev/dsk/c0t0d0s3 to split into a 10 GB and a 20 GB partitions. You've only got about 26.35 GB.

As for the proper tools, you need this command --> format

See --> man format

You need to be super-user to run format. You should unmount the /space filesystem first. Then use format (select the disk, enter the "partition" menu, change the approrpiate slices) to alter the disk allocation. Be sure to use the "label" command to write the new disk label.

You can then use --> newfs

See --> man newfs

The "newfs" command puts a filesystem on the new slices.

Don't forget to make sure they are added in the filesystem table --> man vfstab

Finally, and perhaps most importantly, note that you can't just create a /var and a /opt and mount them and expect everything to work. The system already has a /var and a /opt, under /. These directories already contain files and sub-directories (certainly /var does). You *might* be able to use cpio or some similar tool to copy the data over to the new filesystems - that's WAY out of the scope of your Question (and worth a LOT more, too).

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now