LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What is the diff betwn mke2fs and tune2fs ? (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-the-diff-betwn-mke2fs-and-tune2fs-421187/)

sambyte 03-03-2006 03:48 AM

What is the diff betwn mke2fs and tune2fs ?
 
Hi,
Pls tell me the difference between mke2fs and tune2fs command ? Also when should i use tune2fs? I know a bit about mke2fs .....

marozsas 03-03-2006 05:42 AM

mke2fs is used to create a filesystem. It "erases" everything on the target partition and creates a new, fresh, file system on it.

tune2fs is used to tune (daahh) parameters on a already created file system. Things like volume name, max time between checks, etc. It don't create anything, just adjust parameters that was set by a previous run of mke2fs.

cheers,

sambyte 03-03-2006 06:12 AM

Hi,
Thanks for your reply. Also wanted to know that to run mke2fs or tune2fs does the partitions have to be mounted ? If a partition is unmounted can i still format it ?

marozsas 03-03-2006 06:31 AM

Both operations must be done on un-mounted partitions.
You can create a new filesystem (what you call "format") only on un-mounted partitions, after all, you are creating the data that will be used to mount it later !

regards,

sambyte 03-03-2006 06:43 AM

Hi,
Thanks for your reply. Got the thing about mke2fs . But what about tune2fs ?
tune2fs is used to tune (daahh) parameters on a already created file system as you said. So is tune2fs safe enough to be performed even on a mounted partition ?

marozsas 03-03-2006 06:57 AM

Quote:

Originally Posted by sambyte
So is tune2fs safe enough to be performed even on a mounted partition ?

No! Theses parameters controls how the filesystem is mounted, checked, if it has a journal or not, how much space is reserved to the superuser, and changing this on-the-fly could result in unexpected behavior and corrupted data being write to the disk.


All times are GMT -5. The time now is 01:51 PM.