Is there a risk of data corruption if suspended laptop runs out of battery?
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I often tend to just put my laptop on suspend
using xfce4-power-manager
, and although usually the battery is sufficiently charged up until the next time (when I plug in the charger), sometimes I forget and after a week or so the battery empties out and the laptop shuts itself down (forcefully).
In these cases, is there any risk of data corruption? I would assume that no, since the hard-drive has already synced and was turned off upon suspend
.
Additionally, should one prefer suspend
, hibernate
or some hybrid variant?
hard-disk suspend corruption battery
add a comment |
I often tend to just put my laptop on suspend
using xfce4-power-manager
, and although usually the battery is sufficiently charged up until the next time (when I plug in the charger), sometimes I forget and after a week or so the battery empties out and the laptop shuts itself down (forcefully).
In these cases, is there any risk of data corruption? I would assume that no, since the hard-drive has already synced and was turned off upon suspend
.
Additionally, should one prefer suspend
, hibernate
or some hybrid variant?
hard-disk suspend corruption battery
add a comment |
I often tend to just put my laptop on suspend
using xfce4-power-manager
, and although usually the battery is sufficiently charged up until the next time (when I plug in the charger), sometimes I forget and after a week or so the battery empties out and the laptop shuts itself down (forcefully).
In these cases, is there any risk of data corruption? I would assume that no, since the hard-drive has already synced and was turned off upon suspend
.
Additionally, should one prefer suspend
, hibernate
or some hybrid variant?
hard-disk suspend corruption battery
I often tend to just put my laptop on suspend
using xfce4-power-manager
, and although usually the battery is sufficiently charged up until the next time (when I plug in the charger), sometimes I forget and after a week or so the battery empties out and the laptop shuts itself down (forcefully).
In these cases, is there any risk of data corruption? I would assume that no, since the hard-drive has already synced and was turned off upon suspend
.
Additionally, should one prefer suspend
, hibernate
or some hybrid variant?
hard-disk suspend corruption battery
hard-disk suspend corruption battery
edited Mar 18 at 3:21
Rui F Ribeiro
42.1k1484142
42.1k1484142
asked Feb 15 '14 at 23:18
landronilandroni
3,38582339
3,38582339
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Suspending implies that the data you were working with is in the memory. This state will be lost if you run out of power. If you were writing a forum post, for example, it will be lost, but nothing more serious would happen. Think that it's less serious than unplugging and removing the battery, since the computer can sync before and even delay the suspension (when running an update or upgrade).
For obtaining both the benefits of suspend (fast re-start) and hibernate (safely saved to disk, without power consumption) try pm-suspend-hybrid
instead. If you run out of power you can re-start from the image saved to disk, if you don't run out of power you can quickly re-start from a suspended to memory state.
1
"but nothing more serious would happen." Just to be clear, this means that no corruption of hard-drive sectors can occur? In other words, you would lose anything that you didn't already save to disk (as expected), but anything that resides on the disk is safe and sound. Correct?
– landroni
Feb 16 '14 at 13:44
1
@landroni: right.
– Quora Feans
Feb 16 '14 at 17:05
add a comment |
There are two things to think about here, as hinted at by other answers.
The first is File System Corruption. This relates to the meta-data structures that makes the file system usable, and is understood and controlled by the Kernel.
The second is the content of the files. When the content of a file is corrupted, the kernel will not know (or care). Complex systems like databases implement their own meta-data facilities to take care of this problem, but for most file types on a typical desktop system there is no such thing.
If you are editing a file, a "change" to the file might consist of writes to several locations. When all of these writes have been completed, the file is in a consistent state, but when only some of these writes are completed the file contents may be corrupted (inconsistent)
The operating system will (should) "group" related writes into a transaction. So, for example when a file grows, the data must be written to the blocks belonging to that file, and the file system structures be updated to allocate those new blocks to the file, and possible changes to the directory entry (eg last modification time) be updated, all as a single group. Once all of this is Sync'ed (flushed) to disk, the file system will be consistent again, but the file contents may not be until all the relevant writes have been submitted by the application and flushed to disk by the operating system.
If the application is in the middle of a complicated change and gets blocked before all the transactions have been issued, for example you press SAVE and immediately close your laptop lid, the entire group of changes may not all make it to the kernel's write queues.
Generally whatever is in the write queues will be flushed to disk. The file systems should, generally, be consistent. Due to File system journals though this might mean that some of those changes are temporarily in a log, albeit safely on disk.
File contents however is another story.
add a comment |
Data corruption? Most likely no. Data loss? possibly.
The data that would be at risk when the system loses power during a suspend would be the only things at risk. This data is the "snapshot" of the system's memory that's been temporarily written to disk when you put the system into "suspend" mode. No harm should ever come to your HDD or the data that's present on the HDD.
The data on your system should be safe so long as you've selected that the system "poweroff" if the battery gets into a "critically low" state, as seen in this dialog, under your system's power settings.
versus this:
2
Hmm, how is this possible? Perhaps you usehibernate
? Because when you usesuspend
, if the laptop runs out of juice, it shuts down and then you basically do a cold boot. (At least here aftersuspend
and a loss of power it never resumes from where it left.)
– landroni
Feb 16 '14 at 9:53
@landroni - see updates.
– slm♦
Feb 16 '14 at 13:07
@landroni - does this explain it better?
– slm♦
Feb 16 '14 at 13:52
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f115356%2fis-there-a-risk-of-data-corruption-if-suspended-laptop-runs-out-of-battery%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Suspending implies that the data you were working with is in the memory. This state will be lost if you run out of power. If you were writing a forum post, for example, it will be lost, but nothing more serious would happen. Think that it's less serious than unplugging and removing the battery, since the computer can sync before and even delay the suspension (when running an update or upgrade).
For obtaining both the benefits of suspend (fast re-start) and hibernate (safely saved to disk, without power consumption) try pm-suspend-hybrid
instead. If you run out of power you can re-start from the image saved to disk, if you don't run out of power you can quickly re-start from a suspended to memory state.
1
"but nothing more serious would happen." Just to be clear, this means that no corruption of hard-drive sectors can occur? In other words, you would lose anything that you didn't already save to disk (as expected), but anything that resides on the disk is safe and sound. Correct?
– landroni
Feb 16 '14 at 13:44
1
@landroni: right.
– Quora Feans
Feb 16 '14 at 17:05
add a comment |
Suspending implies that the data you were working with is in the memory. This state will be lost if you run out of power. If you were writing a forum post, for example, it will be lost, but nothing more serious would happen. Think that it's less serious than unplugging and removing the battery, since the computer can sync before and even delay the suspension (when running an update or upgrade).
For obtaining both the benefits of suspend (fast re-start) and hibernate (safely saved to disk, without power consumption) try pm-suspend-hybrid
instead. If you run out of power you can re-start from the image saved to disk, if you don't run out of power you can quickly re-start from a suspended to memory state.
1
"but nothing more serious would happen." Just to be clear, this means that no corruption of hard-drive sectors can occur? In other words, you would lose anything that you didn't already save to disk (as expected), but anything that resides on the disk is safe and sound. Correct?
– landroni
Feb 16 '14 at 13:44
1
@landroni: right.
– Quora Feans
Feb 16 '14 at 17:05
add a comment |
Suspending implies that the data you were working with is in the memory. This state will be lost if you run out of power. If you were writing a forum post, for example, it will be lost, but nothing more serious would happen. Think that it's less serious than unplugging and removing the battery, since the computer can sync before and even delay the suspension (when running an update or upgrade).
For obtaining both the benefits of suspend (fast re-start) and hibernate (safely saved to disk, without power consumption) try pm-suspend-hybrid
instead. If you run out of power you can re-start from the image saved to disk, if you don't run out of power you can quickly re-start from a suspended to memory state.
Suspending implies that the data you were working with is in the memory. This state will be lost if you run out of power. If you were writing a forum post, for example, it will be lost, but nothing more serious would happen. Think that it's less serious than unplugging and removing the battery, since the computer can sync before and even delay the suspension (when running an update or upgrade).
For obtaining both the benefits of suspend (fast re-start) and hibernate (safely saved to disk, without power consumption) try pm-suspend-hybrid
instead. If you run out of power you can re-start from the image saved to disk, if you don't run out of power you can quickly re-start from a suspended to memory state.
answered Feb 16 '14 at 13:29
Quora FeansQuora Feans
1,53841936
1,53841936
1
"but nothing more serious would happen." Just to be clear, this means that no corruption of hard-drive sectors can occur? In other words, you would lose anything that you didn't already save to disk (as expected), but anything that resides on the disk is safe and sound. Correct?
– landroni
Feb 16 '14 at 13:44
1
@landroni: right.
– Quora Feans
Feb 16 '14 at 17:05
add a comment |
1
"but nothing more serious would happen." Just to be clear, this means that no corruption of hard-drive sectors can occur? In other words, you would lose anything that you didn't already save to disk (as expected), but anything that resides on the disk is safe and sound. Correct?
– landroni
Feb 16 '14 at 13:44
1
@landroni: right.
– Quora Feans
Feb 16 '14 at 17:05
1
1
"but nothing more serious would happen." Just to be clear, this means that no corruption of hard-drive sectors can occur? In other words, you would lose anything that you didn't already save to disk (as expected), but anything that resides on the disk is safe and sound. Correct?
– landroni
Feb 16 '14 at 13:44
"but nothing more serious would happen." Just to be clear, this means that no corruption of hard-drive sectors can occur? In other words, you would lose anything that you didn't already save to disk (as expected), but anything that resides on the disk is safe and sound. Correct?
– landroni
Feb 16 '14 at 13:44
1
1
@landroni: right.
– Quora Feans
Feb 16 '14 at 17:05
@landroni: right.
– Quora Feans
Feb 16 '14 at 17:05
add a comment |
There are two things to think about here, as hinted at by other answers.
The first is File System Corruption. This relates to the meta-data structures that makes the file system usable, and is understood and controlled by the Kernel.
The second is the content of the files. When the content of a file is corrupted, the kernel will not know (or care). Complex systems like databases implement their own meta-data facilities to take care of this problem, but for most file types on a typical desktop system there is no such thing.
If you are editing a file, a "change" to the file might consist of writes to several locations. When all of these writes have been completed, the file is in a consistent state, but when only some of these writes are completed the file contents may be corrupted (inconsistent)
The operating system will (should) "group" related writes into a transaction. So, for example when a file grows, the data must be written to the blocks belonging to that file, and the file system structures be updated to allocate those new blocks to the file, and possible changes to the directory entry (eg last modification time) be updated, all as a single group. Once all of this is Sync'ed (flushed) to disk, the file system will be consistent again, but the file contents may not be until all the relevant writes have been submitted by the application and flushed to disk by the operating system.
If the application is in the middle of a complicated change and gets blocked before all the transactions have been issued, for example you press SAVE and immediately close your laptop lid, the entire group of changes may not all make it to the kernel's write queues.
Generally whatever is in the write queues will be flushed to disk. The file systems should, generally, be consistent. Due to File system journals though this might mean that some of those changes are temporarily in a log, albeit safely on disk.
File contents however is another story.
add a comment |
There are two things to think about here, as hinted at by other answers.
The first is File System Corruption. This relates to the meta-data structures that makes the file system usable, and is understood and controlled by the Kernel.
The second is the content of the files. When the content of a file is corrupted, the kernel will not know (or care). Complex systems like databases implement their own meta-data facilities to take care of this problem, but for most file types on a typical desktop system there is no such thing.
If you are editing a file, a "change" to the file might consist of writes to several locations. When all of these writes have been completed, the file is in a consistent state, but when only some of these writes are completed the file contents may be corrupted (inconsistent)
The operating system will (should) "group" related writes into a transaction. So, for example when a file grows, the data must be written to the blocks belonging to that file, and the file system structures be updated to allocate those new blocks to the file, and possible changes to the directory entry (eg last modification time) be updated, all as a single group. Once all of this is Sync'ed (flushed) to disk, the file system will be consistent again, but the file contents may not be until all the relevant writes have been submitted by the application and flushed to disk by the operating system.
If the application is in the middle of a complicated change and gets blocked before all the transactions have been issued, for example you press SAVE and immediately close your laptop lid, the entire group of changes may not all make it to the kernel's write queues.
Generally whatever is in the write queues will be flushed to disk. The file systems should, generally, be consistent. Due to File system journals though this might mean that some of those changes are temporarily in a log, albeit safely on disk.
File contents however is another story.
add a comment |
There are two things to think about here, as hinted at by other answers.
The first is File System Corruption. This relates to the meta-data structures that makes the file system usable, and is understood and controlled by the Kernel.
The second is the content of the files. When the content of a file is corrupted, the kernel will not know (or care). Complex systems like databases implement their own meta-data facilities to take care of this problem, but for most file types on a typical desktop system there is no such thing.
If you are editing a file, a "change" to the file might consist of writes to several locations. When all of these writes have been completed, the file is in a consistent state, but when only some of these writes are completed the file contents may be corrupted (inconsistent)
The operating system will (should) "group" related writes into a transaction. So, for example when a file grows, the data must be written to the blocks belonging to that file, and the file system structures be updated to allocate those new blocks to the file, and possible changes to the directory entry (eg last modification time) be updated, all as a single group. Once all of this is Sync'ed (flushed) to disk, the file system will be consistent again, but the file contents may not be until all the relevant writes have been submitted by the application and flushed to disk by the operating system.
If the application is in the middle of a complicated change and gets blocked before all the transactions have been issued, for example you press SAVE and immediately close your laptop lid, the entire group of changes may not all make it to the kernel's write queues.
Generally whatever is in the write queues will be flushed to disk. The file systems should, generally, be consistent. Due to File system journals though this might mean that some of those changes are temporarily in a log, albeit safely on disk.
File contents however is another story.
There are two things to think about here, as hinted at by other answers.
The first is File System Corruption. This relates to the meta-data structures that makes the file system usable, and is understood and controlled by the Kernel.
The second is the content of the files. When the content of a file is corrupted, the kernel will not know (or care). Complex systems like databases implement their own meta-data facilities to take care of this problem, but for most file types on a typical desktop system there is no such thing.
If you are editing a file, a "change" to the file might consist of writes to several locations. When all of these writes have been completed, the file is in a consistent state, but when only some of these writes are completed the file contents may be corrupted (inconsistent)
The operating system will (should) "group" related writes into a transaction. So, for example when a file grows, the data must be written to the blocks belonging to that file, and the file system structures be updated to allocate those new blocks to the file, and possible changes to the directory entry (eg last modification time) be updated, all as a single group. Once all of this is Sync'ed (flushed) to disk, the file system will be consistent again, but the file contents may not be until all the relevant writes have been submitted by the application and flushed to disk by the operating system.
If the application is in the middle of a complicated change and gets blocked before all the transactions have been issued, for example you press SAVE and immediately close your laptop lid, the entire group of changes may not all make it to the kernel's write queues.
Generally whatever is in the write queues will be flushed to disk. The file systems should, generally, be consistent. Due to File system journals though this might mean that some of those changes are temporarily in a log, albeit safely on disk.
File contents however is another story.
answered Feb 20 '14 at 11:19
JohanJohan
2,81721829
2,81721829
add a comment |
add a comment |
Data corruption? Most likely no. Data loss? possibly.
The data that would be at risk when the system loses power during a suspend would be the only things at risk. This data is the "snapshot" of the system's memory that's been temporarily written to disk when you put the system into "suspend" mode. No harm should ever come to your HDD or the data that's present on the HDD.
The data on your system should be safe so long as you've selected that the system "poweroff" if the battery gets into a "critically low" state, as seen in this dialog, under your system's power settings.
versus this:
2
Hmm, how is this possible? Perhaps you usehibernate
? Because when you usesuspend
, if the laptop runs out of juice, it shuts down and then you basically do a cold boot. (At least here aftersuspend
and a loss of power it never resumes from where it left.)
– landroni
Feb 16 '14 at 9:53
@landroni - see updates.
– slm♦
Feb 16 '14 at 13:07
@landroni - does this explain it better?
– slm♦
Feb 16 '14 at 13:52
add a comment |
Data corruption? Most likely no. Data loss? possibly.
The data that would be at risk when the system loses power during a suspend would be the only things at risk. This data is the "snapshot" of the system's memory that's been temporarily written to disk when you put the system into "suspend" mode. No harm should ever come to your HDD or the data that's present on the HDD.
The data on your system should be safe so long as you've selected that the system "poweroff" if the battery gets into a "critically low" state, as seen in this dialog, under your system's power settings.
versus this:
2
Hmm, how is this possible? Perhaps you usehibernate
? Because when you usesuspend
, if the laptop runs out of juice, it shuts down and then you basically do a cold boot. (At least here aftersuspend
and a loss of power it never resumes from where it left.)
– landroni
Feb 16 '14 at 9:53
@landroni - see updates.
– slm♦
Feb 16 '14 at 13:07
@landroni - does this explain it better?
– slm♦
Feb 16 '14 at 13:52
add a comment |
Data corruption? Most likely no. Data loss? possibly.
The data that would be at risk when the system loses power during a suspend would be the only things at risk. This data is the "snapshot" of the system's memory that's been temporarily written to disk when you put the system into "suspend" mode. No harm should ever come to your HDD or the data that's present on the HDD.
The data on your system should be safe so long as you've selected that the system "poweroff" if the battery gets into a "critically low" state, as seen in this dialog, under your system's power settings.
versus this:
Data corruption? Most likely no. Data loss? possibly.
The data that would be at risk when the system loses power during a suspend would be the only things at risk. This data is the "snapshot" of the system's memory that's been temporarily written to disk when you put the system into "suspend" mode. No harm should ever come to your HDD or the data that's present on the HDD.
The data on your system should be safe so long as you've selected that the system "poweroff" if the battery gets into a "critically low" state, as seen in this dialog, under your system's power settings.
versus this:
edited Feb 16 '14 at 13:52
answered Feb 16 '14 at 1:33
slm♦slm
256k71544690
256k71544690
2
Hmm, how is this possible? Perhaps you usehibernate
? Because when you usesuspend
, if the laptop runs out of juice, it shuts down and then you basically do a cold boot. (At least here aftersuspend
and a loss of power it never resumes from where it left.)
– landroni
Feb 16 '14 at 9:53
@landroni - see updates.
– slm♦
Feb 16 '14 at 13:07
@landroni - does this explain it better?
– slm♦
Feb 16 '14 at 13:52
add a comment |
2
Hmm, how is this possible? Perhaps you usehibernate
? Because when you usesuspend
, if the laptop runs out of juice, it shuts down and then you basically do a cold boot. (At least here aftersuspend
and a loss of power it never resumes from where it left.)
– landroni
Feb 16 '14 at 9:53
@landroni - see updates.
– slm♦
Feb 16 '14 at 13:07
@landroni - does this explain it better?
– slm♦
Feb 16 '14 at 13:52
2
2
Hmm, how is this possible? Perhaps you use
hibernate
? Because when you use suspend
, if the laptop runs out of juice, it shuts down and then you basically do a cold boot. (At least here after suspend
and a loss of power it never resumes from where it left.)– landroni
Feb 16 '14 at 9:53
Hmm, how is this possible? Perhaps you use
hibernate
? Because when you use suspend
, if the laptop runs out of juice, it shuts down and then you basically do a cold boot. (At least here after suspend
and a loss of power it never resumes from where it left.)– landroni
Feb 16 '14 at 9:53
@landroni - see updates.
– slm♦
Feb 16 '14 at 13:07
@landroni - see updates.
– slm♦
Feb 16 '14 at 13:07
@landroni - does this explain it better?
– slm♦
Feb 16 '14 at 13:52
@landroni - does this explain it better?
– slm♦
Feb 16 '14 at 13:52
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f115356%2fis-there-a-risk-of-data-corruption-if-suspended-laptop-runs-out-of-battery%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown