셧다운 없이 바로 전원을 꺼버리는 경우.. 안전 대책은?

sadtale의 이미지

우분투를 사용중인데요....
이걸.. 전원이 아니라 밧데리를 연결해서 사용하는데..
밧데리 체크가 안되는 상황이라.. 언제라도 확 꺼질 수 있는 상황인데요..

셧다운 없이 바로 확 꺼져버리면 버퍼가 날아가버려서 파일 시스템이 깨질 우려가 있잖아요..
이걸 막을 방법이 없을까요?
그냥 버퍼를 안써버리면 무지 느려질 것 같고...

임베디드 시스템에서는 이런 경우 어떻게 처리되는지 모르겠네요..
아무래도 임베디드 리눅스의 경우 비정상적으로 전원을 제거하는 경우가 많지 싶은데..

어찌됐든 전 일반 우분투를 사용중이구요..
이런 경우.. 어떻게든 밧데리 체크를 해서 미리미리 셧다운을 시켜줘야 할까요?

아.. 고민이네요..

nthroot의 이미지

피할수 없는 상황이면 파일시스템을 잘 고르셔야겠네요.
저널링 말고도 이런걸 위해서 특화되어 나온 파일시스템도 있을 것 같아요.

------식은이 처------
길이 끝나는 저기엔 아무 것도 없어요. 희망이고 나발이고 아무 것도 없어.

mirheekl의 이미지

(sorry for writing in English.. There's no way to type Korean here)

From my experience, the embedded device that I was developing on was just used virtual filesystem on its RAM. It extracts actual data from packed data on FlashRom while booting. That means, it was okay even when the users remove power at any time, except of saving data to FlashROM. (just imagine "Firmware updates". Every mobile or embedded device says "Don't power off while firmware updating".) Even when the user shut down while saving data and the data is corrupted, the device reset the saved data to default values during next booting by inspecting "checksum". It's obvious better off to use default data instead of corrupted data.

So I suggest you not to use HDD-style media but just virtual (volatile) filesystem on RAM.

Or, how about using a digital voltage meter (or A/D converter) connected to serial ports? Voltage itself doesn't guarantee the status of battery exactly, but it must be helpful. Check the voltage periodically via a daemon, then if the voltage level is lower than critical level, just send an alert somewhere and shut down the system. (Mobile devices use this kinda measuring.) This must be an ideal solution unless you cannot use more money at all.

--
This is for you new people. I have just one rule :
Everyone fights, no one quits. If you don't do your job, I'll shoot you myself. Do you get me?

--

tj의 이미지

barrier 켜고 마운트하세요. 디폴트로 켜져있지 않나요 근데?

vivisection의 이미지

하드에 베드섹터 날수 잇습니다

mirheekl님 말대로 live usb같은걸로 사용하시거나

usb에 우분투를 깔아버려도 되죠 (usb 용량만 된다면 설치됩니다. 설치법은 구글링을..)

klara의 이미지

임베디드 리눅스라면 배터리가 체크되는 제품을 사용하거나 체크할수 있는 코드를 포팅하겠지요...

bushi의 이미지

저널링 파일시스템을 사용하면 파일 시스템은 보호됩니다. 파일은 ...

OTL

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.