Showing posts with label zfs. Show all posts
Showing posts with label zfs. Show all posts

Tuesday, January 17, 2017

How to create or increase a swap partition on Solaris

In this post, I will explain to you, how to create or increase a swap partition on Solaris operating system. Swap partition is more useful file system which is used on Solaris as a virtual memory. Once the resource memory utilization get full, then swap memory comes in the role which maintain the server performance on the Solaris operating system.

If your Solaris server is connected to SAN storage then we will create a extra swap partition with storage. Normally ZFS file system we are using in Solaris operating system. By default swap partition which we created during Solaris OS installation is use rpool. In my case we are using SAN storage space to create the new swap partition.

Step by Step method of creation of swap partition:

1. First you can check the current swap space with below command.

     sun#swap -l
     swapfile             dev    swaplo   blocks     free
     /dev/zvol/dsk/rpool/swap 228,1        16  8388592  5850576

If you see the the output, only one "swap" named file is created on the server.

Note: this is default swap partition which we created during OS installation.

2. Now I want to increase my swap partition. for this please run the below command.

    sun#zfs create –V 64G san/swap1

    sun#swap –a /dev/zvol/dsk/san/swap1

In above command, I will created the new swap file "swap1" with 64 GB.

3. Swap partition is created now, you can check the status by below command
 
    sun#swap -l

4. For permamnent entry please add this file system in /etc/vfstab

/dev/zvol/dsk/san/swap1 -       -       swap    -       no      -

Note: If after reboot or shutdown the server, swap space is not present then please check the /dev/zvol/dsk/san directory and found the swap file name after that run the below command

swap –a /dev/zvol/dsk/san/swap1

Hope, you like this post, In case of any query please comment on this post, I will try to resolve your problem asap.

Tuesday, December 27, 2016

How you will increase the file system size in Solaris 11


Please find the below method to increase the file system size in Solaris operating system.

1. First you need to check which "zpool" pool is used for your solaris file system. Generally if you server is not connected to any SAN, then zpool name should be "rpool"

2. You can run the below command to check the current zpool status.

#zpool status














In my machine two pool status you can see. My machine is connected to SAN , So I have two pool through which i can increase the file systems size.

3. Run the "df -h" command to check the current size and file system name as given below.











If you can see in above image my system root filesystem is created through "rpool" pool. So when i will increase the file system size then i can use only free space from "rpool" zpool.

4. Please find the below command to increase the file system size. (ex. we will increase the root file system size here)

#zfs set quota=69G rpool/ROOT/solaris-1

If you see the output of df -h , the current size of root file system is 67 GB, and if we want to increase 2GB space more, then you can use the above command. We can fixed the quota size of file system then reserve it. 

#zfs set reservation=69G rpool/ROOT/solaris-1

after successfully run above command you can found that your file system size can increase to 2 GB more and same size has been reduced to "rpool" pool.