[opensuse] boot delay after changing swap partition
On Leap 42.3 (shortly due to be updated to 15.1), in preparation I decided to change the partitioning. In view of my doubling the RAM, I created a new swap partition, /dev/sda2 on an nvme drive (I've set the swappiness=1 as it'll likely never be used, it's really just for very rare and unlikely hibernation as I have plenty of free space on this drive). After a reboot I then deleted the original swap partition on /dev/sdb2. I did all this in YaST Partitioner. Now each boot has a 1m30s delay. In boot.log there are hundreds of timed entries throughout this delay, i.e.: A start job is running for dev-sda2.device (1min 29s / 1min 30s) ending with Timed out waiting for device dev-sda2.device. Dependency failed for Resume from hibernation using device /dev/sda2. In /boot/grub2/grub.cfg I see each boot entry is appended with: resume=/dev/sda2 splash=silent quiet showopts resume=/dev/sda2 splash=silent quiet showopts resume=/dev/sda2 splash=silent quiet showopts So the string three times in succession. How can I fix this? I just want to be sure there's no broader issue with putting swap on an nvme drive before I do a fresh install of 15.1. gumb -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 21/08/2019 12.09, gumb wrote:
On Leap 42.3 (shortly due to be updated to 15.1), in preparation I decided to change the partitioning. In view of my doubling the RAM, I created a new swap partition, /dev/sda2 on an nvme drive (I've set the swappiness=1 as it'll likely never be used, it's really just for very rare and unlikely hibernation as I have plenty of free space on this drive).
If it is unlikely to be ever used, then you don't need to do anything. The system will not use it unless it needs it; and if it needs it, don't make things harder for it by altering swapiness.
After a reboot I then deleted the original swap partition on /dev/sdb2. I did all this in YaST Partitioner.
Go back and set a label on it.
Now each boot has a 1m30s delay. In boot.log there are hundreds of timed entries throughout this delay, i.e.: A start job is running for dev-sda2.device (1min 29s / 1min 30s) ending with Timed out waiting for device dev-sda2.device. Dependency failed for Resume from hibernation using device /dev/sda2.
In /boot/grub2/grub.cfg I see each boot entry is appended with: resume=/dev/sda2 splash=silent quiet showopts resume=/dev/sda2 splash=silent quiet showopts resume=/dev/sda2 splash=silent quiet showopts
So the string three times in succession.
How can I fix this? I just want to be sure there's no broader issue with putting swap on an nvme drive before I do a fresh install of 15.1.
Edit fstab, and make sure it refers to the current swap by label name. Then edit /etc/default/grub, so that you have something like this: GRUB_CMDLINE_LINUX_DEFAULT="showopts resume=/dev/disk/by-label/Swap splash=verbose" (mutandis mutandi) Then read the line at the start of the file that says #If you change this file and do what it says to do if you change that file, which you did. Now you can reboot. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On 21/08/2019 12:33, Carlos E. R. wrote:
On 21/08/2019 12.09, gumb wrote:
On Leap 42.3 (shortly due to be updated to 15.1), in preparation I decided to change the partitioning. In view of my doubling the RAM, I created a new swap partition, /dev/sda2 on an nvme drive (I've set the swappiness=1 as it'll likely never be used, it's really just for very rare and unlikely hibernation as I have plenty of free space on this drive).
If it is unlikely to be ever used, then you don't need to do anything. The system will not use it unless it needs it; and if it needs it, don't make things harder for it by altering swapiness.
All the advice I've read thus far suggests not using an SSD for swap, but if you must and you have plenty of RAM, set the swappiness to this minimal value. In this case, I'm doubling the RAM to 16GB with a matching pair in order to marginally boost graphics performance with one app which is also resource-intensive. But the system otherwise never needs this much RAM, so it will rarely touch swap. I want to preserve the lifetime of the rather cheap nvme drive by not writing to it save for exceptional circumstances.
After a reboot I then deleted the original swap partition on /dev/sdb2. I did all this in YaST Partitioner.
Go back and set a label on it.
Urgh! I've used exclusively UUID for partitions on all my machines for a few years now. Why the need to return to this archaic practice? (I assume you mean on /dev/sda2, not /dev/sdb2, the partition I've deleted.)
Now each boot has a 1m30s delay. In boot.log there are hundreds of timed entries throughout this delay, i.e.: A start job is running for dev-sda2.device (1min 29s / 1min 30s) ending with Timed out waiting for device dev-sda2.device. Dependency failed for Resume from hibernation using device /dev/sda2.
In /boot/grub2/grub.cfg I see each boot entry is appended with: resume=/dev/sda2 splash=silent quiet showopts resume=/dev/sda2 splash=silent quiet showopts resume=/dev/sda2 splash=silent quiet showopts
So the string three times in succession.
How can I fix this? I just want to be sure there's no broader issue with putting swap on an nvme drive before I do a fresh install of 15.1.
Edit fstab, and make sure it refers to the current swap by label name.
Then edit /etc/default/grub, so that you have something like this:
GRUB_CMDLINE_LINUX_DEFAULT="showopts resume=/dev/disk/by-label/Swap splash=verbose"
(mutandis mutandi)
Then read the line at the start of the file that says
#If you change this file
and do what it says to do if you change that file, which you did.
Now you can reboot.
All this could be a workaround, though it doesn't explain why the new swap poses a problem when mounted by UUID. I'm about to reformat / to install 15.1, keeping /home intact. I suspect that whatever has caused this anomaly will be cleared up automatically by the new install. I just want to be sure the issue isn't caused by some conflict with swap on the nvme drive, since I'd prefer not to have to fiddle again with the partitioning post-install. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 21/08/2019 13.26, gumb wrote:
On 21/08/2019 12:33, Carlos E. R. wrote:
On 21/08/2019 12.09, gumb wrote:
On Leap 42.3 (shortly due to be updated to 15.1), in preparation I decided to change the partitioning. In view of my doubling the RAM, I created a new swap partition, /dev/sda2 on an nvme drive (I've set the swappiness=1 as it'll likely never be used, it's really just for very rare and unlikely hibernation as I have plenty of free space on this drive).
If it is unlikely to be ever used, then you don't need to do anything. The system will not use it unless it needs it; and if it needs it, don't make things harder for it by altering swapiness.
All the advice I've read thus far suggests not using an SSD for swap, but if you must and you have plenty of RAM, set the swappiness to this minimal value.
I use swap heavily on SSD. If you have plenty of RAM, it will barely be used or not at all. But _if_ the machine does need swap some time, don't hinder it, making it even slower or crash. It is a non problem, no need to change swapines.
In this case, I'm doubling the RAM to 16GB with a matching pair in order to marginally boost graphics performance with one app which is also resource-intensive. But the system otherwise never needs this much RAM, so it will rarely touch swap. I want to preserve the lifetime of the rather cheap nvme drive by not writing to it save for exceptional circumstances.
After a reboot I then deleted the original swap partition on /dev/sdb2. I did all this in YaST Partitioner.
Go back and set a label on it.
Urgh! I've used exclusively UUID for partitions on all my machines for a few years now. Why the need to return to this archaic practice? (I assume you mean on /dev/sda2, not /dev/sdb2, the partition I've deleted.)
Well, if you prefer UUID, use it. But just do not sda or sdb names. Label is not archaic. It is as young as UUID, they appeared simultaneously on Linux. ...
GRUB_CMDLINE_LINUX_DEFAULT="showopts resume=/dev/disk/by-label/Swap splash=verbose"
(mutandis mutandi)
Then read the line at the start of the file that says
#If you change this file
and do what it says to do if you change that file, which you did.
Now you can reboot.
All this could be a workaround,
No workaround. This is the correct way to do it :-)
though it doesn't explain why the new swap poses a problem when mounted by UUID.
Because you are not mounting by UUID... I see in your post "resume=/dev/sda2". That's not an UUID. That's a traditional disk reference.
I'm about to reformat / to install 15.1, keeping /home intact. I suspect that whatever has caused this anomaly will be cleared up automatically by the new install.
Maybe, maybe not.
I just want to be sure the issue isn't caused by some conflict with swap on the nvme drive, since I'd prefer not to have to fiddle again with the partitioning post-install.
-- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On 21/08/2019 16:58, Carlos E. R. wrote:
No workaround. This is the correct way to do it :-)
though it doesn't explain why the new swap poses a problem when mounted by UUID.
Because you are not mounting by UUID... I see in your post "resume=/dev/sda2". That's not an UUID. That's a traditional disk reference.
Everything in fstab, including the swap partition, is mounted by UUID. The resume=/dev/sda2 reference is in grub.cfg and has been set when configuring the partition in YaST. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 22/08/2019 14:57, gumb wrote:
Everything in fstab, including the swap partition, is mounted by UUID. The resume=/dev/sda2 reference is in grub.cfg and has been set when configuring the partition in YaST.
Ah, I'm only just seeing the misconfiguration there, it wasn't evident to me before. The system is waiting at boot for /dev/sda2 and in my mind I'm thinking that's the second partition on the primary (nvme) disk, but of course that new swap partition is instead referred to as /dev/nvme0n1p2. So it's looking for something that isn't there, and not indicating that the new swap on nvme is itself an issue. I don't know why YaST Partitioner didn't correct this automatically when I used it to remove the old swap partition. Bug? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 22/08/2019 15.02, gumb wrote:
On 22/08/2019 14:57, gumb wrote:
Everything in fstab, including the swap partition, is mounted by UUID. The resume=/dev/sda2 reference is in grub.cfg and has been set when configuring the partition in YaST.
Ah, I'm only just seeing the misconfiguration there, it wasn't evident to me before. The system is waiting at boot for /dev/sda2 and in my mind I'm thinking that's the second partition on the primary (nvme) disk, but of course that new swap partition is instead referred to as /dev/nvme0n1p2. So it's looking for something that isn't there, and not indicating that the new swap on nvme is itself an issue. I don't know why YaST Partitioner didn't correct this automatically when I used it to remove the old swap partition. Bug?
Bug or whatever, just change all those references to /dev/sdXY in fstab or "/etc/default/grub" to UUID references. Note: do not touch grub.cfg. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
participants (2)
-
Carlos E. R.
-
gumb