How to increase or decrease the file system space in Solaris

  

Solaris is a derivative of the UNIX operating system. Sometimes the file system space is modified for work or personal reasons. The following small series introduces you to Solaris. Reduce the size of the file system so that you have a simple understanding.

Suppose a scene work, I need to add a separate file system on the server hard disk, but can be allocated on the hard disk has no free space. One alternative solution is to shrink an existing file system and squeeze out some free space.

The hard drive now has three file systems (“/”,“/usr”,“/export/home”):

# df -h

Filesystem size used avail capacity Mounted on

/dev/dsk/c0d0s0 5.8G 3.8G 2.0G 66% /

/dev/dsk/c0d0s3 6G 4G 2.0G 66% /usr< Br>

/dev/dsk/c0d0s7 12G 12M 11G 1% /export/home

where “/export/home” has the largest capacity, but has used the least space, choose to reduce the file system to Extrude free space.

Here are the steps to shrink the file system:

1. Back up file system contents

# tar cvf /home.tar /export/home

2 Unmount File System

# umount /export/home

3. Modify /etc/vfstab, comment out the file system entry

# vi /etc/vfstab
< #> device mount FS fsck mount mount

#to mount to fsck point type pass at boot options

#

#/dev/dsk/c0d0s7 /dev/Rdsk/c0d0s7 /export/home ufs 2 yes -
Previous12Next Total 2 Pages

Copyright © Windows knowledge All Rights Reserved