How resilient is Ubuntu to repeated “power-off” shutdowns?
My company is considering the use of Ubuntu as an OS for use on a hardware device.
It would be installed on compact flash drive - apparently this is not standard flash drive but a specific type of memory that is supposed to "cope" with immediate power shutdown (I am not sure how this is achieved but they are supposedly a "high end" card).
The units that would be run using Ubuntu are the type of units that will not be gracefully shutdown - the power cable would be removed and that is that.
Can anybody give me some advice on the potential problems that can occur? Is Ubuntu a good system that can deal with this kind of power outage and reboot successfully on next startup?
I realise that nothing is unbreakable, but is it a commonly used OS for an embedded setup? Is it asking for trouble to use Ubuntu in this kind of environment?
hardware shutdown restart
add a comment |
My company is considering the use of Ubuntu as an OS for use on a hardware device.
It would be installed on compact flash drive - apparently this is not standard flash drive but a specific type of memory that is supposed to "cope" with immediate power shutdown (I am not sure how this is achieved but they are supposedly a "high end" card).
The units that would be run using Ubuntu are the type of units that will not be gracefully shutdown - the power cable would be removed and that is that.
Can anybody give me some advice on the potential problems that can occur? Is Ubuntu a good system that can deal with this kind of power outage and reboot successfully on next startup?
I realise that nothing is unbreakable, but is it a commonly used OS for an embedded setup? Is it asking for trouble to use Ubuntu in this kind of environment?
hardware shutdown restart
1
Is there any way you could incorporate a UPS or battery backup into your devices? Even a relatively small one would give Linux enough time to shut things down gracefully. Ideally, you'd want to tell your applications first (as soon as the UPS kicks in) so they could shut down before Linux forces them to do so in very little time.
– Joe
Jul 18 '12 at 21:55
I wonder, would it be possible to use a file system that has a copy-on-write feature, such as ZFS? Then theoretically it would be impossible to get corruption since on next boot the restoration would happen until the last known-good state of the FS, avoiding any possible partially written data afterwards.
– Wizek
Jan 29 '17 at 11:43
add a comment |
My company is considering the use of Ubuntu as an OS for use on a hardware device.
It would be installed on compact flash drive - apparently this is not standard flash drive but a specific type of memory that is supposed to "cope" with immediate power shutdown (I am not sure how this is achieved but they are supposedly a "high end" card).
The units that would be run using Ubuntu are the type of units that will not be gracefully shutdown - the power cable would be removed and that is that.
Can anybody give me some advice on the potential problems that can occur? Is Ubuntu a good system that can deal with this kind of power outage and reboot successfully on next startup?
I realise that nothing is unbreakable, but is it a commonly used OS for an embedded setup? Is it asking for trouble to use Ubuntu in this kind of environment?
hardware shutdown restart
My company is considering the use of Ubuntu as an OS for use on a hardware device.
It would be installed on compact flash drive - apparently this is not standard flash drive but a specific type of memory that is supposed to "cope" with immediate power shutdown (I am not sure how this is achieved but they are supposedly a "high end" card).
The units that would be run using Ubuntu are the type of units that will not be gracefully shutdown - the power cable would be removed and that is that.
Can anybody give me some advice on the potential problems that can occur? Is Ubuntu a good system that can deal with this kind of power outage and reboot successfully on next startup?
I realise that nothing is unbreakable, but is it a commonly used OS for an embedded setup? Is it asking for trouble to use Ubuntu in this kind of environment?
hardware shutdown restart
hardware shutdown restart
edited Jul 17 '12 at 16:39
ish
115k29265293
115k29265293
asked Jul 17 '12 at 16:05
mathematician1975mathematician1975
93172245
93172245
1
Is there any way you could incorporate a UPS or battery backup into your devices? Even a relatively small one would give Linux enough time to shut things down gracefully. Ideally, you'd want to tell your applications first (as soon as the UPS kicks in) so they could shut down before Linux forces them to do so in very little time.
– Joe
Jul 18 '12 at 21:55
I wonder, would it be possible to use a file system that has a copy-on-write feature, such as ZFS? Then theoretically it would be impossible to get corruption since on next boot the restoration would happen until the last known-good state of the FS, avoiding any possible partially written data afterwards.
– Wizek
Jan 29 '17 at 11:43
add a comment |
1
Is there any way you could incorporate a UPS or battery backup into your devices? Even a relatively small one would give Linux enough time to shut things down gracefully. Ideally, you'd want to tell your applications first (as soon as the UPS kicks in) so they could shut down before Linux forces them to do so in very little time.
– Joe
Jul 18 '12 at 21:55
I wonder, would it be possible to use a file system that has a copy-on-write feature, such as ZFS? Then theoretically it would be impossible to get corruption since on next boot the restoration would happen until the last known-good state of the FS, avoiding any possible partially written data afterwards.
– Wizek
Jan 29 '17 at 11:43
1
1
Is there any way you could incorporate a UPS or battery backup into your devices? Even a relatively small one would give Linux enough time to shut things down gracefully. Ideally, you'd want to tell your applications first (as soon as the UPS kicks in) so they could shut down before Linux forces them to do so in very little time.
– Joe
Jul 18 '12 at 21:55
Is there any way you could incorporate a UPS or battery backup into your devices? Even a relatively small one would give Linux enough time to shut things down gracefully. Ideally, you'd want to tell your applications first (as soon as the UPS kicks in) so they could shut down before Linux forces them to do so in very little time.
– Joe
Jul 18 '12 at 21:55
I wonder, would it be possible to use a file system that has a copy-on-write feature, such as ZFS? Then theoretically it would be impossible to get corruption since on next boot the restoration would happen until the last known-good state of the FS, avoiding any possible partially written data afterwards.
– Wizek
Jan 29 '17 at 11:43
I wonder, would it be possible to use a file system that has a copy-on-write feature, such as ZFS? Then theoretically it would be impossible to get corruption since on next boot the restoration would happen until the last known-good state of the FS, avoiding any possible partially written data afterwards.
– Wizek
Jan 29 '17 at 11:43
add a comment |
4 Answers
4
active
oldest
votes
Note: this answer is from the perspective of a production environment where data loss or downtime can lead to loss of money, customers, industrial equipment malfunctioning, etc. If you are just tinkering with a Raspberry Pi at home, I'd say there's no problem... :)
I would not recommend Ubuntu in its default configuration, and the (default) ext4 filesystem by design, for an embedded environment where there would be repetitive "ungraceful" shutdowns like you suggest.
If I'm correct, you're using Ubuntu 8.04, which supports ext3 at best. While both ext3/ext4 use journaling as a way to maintain file (write) integrity and to aid in recovery, these should not be relied on when "pull the power cable" is the rule rather than the exception.
- The ideal option, assuming that your system will not need dynamic reconfiguration once set up, is to mount its root filesystem read-only and to entirely use a temporary in-memory partition when operational (like the LiveCD does). In this case, the system would return to its "initial" configuration whenever booted up.
- To store (a limited amount of) user data in a non-volatile way, you could create a secondary partition, perhaps using a filesystem optimized for flash media such as JFFS2 depending on the internal structure of the CF card. To reduce the chances of data corruption by pulling the plug, you could disable hardware write caching for the device, and mount it in synchronous (sync) mode, disabling write caching by the kernel. These options may severely affect throughput and performance, even on a "high-end" CF card, so you would have to take the intended use into consideration too.
4
I have to call FUD. The ext3/4 journal most certainly can be relied on to keep the filesystem in working order when pulling the plug. It does nothing however, for user data, so applications writing files at the time of the crash may corrupt their data unless they are careful. Also enabling sync on flash media will not just slow things down drastically, but will lead to the flash wearing out sooner. Also JFFS and YAFFS are for use on direct NOR flash built into embedded systems; ext4 works better on consumer type devices that do internal wear leveling.
– psusi
Jul 17 '12 at 17:41
1
As far as I am aware these cards are really good - but currently DOS is used. The devices need to record instrumentation data at regular intervals. As this data is business critical it sounds like I better avoid using ubuntu. I just cant believe that DOS seems the more reliable approach. Anyway thanks very much for this excellent thourough answer!! The cards we use have internal wear leveling as far as I know.
– mathematician1975
Jul 17 '12 at 19:38
1
I'm not sure what you were getting at viz. wear-leveling and flush. My point was that sync leads to more writes, which will wear out flash sooner. Also when using the ext3/4 journal, afsck
is NOT performed after power fail; the kernel uses the journal to make fast repairs when the fs is mounted. Avoiding a longfsck
after a crash is the whole reason journaling was added.
– psusi
Jul 18 '12 at 17:44
2
@mathematician1975: if you want to use Linux for these purposes, you need a real-time/embedded distro, maybe something like ucLinux, not a full-blown desktop/server distro like Ubuntu... :)
– ish
Jul 19 '12 at 8:19
2
@mathematician1975 - if this is "business critical data", then surely you want to put in a UPS? No operating system on Earth can guarantee corruption-free data when you pull the plug at any time. As already mentioned, making everything read-only apart from the data would help, and a light Linux distro can shut down safely and rapidly on a signal from a UPS.
– Paddy Landau
Jul 24 '12 at 9:53
|
show 7 more comments
The Operating System will be fine as long as it is setup for read-only use. LiveCD's have a setup like that, so that you can power them off at anytime, and the OS will not suffer harm.
On a read-write drive, ext4 filesystems are very resilient. But no matter the filesystem, any drive that is writable will be subject to corrupt files.
add a comment |
You are in emergency mode. After logging in, type
journalctl -xb
to view the system logs, systemctl reboot
to reboot and systemctl default
or exit
to boot into default mode.
Press Enter for maintenance (or press CTRL-D to continue):
I've seen that message everytime after power failure, any Windows OS is far more resilient to power failure, than Linux as default configuration.
I'n my city the power grid shutdown twice a month in summer.
add a comment |
I have been using Ubuntu for about 18 months, and I've experimented with all sorts of programs and downloads. My opinion on Ubuntu is that it is far and away the the most stable operateing system available.
Programs and downloads that would have demolished windows OS's are just brushed aside by Ubuntu and Kubuntu, Ubuntu is really easy to use, has everything you could ever need, office and work applications are excellent, and it never gets a virus or trojens like Windows.
Kubuntu seems to have a few more toys, it's a bit harder to get to grips with but just as robust as ubuntu. The only downside with either is that you can't play 3d games or watch skygo like you can with Windows, but apart from that can't see any reason to use anything else.
This doesn't really address this question, though, which is asking specifically about how well an Ubuntu system hold up across multiple sudden power loss events.
– Eliah Kagan
Aug 1 '12 at 6:46
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2faskubuntu.com%2fquestions%2f164726%2fhow-resilient-is-ubuntu-to-repeated-power-off-shutdowns%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Note: this answer is from the perspective of a production environment where data loss or downtime can lead to loss of money, customers, industrial equipment malfunctioning, etc. If you are just tinkering with a Raspberry Pi at home, I'd say there's no problem... :)
I would not recommend Ubuntu in its default configuration, and the (default) ext4 filesystem by design, for an embedded environment where there would be repetitive "ungraceful" shutdowns like you suggest.
If I'm correct, you're using Ubuntu 8.04, which supports ext3 at best. While both ext3/ext4 use journaling as a way to maintain file (write) integrity and to aid in recovery, these should not be relied on when "pull the power cable" is the rule rather than the exception.
- The ideal option, assuming that your system will not need dynamic reconfiguration once set up, is to mount its root filesystem read-only and to entirely use a temporary in-memory partition when operational (like the LiveCD does). In this case, the system would return to its "initial" configuration whenever booted up.
- To store (a limited amount of) user data in a non-volatile way, you could create a secondary partition, perhaps using a filesystem optimized for flash media such as JFFS2 depending on the internal structure of the CF card. To reduce the chances of data corruption by pulling the plug, you could disable hardware write caching for the device, and mount it in synchronous (sync) mode, disabling write caching by the kernel. These options may severely affect throughput and performance, even on a "high-end" CF card, so you would have to take the intended use into consideration too.
4
I have to call FUD. The ext3/4 journal most certainly can be relied on to keep the filesystem in working order when pulling the plug. It does nothing however, for user data, so applications writing files at the time of the crash may corrupt their data unless they are careful. Also enabling sync on flash media will not just slow things down drastically, but will lead to the flash wearing out sooner. Also JFFS and YAFFS are for use on direct NOR flash built into embedded systems; ext4 works better on consumer type devices that do internal wear leveling.
– psusi
Jul 17 '12 at 17:41
1
As far as I am aware these cards are really good - but currently DOS is used. The devices need to record instrumentation data at regular intervals. As this data is business critical it sounds like I better avoid using ubuntu. I just cant believe that DOS seems the more reliable approach. Anyway thanks very much for this excellent thourough answer!! The cards we use have internal wear leveling as far as I know.
– mathematician1975
Jul 17 '12 at 19:38
1
I'm not sure what you were getting at viz. wear-leveling and flush. My point was that sync leads to more writes, which will wear out flash sooner. Also when using the ext3/4 journal, afsck
is NOT performed after power fail; the kernel uses the journal to make fast repairs when the fs is mounted. Avoiding a longfsck
after a crash is the whole reason journaling was added.
– psusi
Jul 18 '12 at 17:44
2
@mathematician1975: if you want to use Linux for these purposes, you need a real-time/embedded distro, maybe something like ucLinux, not a full-blown desktop/server distro like Ubuntu... :)
– ish
Jul 19 '12 at 8:19
2
@mathematician1975 - if this is "business critical data", then surely you want to put in a UPS? No operating system on Earth can guarantee corruption-free data when you pull the plug at any time. As already mentioned, making everything read-only apart from the data would help, and a light Linux distro can shut down safely and rapidly on a signal from a UPS.
– Paddy Landau
Jul 24 '12 at 9:53
|
show 7 more comments
Note: this answer is from the perspective of a production environment where data loss or downtime can lead to loss of money, customers, industrial equipment malfunctioning, etc. If you are just tinkering with a Raspberry Pi at home, I'd say there's no problem... :)
I would not recommend Ubuntu in its default configuration, and the (default) ext4 filesystem by design, for an embedded environment where there would be repetitive "ungraceful" shutdowns like you suggest.
If I'm correct, you're using Ubuntu 8.04, which supports ext3 at best. While both ext3/ext4 use journaling as a way to maintain file (write) integrity and to aid in recovery, these should not be relied on when "pull the power cable" is the rule rather than the exception.
- The ideal option, assuming that your system will not need dynamic reconfiguration once set up, is to mount its root filesystem read-only and to entirely use a temporary in-memory partition when operational (like the LiveCD does). In this case, the system would return to its "initial" configuration whenever booted up.
- To store (a limited amount of) user data in a non-volatile way, you could create a secondary partition, perhaps using a filesystem optimized for flash media such as JFFS2 depending on the internal structure of the CF card. To reduce the chances of data corruption by pulling the plug, you could disable hardware write caching for the device, and mount it in synchronous (sync) mode, disabling write caching by the kernel. These options may severely affect throughput and performance, even on a "high-end" CF card, so you would have to take the intended use into consideration too.
4
I have to call FUD. The ext3/4 journal most certainly can be relied on to keep the filesystem in working order when pulling the plug. It does nothing however, for user data, so applications writing files at the time of the crash may corrupt their data unless they are careful. Also enabling sync on flash media will not just slow things down drastically, but will lead to the flash wearing out sooner. Also JFFS and YAFFS are for use on direct NOR flash built into embedded systems; ext4 works better on consumer type devices that do internal wear leveling.
– psusi
Jul 17 '12 at 17:41
1
As far as I am aware these cards are really good - but currently DOS is used. The devices need to record instrumentation data at regular intervals. As this data is business critical it sounds like I better avoid using ubuntu. I just cant believe that DOS seems the more reliable approach. Anyway thanks very much for this excellent thourough answer!! The cards we use have internal wear leveling as far as I know.
– mathematician1975
Jul 17 '12 at 19:38
1
I'm not sure what you were getting at viz. wear-leveling and flush. My point was that sync leads to more writes, which will wear out flash sooner. Also when using the ext3/4 journal, afsck
is NOT performed after power fail; the kernel uses the journal to make fast repairs when the fs is mounted. Avoiding a longfsck
after a crash is the whole reason journaling was added.
– psusi
Jul 18 '12 at 17:44
2
@mathematician1975: if you want to use Linux for these purposes, you need a real-time/embedded distro, maybe something like ucLinux, not a full-blown desktop/server distro like Ubuntu... :)
– ish
Jul 19 '12 at 8:19
2
@mathematician1975 - if this is "business critical data", then surely you want to put in a UPS? No operating system on Earth can guarantee corruption-free data when you pull the plug at any time. As already mentioned, making everything read-only apart from the data would help, and a light Linux distro can shut down safely and rapidly on a signal from a UPS.
– Paddy Landau
Jul 24 '12 at 9:53
|
show 7 more comments
Note: this answer is from the perspective of a production environment where data loss or downtime can lead to loss of money, customers, industrial equipment malfunctioning, etc. If you are just tinkering with a Raspberry Pi at home, I'd say there's no problem... :)
I would not recommend Ubuntu in its default configuration, and the (default) ext4 filesystem by design, for an embedded environment where there would be repetitive "ungraceful" shutdowns like you suggest.
If I'm correct, you're using Ubuntu 8.04, which supports ext3 at best. While both ext3/ext4 use journaling as a way to maintain file (write) integrity and to aid in recovery, these should not be relied on when "pull the power cable" is the rule rather than the exception.
- The ideal option, assuming that your system will not need dynamic reconfiguration once set up, is to mount its root filesystem read-only and to entirely use a temporary in-memory partition when operational (like the LiveCD does). In this case, the system would return to its "initial" configuration whenever booted up.
- To store (a limited amount of) user data in a non-volatile way, you could create a secondary partition, perhaps using a filesystem optimized for flash media such as JFFS2 depending on the internal structure of the CF card. To reduce the chances of data corruption by pulling the plug, you could disable hardware write caching for the device, and mount it in synchronous (sync) mode, disabling write caching by the kernel. These options may severely affect throughput and performance, even on a "high-end" CF card, so you would have to take the intended use into consideration too.
Note: this answer is from the perspective of a production environment where data loss or downtime can lead to loss of money, customers, industrial equipment malfunctioning, etc. If you are just tinkering with a Raspberry Pi at home, I'd say there's no problem... :)
I would not recommend Ubuntu in its default configuration, and the (default) ext4 filesystem by design, for an embedded environment where there would be repetitive "ungraceful" shutdowns like you suggest.
If I'm correct, you're using Ubuntu 8.04, which supports ext3 at best. While both ext3/ext4 use journaling as a way to maintain file (write) integrity and to aid in recovery, these should not be relied on when "pull the power cable" is the rule rather than the exception.
- The ideal option, assuming that your system will not need dynamic reconfiguration once set up, is to mount its root filesystem read-only and to entirely use a temporary in-memory partition when operational (like the LiveCD does). In this case, the system would return to its "initial" configuration whenever booted up.
- To store (a limited amount of) user data in a non-volatile way, you could create a secondary partition, perhaps using a filesystem optimized for flash media such as JFFS2 depending on the internal structure of the CF card. To reduce the chances of data corruption by pulling the plug, you could disable hardware write caching for the device, and mount it in synchronous (sync) mode, disabling write caching by the kernel. These options may severely affect throughput and performance, even on a "high-end" CF card, so you would have to take the intended use into consideration too.
edited Jul 17 '12 at 18:10
answered Jul 17 '12 at 16:32
ishish
115k29265293
115k29265293
4
I have to call FUD. The ext3/4 journal most certainly can be relied on to keep the filesystem in working order when pulling the plug. It does nothing however, for user data, so applications writing files at the time of the crash may corrupt their data unless they are careful. Also enabling sync on flash media will not just slow things down drastically, but will lead to the flash wearing out sooner. Also JFFS and YAFFS are for use on direct NOR flash built into embedded systems; ext4 works better on consumer type devices that do internal wear leveling.
– psusi
Jul 17 '12 at 17:41
1
As far as I am aware these cards are really good - but currently DOS is used. The devices need to record instrumentation data at regular intervals. As this data is business critical it sounds like I better avoid using ubuntu. I just cant believe that DOS seems the more reliable approach. Anyway thanks very much for this excellent thourough answer!! The cards we use have internal wear leveling as far as I know.
– mathematician1975
Jul 17 '12 at 19:38
1
I'm not sure what you were getting at viz. wear-leveling and flush. My point was that sync leads to more writes, which will wear out flash sooner. Also when using the ext3/4 journal, afsck
is NOT performed after power fail; the kernel uses the journal to make fast repairs when the fs is mounted. Avoiding a longfsck
after a crash is the whole reason journaling was added.
– psusi
Jul 18 '12 at 17:44
2
@mathematician1975: if you want to use Linux for these purposes, you need a real-time/embedded distro, maybe something like ucLinux, not a full-blown desktop/server distro like Ubuntu... :)
– ish
Jul 19 '12 at 8:19
2
@mathematician1975 - if this is "business critical data", then surely you want to put in a UPS? No operating system on Earth can guarantee corruption-free data when you pull the plug at any time. As already mentioned, making everything read-only apart from the data would help, and a light Linux distro can shut down safely and rapidly on a signal from a UPS.
– Paddy Landau
Jul 24 '12 at 9:53
|
show 7 more comments
4
I have to call FUD. The ext3/4 journal most certainly can be relied on to keep the filesystem in working order when pulling the plug. It does nothing however, for user data, so applications writing files at the time of the crash may corrupt their data unless they are careful. Also enabling sync on flash media will not just slow things down drastically, but will lead to the flash wearing out sooner. Also JFFS and YAFFS are for use on direct NOR flash built into embedded systems; ext4 works better on consumer type devices that do internal wear leveling.
– psusi
Jul 17 '12 at 17:41
1
As far as I am aware these cards are really good - but currently DOS is used. The devices need to record instrumentation data at regular intervals. As this data is business critical it sounds like I better avoid using ubuntu. I just cant believe that DOS seems the more reliable approach. Anyway thanks very much for this excellent thourough answer!! The cards we use have internal wear leveling as far as I know.
– mathematician1975
Jul 17 '12 at 19:38
1
I'm not sure what you were getting at viz. wear-leveling and flush. My point was that sync leads to more writes, which will wear out flash sooner. Also when using the ext3/4 journal, afsck
is NOT performed after power fail; the kernel uses the journal to make fast repairs when the fs is mounted. Avoiding a longfsck
after a crash is the whole reason journaling was added.
– psusi
Jul 18 '12 at 17:44
2
@mathematician1975: if you want to use Linux for these purposes, you need a real-time/embedded distro, maybe something like ucLinux, not a full-blown desktop/server distro like Ubuntu... :)
– ish
Jul 19 '12 at 8:19
2
@mathematician1975 - if this is "business critical data", then surely you want to put in a UPS? No operating system on Earth can guarantee corruption-free data when you pull the plug at any time. As already mentioned, making everything read-only apart from the data would help, and a light Linux distro can shut down safely and rapidly on a signal from a UPS.
– Paddy Landau
Jul 24 '12 at 9:53
4
4
I have to call FUD. The ext3/4 journal most certainly can be relied on to keep the filesystem in working order when pulling the plug. It does nothing however, for user data, so applications writing files at the time of the crash may corrupt their data unless they are careful. Also enabling sync on flash media will not just slow things down drastically, but will lead to the flash wearing out sooner. Also JFFS and YAFFS are for use on direct NOR flash built into embedded systems; ext4 works better on consumer type devices that do internal wear leveling.
– psusi
Jul 17 '12 at 17:41
I have to call FUD. The ext3/4 journal most certainly can be relied on to keep the filesystem in working order when pulling the plug. It does nothing however, for user data, so applications writing files at the time of the crash may corrupt their data unless they are careful. Also enabling sync on flash media will not just slow things down drastically, but will lead to the flash wearing out sooner. Also JFFS and YAFFS are for use on direct NOR flash built into embedded systems; ext4 works better on consumer type devices that do internal wear leveling.
– psusi
Jul 17 '12 at 17:41
1
1
As far as I am aware these cards are really good - but currently DOS is used. The devices need to record instrumentation data at regular intervals. As this data is business critical it sounds like I better avoid using ubuntu. I just cant believe that DOS seems the more reliable approach. Anyway thanks very much for this excellent thourough answer!! The cards we use have internal wear leveling as far as I know.
– mathematician1975
Jul 17 '12 at 19:38
As far as I am aware these cards are really good - but currently DOS is used. The devices need to record instrumentation data at regular intervals. As this data is business critical it sounds like I better avoid using ubuntu. I just cant believe that DOS seems the more reliable approach. Anyway thanks very much for this excellent thourough answer!! The cards we use have internal wear leveling as far as I know.
– mathematician1975
Jul 17 '12 at 19:38
1
1
I'm not sure what you were getting at viz. wear-leveling and flush. My point was that sync leads to more writes, which will wear out flash sooner. Also when using the ext3/4 journal, a
fsck
is NOT performed after power fail; the kernel uses the journal to make fast repairs when the fs is mounted. Avoiding a long fsck
after a crash is the whole reason journaling was added.– psusi
Jul 18 '12 at 17:44
I'm not sure what you were getting at viz. wear-leveling and flush. My point was that sync leads to more writes, which will wear out flash sooner. Also when using the ext3/4 journal, a
fsck
is NOT performed after power fail; the kernel uses the journal to make fast repairs when the fs is mounted. Avoiding a long fsck
after a crash is the whole reason journaling was added.– psusi
Jul 18 '12 at 17:44
2
2
@mathematician1975: if you want to use Linux for these purposes, you need a real-time/embedded distro, maybe something like ucLinux, not a full-blown desktop/server distro like Ubuntu... :)
– ish
Jul 19 '12 at 8:19
@mathematician1975: if you want to use Linux for these purposes, you need a real-time/embedded distro, maybe something like ucLinux, not a full-blown desktop/server distro like Ubuntu... :)
– ish
Jul 19 '12 at 8:19
2
2
@mathematician1975 - if this is "business critical data", then surely you want to put in a UPS? No operating system on Earth can guarantee corruption-free data when you pull the plug at any time. As already mentioned, making everything read-only apart from the data would help, and a light Linux distro can shut down safely and rapidly on a signal from a UPS.
– Paddy Landau
Jul 24 '12 at 9:53
@mathematician1975 - if this is "business critical data", then surely you want to put in a UPS? No operating system on Earth can guarantee corruption-free data when you pull the plug at any time. As already mentioned, making everything read-only apart from the data would help, and a light Linux distro can shut down safely and rapidly on a signal from a UPS.
– Paddy Landau
Jul 24 '12 at 9:53
|
show 7 more comments
The Operating System will be fine as long as it is setup for read-only use. LiveCD's have a setup like that, so that you can power them off at anytime, and the OS will not suffer harm.
On a read-write drive, ext4 filesystems are very resilient. But no matter the filesystem, any drive that is writable will be subject to corrupt files.
add a comment |
The Operating System will be fine as long as it is setup for read-only use. LiveCD's have a setup like that, so that you can power them off at anytime, and the OS will not suffer harm.
On a read-write drive, ext4 filesystems are very resilient. But no matter the filesystem, any drive that is writable will be subject to corrupt files.
add a comment |
The Operating System will be fine as long as it is setup for read-only use. LiveCD's have a setup like that, so that you can power them off at anytime, and the OS will not suffer harm.
On a read-write drive, ext4 filesystems are very resilient. But no matter the filesystem, any drive that is writable will be subject to corrupt files.
The Operating System will be fine as long as it is setup for read-only use. LiveCD's have a setup like that, so that you can power them off at anytime, and the OS will not suffer harm.
On a read-write drive, ext4 filesystems are very resilient. But no matter the filesystem, any drive that is writable will be subject to corrupt files.
answered Jul 17 '12 at 16:25
SeperoSepero
3,26322447
3,26322447
add a comment |
add a comment |
You are in emergency mode. After logging in, type
journalctl -xb
to view the system logs, systemctl reboot
to reboot and systemctl default
or exit
to boot into default mode.
Press Enter for maintenance (or press CTRL-D to continue):
I've seen that message everytime after power failure, any Windows OS is far more resilient to power failure, than Linux as default configuration.
I'n my city the power grid shutdown twice a month in summer.
add a comment |
You are in emergency mode. After logging in, type
journalctl -xb
to view the system logs, systemctl reboot
to reboot and systemctl default
or exit
to boot into default mode.
Press Enter for maintenance (or press CTRL-D to continue):
I've seen that message everytime after power failure, any Windows OS is far more resilient to power failure, than Linux as default configuration.
I'n my city the power grid shutdown twice a month in summer.
add a comment |
You are in emergency mode. After logging in, type
journalctl -xb
to view the system logs, systemctl reboot
to reboot and systemctl default
or exit
to boot into default mode.
Press Enter for maintenance (or press CTRL-D to continue):
I've seen that message everytime after power failure, any Windows OS is far more resilient to power failure, than Linux as default configuration.
I'n my city the power grid shutdown twice a month in summer.
You are in emergency mode. After logging in, type
journalctl -xb
to view the system logs, systemctl reboot
to reboot and systemctl default
or exit
to boot into default mode.
Press Enter for maintenance (or press CTRL-D to continue):
I've seen that message everytime after power failure, any Windows OS is far more resilient to power failure, than Linux as default configuration.
I'n my city the power grid shutdown twice a month in summer.
edited Jan 2 at 22:11
zx485
1,45231114
1,45231114
answered Jan 2 at 16:26
FernandoFernando
111
111
add a comment |
add a comment |
I have been using Ubuntu for about 18 months, and I've experimented with all sorts of programs and downloads. My opinion on Ubuntu is that it is far and away the the most stable operateing system available.
Programs and downloads that would have demolished windows OS's are just brushed aside by Ubuntu and Kubuntu, Ubuntu is really easy to use, has everything you could ever need, office and work applications are excellent, and it never gets a virus or trojens like Windows.
Kubuntu seems to have a few more toys, it's a bit harder to get to grips with but just as robust as ubuntu. The only downside with either is that you can't play 3d games or watch skygo like you can with Windows, but apart from that can't see any reason to use anything else.
This doesn't really address this question, though, which is asking specifically about how well an Ubuntu system hold up across multiple sudden power loss events.
– Eliah Kagan
Aug 1 '12 at 6:46
add a comment |
I have been using Ubuntu for about 18 months, and I've experimented with all sorts of programs and downloads. My opinion on Ubuntu is that it is far and away the the most stable operateing system available.
Programs and downloads that would have demolished windows OS's are just brushed aside by Ubuntu and Kubuntu, Ubuntu is really easy to use, has everything you could ever need, office and work applications are excellent, and it never gets a virus or trojens like Windows.
Kubuntu seems to have a few more toys, it's a bit harder to get to grips with but just as robust as ubuntu. The only downside with either is that you can't play 3d games or watch skygo like you can with Windows, but apart from that can't see any reason to use anything else.
This doesn't really address this question, though, which is asking specifically about how well an Ubuntu system hold up across multiple sudden power loss events.
– Eliah Kagan
Aug 1 '12 at 6:46
add a comment |
I have been using Ubuntu for about 18 months, and I've experimented with all sorts of programs and downloads. My opinion on Ubuntu is that it is far and away the the most stable operateing system available.
Programs and downloads that would have demolished windows OS's are just brushed aside by Ubuntu and Kubuntu, Ubuntu is really easy to use, has everything you could ever need, office and work applications are excellent, and it never gets a virus or trojens like Windows.
Kubuntu seems to have a few more toys, it's a bit harder to get to grips with but just as robust as ubuntu. The only downside with either is that you can't play 3d games or watch skygo like you can with Windows, but apart from that can't see any reason to use anything else.
I have been using Ubuntu for about 18 months, and I've experimented with all sorts of programs and downloads. My opinion on Ubuntu is that it is far and away the the most stable operateing system available.
Programs and downloads that would have demolished windows OS's are just brushed aside by Ubuntu and Kubuntu, Ubuntu is really easy to use, has everything you could ever need, office and work applications are excellent, and it never gets a virus or trojens like Windows.
Kubuntu seems to have a few more toys, it's a bit harder to get to grips with but just as robust as ubuntu. The only downside with either is that you can't play 3d games or watch skygo like you can with Windows, but apart from that can't see any reason to use anything else.
edited Aug 1 '12 at 6:45
Eliah Kagan
81.6k21227364
81.6k21227364
answered Jul 27 '12 at 22:01
Darrell WDarrell W
1
1
This doesn't really address this question, though, which is asking specifically about how well an Ubuntu system hold up across multiple sudden power loss events.
– Eliah Kagan
Aug 1 '12 at 6:46
add a comment |
This doesn't really address this question, though, which is asking specifically about how well an Ubuntu system hold up across multiple sudden power loss events.
– Eliah Kagan
Aug 1 '12 at 6:46
This doesn't really address this question, though, which is asking specifically about how well an Ubuntu system hold up across multiple sudden power loss events.
– Eliah Kagan
Aug 1 '12 at 6:46
This doesn't really address this question, though, which is asking specifically about how well an Ubuntu system hold up across multiple sudden power loss events.
– Eliah Kagan
Aug 1 '12 at 6:46
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f164726%2fhow-resilient-is-ubuntu-to-repeated-power-off-shutdowns%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
1
Is there any way you could incorporate a UPS or battery backup into your devices? Even a relatively small one would give Linux enough time to shut things down gracefully. Ideally, you'd want to tell your applications first (as soon as the UPS kicks in) so they could shut down before Linux forces them to do so in very little time.
– Joe
Jul 18 '12 at 21:55
I wonder, would it be possible to use a file system that has a copy-on-write feature, such as ZFS? Then theoretically it would be impossible to get corruption since on next boot the restoration would happen until the last known-good state of the FS, avoiding any possible partially written data afterwards.
– Wizek
Jan 29 '17 at 11:43