# Mounting external hard drive without journal...

## Apopatos

Hi guys,

I have an external Mybook harddisk which I connect via firewire. My problem is that it is automounted with hal in ordered data mode, thing that makes it slow enough and since I use to write great amounts of data each time (100 GB or so) I would like to make it to be mounted in writeback mode.

In /etc/mke2fs.conf there is a line which says:

 *Quote:*   

> ext3 = {
> 
> 		features = has_journal

 

I changed it with features = writeback,noatime

but it didn't help.

Any suggestions?

----------

## Abraxas

I don't know if it is feasible for you but if you are dealing with large files consider moving to XFS.  It is very snappy for large data files.

----------

## Apopatos

I hadn't thought about it, it would really help if it is fast with large files since my smaller file is 1 GB but it is not possible right now because like this I'll need to format the drive and I don't have extra space in my internal disks or somewhere else to save the data temporalily, they are 700 GB!

So I'll have to stick with ext3 in writeback mode for now (if I find how to do that ofcourse) :Sad: 

----------

## Apopatos

I borrowed a harddisk from a friend so managed to find free space temporalily hehe  :Smile: 

I'll give a chance in XFS (I checked some benchmarks in phoronix and it does very well).

Do you know if I need to mount the partitios with some specific options for extra performance?

thanks

----------

## Abraxas

 *Apopatos wrote:*   

> I borrowed a harddisk from a friend so managed to find free space temporalily hehe 
> 
> I'll give a chance in XFS (I checked some benchmarks in phoronix and it does very well).
> 
> Do you know if I need to mount the partitios with some specific options for extra performance?
> ...

 

You might want to tweak the filesystem at creation time also.

```
mkfs.xfs -l lazy-count=1,version=2,size=128m -i attr=2,size=512
```

You should use the mount option logbufs=8.  There is an article somewhere on the net where I picked up this info and it may help you figure out the best options for your usage patterns.  I'll try to post it if I can find it.

----------

## Apopatos

 *Abraxas wrote:*   

> You might want to tweak the filesystem at creation time also.
> 
> ```
> mkfs.xfs -l lazy-count=1,version=2,size=128m -i attr=2,size=512
> ```
> ...

 

But how am I going to make hal to automount it with the options I want?   :Confused: 

That was my problem from the begining.

I'm reading also this http://everything2.com/node/1479435

It looks very interesting.

----------

## sera

Add an entry to /etc/fstab. Hal should read it from there.

----------

## Apopatos

 *sera wrote:*   

> Add an entry to /etc/fstab. Hal should read it from there.

 

I connect a lot of external harddisks and usbsticks all the time, so it's unhandy to make mount points and such to fstab. For sure there will be a way to set the default settings for hal.

----------

## sera

 *Apopatos wrote:*   

>  *sera wrote:*   Add an entry to /etc/fstab. Hal should read it from there. 
> 
> I connect a lot of external harddisks and usbsticks all the time, so it's unhandy to make mount points and such to fstab. For sure there will be a way to set the default settings for hal.

 

There is

```
/etc/hal/fdi/policy/*
```

Take a look at 

```
/usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi
```

 for example.This might help as well.

But don't tell me that's easier   :Wink: 

----------

## Apopatos

 *sera wrote:*   

> There is
> 
> ```
> /etc/hal/fdi/policy/*
> ```
> ...

 

OMG  :Confused: 

Sure nothing can be done with mk2efs.conf?   :Razz: 

----------

## sera

 *Apopatos wrote:*   

> 
> 
> Sure nothing can be done with mk2efs.conf?  

 

From it's name and content it's not involved in mounting at all. Just when you issue the mk2fs series of commands.

If you have just one or a fixed amount of disk with this special workload there is tune2fs -o.

If you plug in just one at a time and they shall be threated the same a single line in fstab will do.

Hal actually doesn't mount them on it's own. It issues a hotplug event witch gets forwarded via dbus to for example gnome-mount. So gconf would be possibly an other place to overwrite the defaults.

----------

## Apopatos

I haven't seen any differnce thus far when I copy files in my external. The speed is 28-34 MB/s with both ext3 and xfs and I wonder if this is the maximum limit for my drive/firewire.

But I admit when I check the properties of a folder, xfs reads them more quikly and also, displays the thumbnails more quickly so I'll stick with xfs.

One things that seems weird it's the delete capacity of xfs. I knew that it was slow at that but in my disk it deletes files instantly and I mean big files 3 GB or more (when I umount the drive then it umounts it instanlty so it doesn't seem to delete the files during umount).

