Today I removed swap from the system drive on my Debian. And created a swapfile on md0. So, I have a RAID1 array for data and a swapfile (the only swapfile). The system with boot partition is on another drive.fstab ends like this/dev/md0                /mnt/raid1              ext4    defaults        0 0/mnt/raid1/swapfile               swap                    swap    defaults        0 0Will the system even boot up if md0 fails to initialize for whatever reason? Or will I end up in emergency console or something like that?
What happens if my RAID fails while the swap is on it?
raid;swap;mdadm
Whether it's a RAID volume or not doesn't affect what happens if the volume containing swap fails.If the swap volume can't be started at boot time, your system will start without swap. I think you'll just get a boot log message about the swap volume not being available.If the swap volume fails while a process is using it, I think the process will get killed with a segmentation fault (SISSEGV) (I'm not completely sure about the signal in that case). This is extremely unlikely on a RAID-1 volume of course.If you hibernate, the swap volume must be available to resume. If it isn't and you don't boot at all, you can still resume later. But if the swap volume is not available and that results in booting the operating system from scratch, then the hibernated system can't be used anymore even if the swap becomes available again, because the swapped system will no longer have a current state of mounted filesystems, as they've been modified by the newly booted system.