LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-29-2009, 09:36 AM   #1
tkbonito
LQ Newbie
 
Registered: Jul 2009
Distribution: Arch Linux
Posts: 6

Rep: Reputation: 0
How Linux writes/deletes from a hdd


This isn't a problem just something i'm curious about. I couldn't find anything decent by searching google. I know all about controlling Linux but im still new when it comes to how Linux actually works.

Ok so I know when Windows deletes a file it actually just puts that space on the disk open to be written over. This causes fragmentation because if a file larger than that space is written to it, it has to split the file up and put the other part of the file in a different space. Apparently Linux doesnt fragment your hard drive. So what does Linux do different? Atleast for ext2/3/4 formatted drives if that makes a difference.

Does Linux save data differently depending on the filesystem? Im used to FAT/NTFS where nothing has changed accept the layout that's written to has changed and now treated differently so you can write files over 2/4GB. That and the information of the file is written with the cluster. I only know of the ext file systems for Linux which I assume are the most popular.

I would appreciate your time.

Last edited by tkbonito; 07-29-2009 at 09:40 AM.
 
Old 07-29-2009, 11:53 AM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Not sure exactly how accurate this is, but it was my understanding also at one point when I had a similar question.
 
Old 07-29-2009, 12:21 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
I think you are asking about the behavior of different filesystems. In general, I think block devices all have some similar paradigms---eg inodes setup with fixed sizes, data not erased but blocks (inodes) simply being dereferenced, etc.

There's a recent thread that talks about how to see what is written to the disk in different situations--I posted something showing how a modified file gets saved to a new physical location, but the old file is still there (but dereferenced)
(I can't find the thread)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reduce HDD writes? Cyberman Linux - Hardware 1 09-29-2008 03:49 PM
FC6 Server Randomly Writes Data To HDD jmoschetti45 Linux - Server 6 05-22-2007 04:16 PM
Gnome 2.6, odd hdd writes. slackMeUp Slackware 11 10-07-2004 03:42 AM
Windows installation deletes Linux? SuSE_User Linux - Newbie 3 03-28-2004 05:26 AM
(Foolish linux user deletes block device) Zander Linux - General 3 02-16-2004 12:40 AM


All times are GMT -5. The time now is 07:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration