File system inodes after hibernation on Linux

311 Views Asked by At

I am interested to know how the file system data structures are handled when suspending to disk.

I am wondering if it is possible to hibernate and then switch a disk (physically) and then resume. My guess is that all of the inodes in memory for hibernation would be invalid. Is there any way to refresh the inode data or any place in the Kernel source I could look that might provide an example?

It is not possible for me to umount the disk, I am curious what options are available to me.

2

There are 2 best solutions below

0
On

I think one thing you can do is this:

  1. boot on disk 1, hibernate.

  2. Change to disk 2, and press the power button. The computer will boot again (not wake up).

  3. hibernate on disk 2.

  4. Switch to disk 1, and it has a better chance to wake up successfully.

0
On

When you remove it when should down, the hibernate image does not fit any longer to the configuration, as the swap does not happen when the system either can notice it or it doesnt care (because its really off). Maybe you are lucky, but I wont risk it. Many people dont know it, but SATA (and Linux) are capable of hot swap - maybe its an option for you to remove the old disk and connect a new one after you came back from hibernate.