SlackwareThis Forum is for the discussion of Slackware Linux.
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've got a server with Slackware64 13.0 installed. It has 2 disks in it configured for RAID1 (1 root partition & 1 swap partition on each disk in RAID1: /dev/md0 & /dev/md1). For some reason, the box became unresponsive and after I rebooted it, swap seems to be gone. There's no /dev/md1 anymore and for some reason Slack is resyncing /dev/md0 starting from 0%...
I was not able to find any specific errors in the log files.
Does anyone have an idea on why /dev/md1 is gone and why it's resynching /dev/md0?
Actually, you can RAID your swap partitions. I almost always use swap on RAID. But you should be using RAID0 instead for speed. The more disks you have in your RAID0 swap, the faster your system will be. And preferably, put those partitions on the outer edges of your disks, which are moving faster to give decreased access times. Swap doesn't need redundancy. But it does benefit from the increased speed that RAID0 will give you.
Actually, you can RAID your swap partitions. I almost always use swap on RAID. But you should be using RAID0 instead for speed. The more disks you have in your RAID0 swap, the faster your system will be. And preferably, put those partitions on the outer edges of your disks, which are moving faster to give decreased access times. Swap doesn't need redundancy. But it does benefit from the increased speed that RAID0 will give you.
Ok, but I don't care about speed, I care about reliability, stability & uptime What happens when 1 disk, which contains parts of your RAID0 swap, completely fails whilst this is in use?
Ok, but I don't care about speed, I care about reliability, stability & uptime What happens when 1 disk, which contains parts of your RAID0 swap, completely fails whilst this is in use?
Then I would definitely say go ahead and use it. Because it is a good point. If you have more than two disks, then use RAID5. You'll have your redundancy and speed along with it.
How is the raid drive setup? Are these IDE, sata or scsi? What type of drives are they? You should check if there are any know issues with the drives and RAID.
Is seems one of the drive stops responding causing mdadm to treat it as a failure. This can occur if the drive goes to sleep, become non-responsive when flushing cache (Seagate had the problem) or on the same IDE cable. Run a full smartctl on both disks. You can then use hdparm to tweak the drive settings.
Actually, you can RAID your swap partitions. I almost always use swap on RAID. But you should be using RAID0 instead for speed.
Shingoshi
What a load of....
I never said you couldn't swap on raid...
If you are headed into swap why would you add the overhead of raid0 onto that for no benefit?
Setting the swap priority the same for each partition will let the kernel "stripe" across the swap partitions... and is way more efficient.
Quote:
Originally Posted by tunkaflux
In this case, what happens when swap is in use and one of the disks fails?
It's called a "Really Bad Day"(TM). =)
Yes it could crash the machine but after a re-boot, your system should come back fine. (less that swap partition).
If uptime is extremely important then of course raid the swap (just don't use raid0). You might also be better off looking at proper battery backed hardware raid too.
If you are headed into swap why would you add the overhead of raid0 onto that for no benefit?
Setting the swap priority the same for each partition will let the kernel "stripe" across the swap partitions... and is way more efficient.
Was it that difficult to say this without being insulting? Frankly I knew nothing about the swap priority. I missed the information you gave about setting the swap priority in your first post. Thanks for having posted it! Hopefully others won't miss it also.
EDIT: I have now followed your good advice!
1.) I first had to "swapoff -a" to dump all memory.
2.) Then I went into Webmin and deleted those partitions.
3.) Followed by reformatting them as Linux 82 (Hardware/Partitions on Local Disks),...
4.) and remounting and activating them in the "Disk and Network Filesystems" tab under System.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.