HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: journalling issue -- plz help
Operating System - Linux
1827806
Members
2227
Online
109969
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2005 06:23 AM
02-18-2005 06:23 AM
Dea Gurus
OS: rhl 9.0
fs: ext3
#cat /etc/fstab
LABEL=/tmp /tmp ext3 default 1 1
i created a file via touch
#touch /tmp/test.txt
then
#vi /tmp/test.txt and did some editing, but without saving the data, i myself reboot my system, and did
#vi -r /tmp/test.txt, and i found all my un-save data.. great :)
So i wana know that is it due to journalling filesystem i.e. ext3, or is it simple the text editor(vi/vim) feature ?
i think its simply the vi feature, bcause when i did the same ... but the text editor was 'gedit' intead of vim.. my all un-save data was lost.
one more question is ext3 not a journalling fs ? if its a journalling fs then why unsave data lost ?
I even use the option in fstab as:
LABEL=/tmp /tmp ext3 data=journal,default 1 1
and
LABEL=/tmp /tmp ext3 data=writeback,default 1 1
but if i unsave my data, and reboot the system, and open the file with gedit(gui), i didnt found the unsave data
Hope you people will help me in this matter
Thanks in Advance.
Regards
Maaz
OS: rhl 9.0
fs: ext3
#cat /etc/fstab
LABEL=/tmp /tmp ext3 default 1 1
i created a file via touch
#touch /tmp/test.txt
then
#vi /tmp/test.txt and did some editing, but without saving the data, i myself reboot my system, and did
#vi -r /tmp/test.txt, and i found all my un-save data.. great :)
So i wana know that is it due to journalling filesystem i.e. ext3, or is it simple the text editor(vi/vim) feature ?
i think its simply the vi feature, bcause when i did the same ... but the text editor was 'gedit' intead of vim.. my all un-save data was lost.
one more question is ext3 not a journalling fs ? if its a journalling fs then why unsave data lost ?
I even use the option in fstab as:
LABEL=/tmp /tmp ext3 data=journal,default 1 1
and
LABEL=/tmp /tmp ext3 data=writeback,default 1 1
but if i unsave my data, and reboot the system, and open the file with gedit(gui), i didnt found the unsave data
Hope you people will help me in this matter
Thanks in Advance.
Regards
Maaz
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2005 10:07 PM
02-18-2005 10:07 PM
Solution
Unsaved data is, well not safe on disk ;-)
The vi editor apparently does its own journalling and it makes sure that the data really is on the disk.
Having a journalling file system (FS) mostly means that the FS tracks which meta data changes have been in process when the system went down. This allows a fast rollback of the FS into a consistent state and saves you from waiting a long time for a full file system check to complete.
The vi editor apparently does its own journalling and it makes sure that the data really is on the disk.
Having a journalling file system (FS) mostly means that the FS tracks which meta data changes have been in process when the system went down. This allows a fast rollback of the FS into a consistent state and saves you from waiting a long time for a full file system check to complete.
.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2005 04:46 AM
02-19-2005 04:46 AM
Re: journalling issue -- plz help
Hi Maaz,
Vi uses a sort of temporary file mechanism. For example : open a new file with vi, then without saving open another command-line console and type :
ls -al .*swp
If the system crashes (or is rebooted) while still running vi, the .swp file remains.
Gedit does not use this mechanism.
Now about ext3 : this is actually a journalled filesystem. The journalling mechanism is not at application-level (ex: vi or gedit), but at filesystem level. To understand, you need to know what is a transaction.
To simplify, let's say that to create a new file, you have to store 1/ the content of the file, 2. the information that a new file have been created. The constraint here is the following : you must either complete 1/ and 2/ , or nothing. You cannot have 1/ completed without 2/ or vice-versa.
The sequence of action 1/ and action 2/ is called a transaction. To guarantee the "atomicity" of a transaction (= completing 1/ and 2/ or nothing), filesystem mechanism implements a journal that record intermediate steps of the transaction.
To simplify :
=> Log : "I'm starting a new transaction"
=> Log : "I'm going to perform 1/"
=> Do 1/
=> Log : "1/ completed"
=> Log : "I'm going to perform 2/"
=> Do 2/
=> Log : "2/ completed"
=> Log : "Transaction completed"
If the system crashes, the filesystem check (fsck) on a journalled filesystem verifies the journal (the log) and seek for transactions started but not completed, in order to either un-do intermediate steps, or go forward and terminate the transaction.
Hope this is clear. Of course, this is very simplified, compared to the complexity of a real filesystem journalling mechanism.
Good lcuk,
Kodjo
Vi uses a sort of temporary file mechanism. For example : open a new file with vi, then without saving open another command-line console and type :
ls -al .*swp
If the system crashes (or is rebooted) while still running vi, the .swp file remains.
Gedit does not use this mechanism.
Now about ext3 : this is actually a journalled filesystem. The journalling mechanism is not at application-level (ex: vi or gedit), but at filesystem level. To understand, you need to know what is a transaction.
To simplify, let's say that to create a new file, you have to store 1/ the content of the file, 2. the information that a new file have been created. The constraint here is the following : you must either complete 1/ and 2/ , or nothing. You cannot have 1/ completed without 2/ or vice-versa.
The sequence of action 1/ and action 2/ is called a transaction. To guarantee the "atomicity" of a transaction (= completing 1/ and 2/ or nothing), filesystem mechanism implements a journal that record intermediate steps of the transaction.
To simplify :
=> Log : "I'm starting a new transaction"
=> Log : "I'm going to perform 1/"
=> Do 1/
=> Log : "1/ completed"
=> Log : "I'm going to perform 2/"
=> Do 2/
=> Log : "2/ completed"
=> Log : "Transaction completed"
If the system crashes, the filesystem check (fsck) on a journalled filesystem verifies the journal (the log) and seek for transactions started but not completed, in order to either un-do intermediate steps, or go forward and terminate the transaction.
Hope this is clear. Of course, this is very simplified, compared to the complexity of a real filesystem journalling mechanism.
Good lcuk,
Kodjo
Learn and explain...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2005 05:42 PM
02-19-2005 05:42 PM
Re: journalling issue -- plz help
Dear Uwe Zessin, I m highly thankful to u for the reply/help. Nice Help.
Dear Kodjo Agbenu, u provide a marvelous help. I m highly Thankful to u for such a Marvelous, Nice and Great help
Regards
Maaz
Dear Kodjo Agbenu, u provide a marvelous help. I m highly Thankful to u for such a Marvelous, Nice and Great help
Regards
Maaz
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP