1 (edited by fan2linux 2009-05-15 22:08:40)

Topic: [solved]Impossible to make an ext4 file on large external drive

I just bougth an external harddrive (500GB) and wanted to make an ext3 partition instead of the existing ntfs one.
1) I delete ntfs
2) I ask for an ext3
Then I had this error (recorded as an html file) :

GParted 0.3.8

Libparted 1.8.9

Formater /dev/sdc1 en ext3  00:01:04    ( ERROR )
         
calibrer /dev/sdc1  00:00:00    ( SUCCESS )
         
chemin : /dev/sdc1
début : 63
fin : 976768064
taille : 976768002 (465.76 Gio)
définir le type de partition sur /dev/sdc1  00:00:01    ( SUCCESS )
         
nouveau type de partition : ext3
créer un nouveau système de fichiers ext3  00:01:03    ( ERROR )
         
mkfs.ext3 -L "" /dev/sdc1
         
Étiquette de système de fichiers=
Type de système d'exploitation : Linux
Taille de bloc=4096 (log=2)
Taille de fragment=4096 (log=2)
30531584 i-noeuds, 122096000 blocs
6104800 blocs (5.00%) réservés pour le super utilisateur
Premier bloc de données=0
Nombre maximum de blocs du système de fichiers=0
3727 groupes de blocs
32768 blocs par groupe, 32768 fragments par groupe
8192 i-noeuds par groupe
Superblocs de secours stockés sur les blocs :
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000

Écriture des tables d'i-noeuds : 0/3727 1/3727 2/3727 3/3727 4/3727 5/3727 6/3727 7/3727 8/3727 9/3727 10/3727 11/3727 12/3727 13/3727 14/3727 15/3727 16/3727 17/3727 18/3727 19/3727 20/3727 21/3727 22/3727 23/3727 24/3727 25/3727 26/3727 27/3727 28/3727 29/3727 30/3727 31/3727 32/3727 
...
3717/37273718/37273719/37273720/37273721/37273722/37273723/37273724/37273725/37273726/3727complété
mke2fs 1.41.3 (12-Oct-2008)
ext2fs_mkdir: Attempt to read block from filesystem resulted in short read lors de la création du répertoire racine

========================================

Sorry it's french...
Could someone give me a help ?
I am using Ubuntu 8.10.

2

Re: [solved]Impossible to make an ext4 file on large external drive

GParted 0.3.8 is a quite old version.
Could you please retry with the latest version 0.4.4 or the 0.4.4-1 livecd?

*** It is highly recommended to backup any important files before doing resize/move operations. ***

3

Re: [solved]Impossible to make an ext4 file on large external drive

Ok I'll try the latest version.
Actually I downloaded this old version from the official repositories. It is quite surprising that I did not get the latest version but only the 0.3.8.
Any clue  to understand this ?

4

Re: [solved]Impossible to make an ext4 file on large external drive

The Ubuntu 8.10 install cd contained 0.3.8. It was the latest version at the time, in autumn. Perhaps the Ubuntu repository wasn't up to date. There are a lot of improvements since that version. Look at the GParted News page:
http://gparted.sourceforge.net/news.php

The latest version (source code) is always at the sourceforge.net, from the download links in the main GParted site. Very often it is easier to use the GParted livecd, that is usually updated a few days after the source code.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

5 (edited by fan2linux 2009-05-04 22:42:09)

Re: [solved]Impossible to make an ext4 file on large external drive

Thank you for explaining.

I try Gparted Live Cd and I Got this error :

"mke2fs 1.41.3 (12/10/08)
ext2f_mkdir:Attempt to read block from filesystem resulted in shortread while creating root dir"

6

Re: [solved]Impossible to make an ext4 file on large external drive

According to you , what should i do to overcome this problem ?

7

Re: [solved]Impossible to make an ext4 file on large external drive

When I run "lsusb", here is what i get :

remy@remy-desktop:~$ lsusb
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 003: ID 046d:c00c Logitech, Inc. Optical Wheel Mouse
Bus 005 Device 002: ID 046d:08da Logitech, Inc. QuickCam Messanger
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 1058:0704 Western Digital Technologies, Inc. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

My external HD is recognised : Western Digital Technologies but i cannot access to it as there is no partition.

8

Re: [solved]Impossible to make an ext4 file on large external drive

Some more details (I managed to save error file !) :

GParted 0.4.5

Libparted 1.8.9
Créer Partition primaire #1 (ext4, 465.76 Gio) sur /dev/sdc  00:01:04    ( ERREUR )
         
créer une partition vide  00:00:00    ( SUCCÈS )
         
chemin : /dev/sdc1
début : 63
fin : 976768064
taille : 976768002 (465.76 Gio)
définir le type de partition sur /dev/sdc1  00:00:00    ( SUCCÈS )
         
nouveau type de partition : ext2
créer un nouveau système de fichiers ext4  00:01:04    ( ERREUR )
         
mkfs.ext4 -j -O extent -L "" /dev/sdc1
         
Étiquette de système de fichiers=
Type de système d'exploitation : Linux
Taille de bloc=4096 (log=2)
Taille de fragment=4096 (log=2)
30531584 i-noeuds, 122096000 blocs
6104800 blocs (5.00%) réservés pour le super utilisateur
Premier bloc de données=0
Nombre maximum de blocs du système de fichiers=0
3727 groupes de blocs
32768 blocs par groupe, 32768 fragments par groupe
8192 i-noeuds par groupe
Superblocs de secours stockés sur les blocs :
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000

Écriture des tables d'i-noeuds : complété
mke2fs 1.41.3 (12-Oct-2008)
ext2fs_mkdir: Attempt to read block from filesystem resulted in short read lors de la création du répertoire racine.

This is when i tried to make only one partition of 500GB

I tried to make one small partition of 8MB, and it works.

Is that because of the band of this external drive ?

Or else ?

9

Re: [solved]Impossible to make an ext4 file on large external drive

I see that you try to create ext4. Did you try ext3, as you did in attempts with previous versions?
ext4 support was introduced just recently in GParted.

And, please, specify the exact version you used:
Did you install 0.4.5?
Did you use the new testing livecd 0.4.5-1?

Furthermore, I would suggest a deep scan of the drive, with any special tool (disk manufacturers give such tools in their web sites). This short read error came often from hardware problems. The fact that the drive is new doesn't exclude that some problem occured. In this case, you could have it replaced by the seller.

Try to make a partition with the 50% or 75% of the drive capacity, or just less than the eventual suspect position of the disk. 8MB is just 1 cylinder!

*** It is highly recommended to backup any important files before doing resize/move operations. ***

10

Re: [solved]Impossible to make an ext4 file on large external drive

I used 0.4.5.
I did not tested the livecd 0.4.5-1.
I tried to make a partition with 50%, 20% of the drive capacity. It failed again.

What do you mean by "deep scan" ? How to ?

11

Re: [solved]Impossible to make an ext4 file on large external drive

In the mean time I erased everything on the disk and tried to format/make a partition and it gave me this error :

GParted 0.4.5

Libparted 1.8.9
Créer Partition primaire #1 (ext3, 156.49 Gio) sur /dev/sdc  00:00:01    ( ERREUR )
         
créer une partition vide  00:00:01    ( ERREUR )
         
chemin : /dev/sdc1
début : 63
fin : 328191884
taille : 328191822 (156.49 Gio)
messages de libparted    ( INFO )
Impossible d'ouvrir /dev/sdc - étiquette de disque non reconnue.

12

Re: [solved]Impossible to make an ext4 file on large external drive

So, I understand that you installed the version 0.4.5 in Ubuntu.

Most hard drive manufacturers offer diagnostic tools on their websites which you can use to check the health status of your drive (if "your" manufacturer WD does not offer such a tool, you can try Hitatchi's Drive Fitness Test or Seagate's [SeaTools for DOS] instead).

Be careful with these tools - most of them offer not only non-destructive test routines (which will keep data intact), but also more thorough (but destructive!) ones. In this case, however, the drive is new, with no data on it. So, you can perform any tests.

Another idea: try to create the new partition manually. In any case, it is useful to see what fdisk -l -u reports.

The livecd is another good idea, because it contains up to date versions for the various tools Gparted calls.

Further idea: you can try to apply a new partition table.

Impossible d'ouvrir /dev/sdc - étiquette de disque non reconnue.

You have to choose "msdos" type partition table. It will overwrite the existing partition table in the first disk sector with a new empty one. If this doesn't solve the problem, it would be useful to check the disk geometry. Sometimes, problems arise from a difference between what the bios reports and what the operating system understands.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

13

Re: [solved]Impossible to make an ext4 file on large external drive

After testing with GParted-Live-0.4.5-1, I have been unable to reproduce the short read error experienced in this post.

To see if the problem is directly related to GParted, you could try creating an empty partition with GParted, and then use the command line to create the file system.  The command for creating an ext4 file system on /dev/sdc1 with label MyLabel would be:

mkfs.ext4 -j -O extent -L "MyLabel" /dev/sdc1

Since the mkfs.ext4 and mkfs.ext3 commands support file system sizes greater than 500 MB, I suspect that the problem is with the hard drive.

