Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I recently installed Linux on a test server at home. This server has four 9G SCSI drives that are in a mirrored stripe set (RAID 0+1 - 18G available space). The entire Linux environment was installed on a 26G fiber channel SAN partition. The problem I've run into is that the Linux swap space is now on the SAN. I was unable to specify the local disk array for swap during installation. (well, I could specify it, but installation hung, so I just went with the SAN install.)
The local disk array is dedicated for swap space for the o/s and the application. What I want to know is what would be the best (safest) way to move the swap from the SAN file system to the SCSI file system. I was thinking about adding a swap partition on the SCSI array first, but am unclear how to de-reference the SAN swap, since it is active at boot.
I would assume the safest way would be to add the local swap space to /etc/fstab and run swapon -a to start it in motion, then run swapoff on the remote swap space and remove the entry for the remote swap space from fstab.
I prefer to work the other way around - make sure it works first before updating system files.
Create a partition, run mkswap on the new partition, and swapon for that partition.
Then you can swapoff the original, and update fstab.
Same end effect.
Thanks for the suggestions. My linux skills have gotten rusty in the past few years supporting a windows environment.
Unfortunately, by the time I got to try this, my buddy had reconfigured the SAN switch, which dropped connectivity to the Linux box. Losing the swap was apparently fatal, and I was not able to recover it. I did reload it this weekend with the swap on the local disk this time, which should eliminate the problem moving forward. I learned that placing the swap on the second drive apparently requires manual partitioning. The first time, I chose automatic partitioning, and then simply edited the partition definition, which did not work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.