# format external hard drive to ext4



## namenotfound

I have Ubuntu 8.10 with ext3 filesystem, and I have two questions.

1, Is it possible to format an external hard drive to ext4, considering my operating system doesn't use ext4.

2, If I do format my external hard drive to ext4, will I be able to read/write with it on my ext3 system?


OR am I just better off formatting the external hard drive to ext3?


----------



## RootbeaR

namenotfound said:


> I have Ubuntu 8.10 with ext3 filesystem, and I have two questions.
> 
> 1, Is it possible to format an external hard drive to ext4, considering my operating system doesn't use ext4.
> 
> 2, If I do format my external hard drive to ext4, will I be able to read/write with it on my ext3 system?
> 
> OR am I just better off formatting the external hard drive to ext3?


This is Linux.

You can format it however you like.

FWIW majority of my music is on NTFS partition (ripped before I started using Linux).

I mount it from my ext3 formatted PCLOS install and play using Amarok.


----------



## atkail

Yeah, it really doesn't matter which you choose if it's just for storage.


----------



## Elvandil

Are you guys sure about this? I'm no Linux expert by any means, but does Ubuntu contain file-system drivers for Ext4? If not, I don't see how the drive would be accessible to Ubuntu.

Ubuntu 9.04 and above has Ext4fs support, but I wouldn't expect any access from versions below that unless drivers were installed manually.


----------



## atkail

Yes, they are native to most modern linux distros.


----------



## Elvandil

So you agree that Ubuntu before 9.04 will not be able to access the drive?


----------



## atkail

What I'm saying is that they are native on most modern distros. While he may not have the driver on his 8.1 that does not mean that the ext4 wont have backwards compatibility on its end. If you think about it, it really does leave room for success. But I'm not absolutely sure until I try it myself.


----------



## atkail

Actually I just looked at the specs and it is 100% backwards compatible


----------



## Elvandil

OK. I'm not trying to start an argument, but I hope this discussion will be useful to the OP. He'll know, too, when he tries it.


----------



## atkail

We're just talking, one professional to another. I respect your seniority, and I meant no disrespect. I was just trying to answer the question to the best of my knowledge. I hope he finds this information useful as well.


----------



## Elvandil

As I said, I'm no Linux expert (and I don't even like saying "Linux" as if it were an operating system instead of a kernel around which many OS's are built). But I do know that file systems need drivers. So I'm still wondering. If Ext4fs is accessible, then an Ext3fs driver must be able to do it.

I appreciate your professionalism.


----------



## atkail