The advice by class413 to test the drive for errors does seem to the next logical step to take.

14

Re: [solved]Impossible to make an ext4 file on large external drive

To class413

Be careful with these tools - most of them offer not only non-destructive test routines (which will keep data intact), but also more thorough (but destructive!) ones. In this case, however, the drive is new, with no data on it. So, you can perform any tests.

---- No problems : there is no data on this brand new disk. I just wanted to switch to ext4 fileystem instead of ntfs/fat32.

---- I managed to make one full length partition but in ntfs.
But it gives me the following error :

DBus error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

And when I get the 'details' it gives me :

ntfs_attr_pread:Zero run length:Erreur d'entrée/sortie Failed to read $UpCAse, unexpected length (65536 != 131072). Failed to mount '/dev/sdc1':Erreur d'entre/sortie NTFS is either inconsistent, or you have hardware faults, or you have a SoftRaid/FakeRaid hardware.In the first case run chkdsk /f on Windows the reboot into Windows twice. The usage of /f parameter is very important! If you have SoftRaid/Fake Raid then first you must activate it and mount a different device under the /dev/mapper/ directory, (eg /dev/mapper/nvidia-eahaabcc1).Please see the 'dmraid' documentation for further details.

---- I did the Windows chkdsk /f and reboot twice on Windows (though I am not quite sure what reboot an external drive means). Still the same problem.
---- The RAID solution : I don't know what it means but here is the model : http://www.wdc.com/en/products/products … dc_lang=en. It doesn't seems to be RAID.

In any case, it is useful to see what fdisk -l -u reports.

---- here is the result :

remy@remy-desktop:~$ sudo fdisk -l -u
Disque /dev/sda: 160.0 Go, 160041885696 octets
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 secteurs
Units = secteurs of 1 * 512 = 512 bytes
Identifiant disque: 0x00048e64

Périphérique Amorce    Début         Fin      Blocs    Id  Système
/dev/sda1   *          63    19615364     9807651   83  Linux
/dev/sda2        19615365    23519159     1951897+  82  Linux swap / Solaris
/dev/sda3        23519160   312576704   144528772+  83  Linux

Disque /dev/sdb: 120.0 Go, 120000000000 octets
255 heads, 63 sectors/track, 14589 cylinders, total 234375000 secteurs
Units = secteurs of 1 * 512 = 512 bytes
Identifiant disque: 0xfd478bc7

Périphérique Amorce    Début         Fin      Blocs    Id  Système
/dev/sdb1              63   234372284   117186111   83  Linux

To  gedakc

To see if the problem is directly related to GParted, you could try creating an empty partition with GParted, and then use the command line to create the file system.  The command for creating an ext4 file system on /dev/sdc1 with label MyLabel would be:

---- I delete the ntfs partition.
---- I run mkfs.ext4 -j -O extent -L "MyLabel" /dev/sdc1
Here is the result :

remy@remy-desktop:~$ mkfs.ext4 -j -O extent -L "MyLabel" /dev/sdc1
mke2fs 1.41.3 (12-Oct-2008)
Ne peut évaluer par stat() /dev/sdc1 --- Aucun fichier ou dossier de ce type
Le périphérique n'existe apparemment pas ; l'avez-vous spécifié
correctement ?

15

Re: [solved]Impossible to make an ext4 file on large external drive

From the above error message, it appears that your drive is now mounted on /dev/sdb instead of /dev/sdc as previous.

Please repeat the command to create an ext4 file system, but replace /dev/sdc1 with the current path to the device (/dev/sdb1) in the above.  The fdisk -l -u command will show the device path.

WARNING:  Be very careful to choose the correct device path to your 500 GB drive partition.  Otherwise you might overwrite a different partition and cause data loss.

16

Re: [solved]Impossible to make an ext4 file on large external drive

Following gedakc's solution, here is what I get :

remy@remy-desktop:~$ sudo mkfs.ext4 -j -O extent -L backupdisk /dev/sdc
[sudo] password for remy: 
mke2fs 1.41.3 (12-Oct-2008)
/dev/sdc est le périphérique en intégralité, pas seulement une partition !
Procéder malgré tout ? (o,n) o
Avertissement : impossible d'effacer le secteur 2 : Attempt to write block from filesystem resulted in short write
Étiquette de système de fichiers=backupdisk
Type de système d'exploitation : Linux
Taille de bloc=4096 (log=2)
Taille de fragment=4096 (log=2)
30531584 i-noeuds, 122096646 blocs
6104832 blocs (5.00%) réservés pour le super utilisateur
Premier bloc de données=0
Nombre maximum de blocs du système de fichiers=0
3727 groupes de blocs
32768 blocs par groupe, 32768 fragments par groupe
8192 i-noeuds par groupe
Superblocs de secours stockés sur les blocs : 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
    102400000

