Solved

How do I rename an existing file system?

Posted on 2004-09-27
3
380 Views
Last Modified: 2013-12-27
I am running Solaris 9 with two 20gig mirrored hard drives.  I need to rename an existing file system.  I want to rename export/home to /export.  How can I do this?  I need step by step instructions. See my current partiton table below.

Current partition table (original):
Total disk cylinders available: 39533 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 -  8322        4.00GB    (8323/0/0)   8389584
  1       swap    wu    8323 - 10403        1.00GB    (2081/0/0)   2097648
  2     backup    wm       0 - 39532       19.00GB    (39533/0/0) 39849264
  3        usr    wm   10404 - 20562        4.88GB    (10159/0/0) 10240272
  4        var    wm   20563 - 32135        5.56GB    (11573/0/0) 11665584
  5       home    wm   32136 - 39490        3.54GB    (7355/0/0)   7413840
  6 unassigned    wm   39491 - 39532       20.67MB    (42/0/0)       42336
  7 unassigned    wm       0                0         (0/0/0)            0

# df -k  
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d30      4127894  708533 3378083    18%    /
/dev/md/dsk/d32      5038454 1008509 3979561    21%    /usr
/proc                      0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
fd                         0       0       0     0%    /dev/fd
/dev/md/dsk/d33      5739845  155301 5527146     3%    /var
swap                 1428456      24 1428432     1%    /var/run
swap                 1428432       0 1428432     0%    /tmp
/dev/md/dsk/d34      3647766  153828 3457461     5%    /export/home
/export/home/<name of dir>  3647766  153828 3457461     5%    /home/<name of dir>


0
Comment
Question by:dee43
3 Comments
 
LVL 40

Assisted Solution

by:jlevie
jlevie earned 250 total points
ID: 12166064
Edit /etc/vfstab and change the mount point for /dev/md/dsk/d34 from /export/home to /export. That's best done from a single user boot.
0
 
LVL 38

Accepted Solution

by:
yuzh earned 250 total points
ID: 12166249
jlevie is correct.

In single user mountYou need:
umount /export/home
and make sure /export is a empty dir, so that can mount  /dev/md/dsk/d34 on /export


If you have any software installed under /export/home you might need to modify the ENV
setting for using them.  (or you need to modify the scripts for runing the software)
0
 
LVL 3

Expert Comment

by:cagri
ID: 12166786
Actually, as other friends explained, you do not "rename" filesystems on Solaris, but rather, mount them under different directories. Normally a filesystem does not have a name, and it can be mounted under any directory of your choice.

Btw, /export/home is the default directory for a number of applications, so I suggest, making and keeping a "home" folder under your newly mounted /export filesystem for just in case.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

838 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