4 ms·
swap files make setting up hibernation a bit more complicated - in most cases the file has to be contiguous, e.g. you have to defragment it once after allocatin
by cfstras 8d ago
swap files make setting up hibernation a bit more complicated - in most cases the file has to be contiguous, e.g. you have to defragment it once after allocating.
Then, you need to tell the bootloader the byte offset of the file on the partition.
- jenders 8d agoIf you want to share step-by-step, I’ll update the gist.
- cfstras 7d agoThat’s my point, it’s different for each distro & partitioning setup, so I wouldn’t know what to share here. Having a swap partition makes it as easy as adding `resume=/dev/sdXYZ` or `resume=UUID=…` to your kernel parameters.
- simoncion 7d agoAnd using LVM for "partitioning" bypasses a lot of this silliness. Do 'lvcreate --contiguous' and you should be good to go if you're using most any non-toy initrd. Given that every r/w filesystem you're going to use as your '/' on a Linux desktop or server supports online growing (and most support offline shrinking), it's nuts to me to hear people worrying about getting partition sizes correct. With LVM, if you get it wrong you just resize the LV and the filesystem it contains. Hell, LVM makes swapping out disks a really easy online operation. [0] If you don't have nice hot-swap drive caddies, you might have to power off the box once to add in the new disks and again to remove the old ones, but all the data transfer can happen while the system is in use. [0] Assuming the new and old disks have the same logical sector size, which they usually do.
- MBCook 7d agoDoes contiguousness matter these days? Especially since all disk locations are lies anyway as SSD firmware has its own layer of indirection too?