BTW whenever I write files in the xternal drive, it uses almost whole of my CPU and I can't do other things simultaneously. Is this normal?

----------

## MaximeG

Hi,

For the deletion performances as drawback for XFS, it's when you deal with a _lot_ (and small) files. When deleting one big file, well it takes virtually no time obviously, although it's actually longer than deleting with ReiserFS for example.

Deleting a file doesn't mean "removing the bits from actual drive", it just means "removing the inode entry for this file", therefore until you rewrite something else on the sectors the file is still physically on the drive.

This drawback may however be compensated with tweaks on the file system though, but you will never notice it when dealing with a few big files.

Then, indeed, you're limited by the USB speed if you're using an external drive, the speed gain is only visible when the bandwidth is large (i.e. internal)

And, XFS is a serialized filesystem, meaning that it will perform a lot of operations on your CPU to achieve it. (And that's partly why XFS is faster than ext3).

Again, it's something you can tweak.

Regards,

Maxime

----------

## Apopatos

Thank you MaximeG for your quick answer.

Actually I'm using firewire2 for the connection shouldn't the speed be higher? And this amount of CPU usage was that much when I had formated the external drive with ext3 as well.

Also, for a desktop system like mine who cares only for multimedia and storage, would be worthy to format both / and /home partitions with xfs?

thanks

----------

## MaximeG

Hi,

You won't gain that much with transforming / to XFS, and it may a bit more difficult to configure grub.

But /home may be a good idea indeed. It depends on what you're doing with this partition. If you're handling big files (download, games, mpeg conversion ... ) like me, go for it !. If it's just to keep some config file for your applications, then it's not really important.

If you're tired of ext3 for these partitions, you may as well consider ext4 which is excellent performance wise compared to its aging parent. I'm sticking with XFS for pure data stuff however, I just love it  :Wink: 

For the CPU load, ext3 will grab some CPU cycles as well, that's for sure but less than XFS, although I a bit surprised it hogs your CPU. ext3 should be light, slow but light.

I reckon it's more because of the firewire you have such a phenomenon than because of the filesystem in itself.

Regards,

Maxime

----------

## Apopatos

 *MaximeG wrote:*   

> If you're tired of ext3 for these partitions, you may as well consider ext4 which is excellent performance wise compared to its aging parent. I'm sticking with XFS for pure data stuff however, I just love it 

 

They are in reiserfs right now. Formated them 4 years before when I installed gentoo and stayed like this, so difficult to format the / partition but I think I'll try the /home. I hope only I wont have problems with the files' permissions for the different users.

I dunno about ext4. In benchmarks (phoronix and such) I see it's even faster thn xfs in writing but around the internet I read all the time about data lose and such. Maybe I'll wait for 6 months still before I try this filesystem.

thank you

----------

## MaximeG

Hi,

That's partly why I keep my "important" data on XFS.

But ext4 is really usable for the moment, and actually I find ext3 so old and heavy compared to XFS that I couldn't wait and modified it to ext4  :Wink: 

You're welcome,

Maxime

----------

## Apopatos

PS: Just deleted a directory from my external xfs drive. Size 8.2 GB with 5444 files (both folders and others) from few kb to 200 MB. It deleted it instanlty. SO...

*Apopatos runs immediately to format his /home partition to xfs... you'll hear from him soon or not at all...*  :Razz: 

----------

## sera

 *Quote:*   

> The speed is 28-34 MB/s with both ext3 and xfs and I wonder if this is the maximum limit for my drive/firewire.

  Firewire has 400 Mbps or 50MB per second raw throughput. Above 30MB real data transfer rate doesn't sound that bad.

----------

## Apopatos

I have firewireII. So it should be double, shouldn't it?

----------

## pigeon768

~30MB/s is about right for an external firewire drive.

IMO, xfs is a bad choice for /home. Most of your home directory is a bunch of tiny, hidden config/settings files that get opened and modified repeatedly. XFS has too much overhead IMO.

----------

## Apopatos

I wrote a single file 3.5GB fromhome to external (both xfs) and the speed was 24-30 MB/s

and from external to home the speed was stable at 38.8 MB/s.

Actually I have thousands of pictures and videos in my home directory and their number improves day by day and the seek time to open a folder with a lot of them with reiserfs didn't satisfy me. That's why I reformated to xfs. I'll know for sure if I did right when I put back all of my files and begin to work   :Smile: 

----------

