← Back to team overview

torios-dev team mailing list archive

Re: SWAP sharing

 

Den 2016-05-06 kl. 14:39, skrev Israel:
On 05/06/2016 07:32 AM, Nio Wiklund wrote:
Den 2016-05-05 kl. 22:27, skrev Israel:
Hi all,
I have done some testing with the most recent ISO.
There is an issue.
If I resize a partition and add a new partition, then try to reuse the
original swap, the original OS does not find the swap.
This has the long boot bug.

The solution?
perhaps the only real solution is to manually generate fstab files for
EVERY install that exists, assuming that they are on the same device (if
it is repartitioned)  I do not think this issue existed previous to
systemd inclusion, but systemd does something to verify the UUID of the
drives, and this causes issues in our instance.

So unfortunately there is more testing to be done....


Hi Israel,

[Replying again]

I have not yet done the testing, but I have tried to understand.

Are you saying that ToriOS debian does not accept to 're-use' the swap
partition's UUID, hence making it hard to share a swap partition with
a previously installed system?

I am not sure [yet] that it should be blamed on systemd, because
Xenial and Yakkety are not affected and they boot via systemd. Maybe
it is a feature of Debian, that it creates/refreshes the swap
partition. In that case you can try to store the UUID in a shell
variable uidsav and reuse it with

mkswap -U $uidsav $swaptarget

instead of having to rewrite all the fstab files.

(Maybe this is what you have already done ?!)

Best regards
Nio
No, it may be that when I resized the device it changed things.
my swap was on the same drive and I added a partition between the swap
and original device. so it was
/dev/sda1 torios (19 gig)
/dev/sda2 [SWAP]

and became
/dev/sda1 torios (4 Gig)
/dev/sda3 new obi root (15 gig)
/dev/sda5 [SWAP] shared swap

Does this make sense?


It makes sense, but it is not what I was doing, and I was affected by the problem. I have checked, and it is correct, that the UUID of the swap partition was changed (I think by ToriOS debian OBI-installer at the advanced level).

I still think

mkswap -U $uidsav $swaptarget

after the installer has tampered with it might be a solution.

Best regards
Nio


Follow ups

References