Avertissement : impossible de lire le bloc 0 : Attempt to read block from filesystem resulted in short read
Avertissement : impossible d'effacer le secteur 0 : Attempt to write block from filesystem resulted in short write
Écriture des tables d'i-noeuds : complété                        
ext2fs_mkdir: Attempt to read block from filesystem resulted in short read lors de la création du répertoire racine

17

Re: [solved]Impossible to make an ext4 file on large external drive

This wasn't quite what I was requesting.  The command should have been run on a partition (/dev/sdc1) and not the entire disk device (/dev/sdc)

fan2linux wrote:

remy@remy-desktop:~$ sudo mkfs.ext4 -j -O extent -L backupdisk /dev/sdc

The above command that you executed has likely overwritten the partition table.  I am hesitant to recommend any other commands because I fear that at some point you might overwrite your working disk device and end up with an operating system that does not boot.

I still believe that class413 was on the right track with the suggestion to check the disk device for errors.

18

Re: [solved]Impossible to make an ext4 file on large external drive

Thank you for your concern gedakc.
The reason why I ran the previus command :

remy@remy-desktop:~$ sudo fdisk -l -u
Disque /dev/sda: 160.0 Go, 160041885696 octets
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 secteurs
Units = secteurs of 1 * 512 = 512 bytes
Identifiant disque: 0x00048e64

Périphérique Amorce    Début         Fin      Blocs    Id  Système
/dev/sda1   *          63    19615364     9807651   83  Linux
/dev/sda2        19615365    23519159     1951897+  82  Linux swap / Solaris
/dev/sda3        23519160   312576704   144528772+  83  Linux

Disque /dev/sdb: 120.0 Go, 120000000000 octets
255 heads, 63 sectors/track, 14589 cylinders, total 234375000 secteurs
Units = secteurs of 1 * 512 = 512 bytes
Identifiant disque: 0xfd478bc7

Périphérique Amorce    Début         Fin      Blocs    Id  Système
/dev/sdb1              63   234372284   117186111   83  Linux

Disque /dev/sdc: 500.1 Go, 500107862016 octets
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 secteurs
Units = secteurs of 1 * 512 = 512 bytes
Identifiant disque: 0x00000000
Disque /dev/sdc ne contient pas une table de partition valide

The given path is /dev/sdc.
And I would like to have only one partition.

19

Re: [solved]Impossible to make an ext4 file on large external drive

Thanks for the explanation.

Okay one more thing to try is to start up gparted and try to create a single partition with an ext2 file system on it.  Since ext4 is quite new it is possible that there are errors in it.  For instance I know that some file system corruption bugs were fixed in e2fsprogs 1.41.5

20

Re: [solved]Impossible to make an ext4 file on large external drive

etx2 failed !

ext2fs_mkdir: Attempt to read block from filesystem resulted in short read lors de la création du répertoire racine

21

Re: [solved]Impossible to make an ext4 file on large external drive

To Class413

I made a boot cd with Hitachi tools.
It did not find my external D.

22

Re: [solved]Impossible to make an ext4 file on large external drive

It certainly does appear that there is a problem with the hard drive.

If the Hitachi tools do not find external drives, you might have to connect the drive internally for the Hitachi tools to work.

23 (edited by fan2linux 2009-05-14 18:08:34)

Re: [solved]Impossible to make an ext4 file on large external drive

I managed to get what I wanted : ext4 files.
How ?
1) I run : sudo cfdisk /dev/sdc
---> new, type:linux
2) I check the path : sudo fdisk -l -u
3) I run : sudo mkfs.ext4 -j -O extent -L backupdisk /dev/sdc1
Why ?
Who knows ?
Solution is not satisfying.
Wonder if these troubles come from power supply (only one usb2 cable for such a large disk capacity)?
Last question : how to mount this disk as my PC Linux does not recognize ext4 ?
(before I upgrade to 9.04.)

24

Re: [solved]Impossible to make an ext4 file on large external drive

To mount an ext4 file system you need either kernel version 2.6.28 or higher, or you need to apply the appropriate ext4 patches and relink your kernel.

The following links might be useful:
http://en.wikipedia.org/wiki/Ext4
http://ext4.wiki.kernel.org/index.php/Ext4_Howto

25

Re: [solved]Impossible to make an ext4 file on large external drive

Great thanks to both of you.
May be this problem helped to improve stuff.
I make a [solved] in title.