Relocating File System

Posted on 2004-10-26
Last Modified: 2013-12-27
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?
Question by:matchz
    1 Comment
    LVL 34

    Accepted 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).


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Course: MongoDB Object-Document Mapper for NodeJS

    NodeJS (JavaScript on the server) is awesome, but some developers get confused about NoSQL when it comes to working in Node with MongoDB (NoSQL database). Do you need a better explanation of how to use Node.js with MongoDB? The most popular choice is the Mongoose library.

    Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
    Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap ( Version 1.2 2.      Jpcap( Version 0.6 Prerequisite: 1.      GCC …
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    875 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now