Np, I think (and this is just atkail's theory) that each retains compatibility of the previous version. Sort of a backwards key effect.


----------



## Elvandil

Yes, I agree and understand that part. But I'm just a bit unsure of what the definition of "backward-compatible" would be in this case. Does it mean that machines that can access Ext3 can automatically access Ext4? Or does it mean that all functions of Ext3 are retained in Ext4, that Ext4 can be used in place of Ext3, and so on, but *only if the OS supports Ext4*?

I'll be curious to see what happens when our OP tries this, or to hear from someone else who did. 

It may be something like the newst versions of UDF for CD's. Though the files are located inside a UDF file format, there is extra data written to the CD so that machines with no UDF drivers can access the CD "as if" it were the standard ISO format. To an OS with no UDF drivers, the CD appears to be in ISO format but really isn't. It could be similar. That when the drive is accessed from an older version of "Linux", it "sees" the drive as Ext3.


----------



## atkail

I'm hoping it would that it means machines that use ext3 could automatically use ext4. At least that's what the man pages are leading me to believe. 

I know what you mean, my ears are perked a little bit too.


----------



## Elvandil

LOL. Well, he does come back eventually, and now can't say that no one paid any attention. There's plenty to read. And all we really came up with is, "Try it and see, but it will probably work.:


----------



## saikee

Here is an example, using a *Debian 4R0 with a 2.6.18 kernel *to mount Ubuntu 9.04 in sda6 formatted to Ext4 filing system


Code:


debian:/home/saikee# mkdir /mnt/sda6
mkdir: cannot create directory `/mnt/sda6': File exists
debian:/home/saikee# mount /dev/sda6 /mnt/sda6
[COLOR="Red"]mount: wrong fs type, bad option, bad superblock on /dev/sda6,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so[/COLOR]

debian:/home/saikee# mount -t ext4 /dev/sda6 /mnt/sda6
mount: unknown filesystem type 'ext4'
debian:/home/saikee# mount -t ext3 /dev/sda6 /mnt/sda6
mount: wrong fs type, bad option, bad superblock on /dev/sda6,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so


debian:/home/saikee# uname -a
Linux debian 2.6.18-6-686 #1 SMP Sat May 24 10:24:42 UTC 2008 i686 GNU/Linux

I tried it with *DSL which failed too and its kernel is 2.4.31*, one of the oldest around.

*Here is anther attempt to mount it by Mepis*


Code:


[email protected]:/home/saikee# mkdir /mnt/sda6
mkdir: cannot create directory `/mnt/sda6': File exists
[email protected]:/home/saikee# mount /dev/sda6 /mnt/sda6
[B][COLOR="Red"]mount: unknown filesystem type 'ext4'[/COLOR][/B]
[email protected]:/home/saikee# uname -a
Linux mepis1 2.6.27-1-mepis64-smp #1 SMP PREEMPT Wed Feb 18 10:19:55 EST 2009 x86_64 GNU/Linux
[email protected]:/home/saikee#

The above clearly suggests a Linux with 2.6.27-1 kernel is able to see an Ext4 partition but unable to mount it.

*Here is the attempt by Mandriva, with a 2.6.28 kernel*


Code:


[[email protected] saikee]# mount /dev/sda6 /mnt/sda6
[[email protected] saikee]# l[COLOR="Blue"]s /mnt/sda6
abit/  boot/   dev/  home/        lib/         media/  opt/   root/  selinux/  sys/  usr/  [email protected]
bin/   [email protected]  etc/  [email protected]  lost+found/  mnt/    proc/  sbin/  srv/      tmp/  var/[/COLOR]
[[email protected] saikee]# uname -a
Linux localhost 2.6.28.4-desktop-1mnb #1 SMP Mon Feb 9 07:18:26 EST 2009 x86_64 Intel(R) Core(TM)2 CPU    6700  @ 2.66GHz GNU/Linux
[[email protected] saikee]#

Thus only the Mandriva with the latest 2.6.28 kernel succeeded in mounting the sda6 partition formatted in Ext4.

The Ext4 has been around for a while but only declared "stable" in the 2.6.28 kernel.

In conclusion one needs a newish kernel to read an Ext4 partition.


----------



## Elvandil

Thank you, *saikee*. I would have bet important money that you would clarify this for us once you saw the thread. 

We all appreciate your input.


----------



## saikee

*Elvandil,*

Examples speak better words. It pays to be cautious.


----------



## RootbeaR

Yes, thanks saikee.

I must say I am disappointed.

I assumed there would be a driver available much like ntfs-3g for MS.

Here it was under my nose:
"Ext4 Filesystem Explained in Plain English"
http://hehe2.net/linux-general/ext4-filesystem-explained-in-plain-english/


----------



## Elvandil

It won't be long before all new OS's have support for Ext4, so it's really a trivial problem. The only people who might worry are those that are running old OS's and don't want to update.


----------



## Elvandil

saikee said:


> *Elvandil,*
> 
> Examples speak better words. It pays to be cautious.


Absolutely right. I almost never recommend a program to anyone that I havn't tried myself, and would have tested the possibilities with Ext4 if I had had the resources to do so. Thank you again.

I wouldn't have stuck my nose in here at all if it weren't for the fact that, different as one OS may be from another, they share some fundamental principles. Just as one model of automobile is not built according to different laws of physics, the family of OS's is more similar to one another than different.


----------



## saikee

RootbeaR said:


> Yes, thanks saikee.
> 
> I must say I am disappointed.
> 
> I assumed there would be a driver available much like ntfs-3g for MS.
> 
> Here it was under my nose:
> "Ext4 Filesystem Explained in Plain English"
> http://hehe2.net/linux-general/ext4-filesystem-explained-in-plain-english/


I think there must be but I haven't bothered with it.

Too many things are getting interesting. I managed to get 130 partitions out of one hard disk from the 2.6.28 kernel but the majority of Linux are not ready to use them yet including their partitioning tools and installers.


----------



## RootbeaR

saikee said:


> Too many things are getting interesting.


Yes, I am finding that a problem.

I feel like I need to take a break from updating until they slow down a little.

So much reading, so little time.


----------

