"How do I add extra ZFS swap in Solaris 11.3?"

Post #303028598 by Peasant on Friday 11th of January 2019 12:38:17 AM

Altho by default, solaris will create zvol under rpool for swap, one can use regular disk for it, a file or a zvol (3 options) from anywhere available.

Since your requirement is to have 3x1 TB of swap (??), i would go with disk backed devices.
Create a slice a on each disk, starting from 1st sector (not zero).
Add a swap device to configuration using swap -a <yourdisk><slice_number>
Modify the /etc/vfstab to have it after reboot.

Now you will have both ZVOL and new added disk listed under swap -l.
Remove the zvol via swap -d, the entry from /etc/vfstab, and using zfs command destroy the zvol.
The last operation might fail if swap is used (or has been used in past), then reboot will be required to remove it.

Question for you is, 3 TB of swap seems unreasonably high, why do you have requirement for such large swap space ?
Also, using fibre luns as swap could lead to terrible things to your infrastructure and storage, if you start using all that space...
How much memory do you have on that box ?

Hope that helps
This User Gave Thanks to Peasant For This Post:
Man Pages

Unix man pages did not exist during the first two years of Unix history. The first actual unix man pages were written by Dennis Ritchie and Ken Thompson at the direction of Doug McIlroy in 1971. The Unix Programmer's Manual was first published on November 3, 1971. The Unix Programmer's Manual also contained a set of short papers describing of operating system features. The printed version of the Unix Programmer's manual was originally contained in a single binder. As of the Programmer's Workbench (PWB/UNIX) and the 7th Edition of Research Unix these documents were split into two volumes with the printed man pages forming Volume 1. Later versions of the Unix documentation followed the concise style of the early man pages. Dennis Ritchie added a "How to get started" section to the Third Edition introduction. Lorinda Cherry provided the "Purple Card" pocket reference for the Sixth and Seventh Editions. For the Fourth Edition the man pages were formatted using the troff typesetting package and its set of -man macros. These macros were completely revised between the Sixth and Seventh Editions of the Unix Programmer's Manual and have not changed much since the "good ole' days".
In the early days of Unix the availability of online documentation through a man page system was regarded as a great advance in computing. The modern descendants of 4.4BSD also distributed man pages as system documentation. Virtually every Unix command line application comes with a man page and many Unix users perceive a command's lack of a man page as a sign of low quality. Debian, for example, has written man pages for numerous programs which originally had no man page.
Please enjoy and help our forum community by "showing your work" and posting your code, even when your code is not working as expected. To help others help you, please wrap your code blocks, sample input, sample output, error messages, and other data in CODE tags and wrap your short commands and short data objects in ICODE tags. We were all beginners in the beginning. If you have any questions about how to register or how to post, please contact us in Live Chat. Thank you and enjoy this "forever free" technical support community for UNIX, Linux and computer information technology in general.
Related Linux and UNIX Technical Support
How can I create a new swap location in ZFS?
I am running OpenSolaris v5.11 During installation, the installation created default ZFS filesystems, like the dump and swap locations. I want to change the blocksize of the /dump and /swap locations and make them ZFS volumes. The ZFS system is on a zpool called rpool I was able to do...... Solaris
increase SWAP on ZFS file system
Hi All, I am using this commands to dynamically increase ZFS swap space on Solaris my question is: 1- after i make these commands it will permanent or it will remove after restart 2- how to make it permanent # swap -l swapfile dev swaplo bloques libre /dev/zvol/dsk/rpool/swap...... Solaris
Add extra columns help
Hi Gurus, This below script adds a column extra to my flat file..But how can i add another column, Say if i just put mention an other column beside the first column..it does get generated but as one column only while IFS="" read r; do printf "dummy\t%s\n" "$r" done < xxx.txt > zzz.txt ...... UNIX for Dummies Questions & Answers
UNIX for Dummies Questions & Answers
dual boot solaris/solaris zfs file system
Hi, I am running into a some problems creating a dual boot system of 2 solaris instances using ZFS file system and I was wondering if someone can help me out. First some back ground. I have been asked to change the file system of our server from UFS to ZFS. Currently we are using Solaris...... Solaris