Contig like tool for linux?
#1
Posted 10 February 2009 - 12:05 AM
Offline ext2 defragmenter, e2defrag, exists but requires that the ext3 filesystem be converted back to ext2 first. But depending on the feature bits turned on in the filesystem, e2defrag may destroy data; it does not know how to treat many of the newer ext3 features.
There are userspace defragmentation tools like Shake and defrag. Shake works by allocating space for the whole file bolt upright and hoping that it will make the newly allocated file less fragmented. It also tries to write files used at the same time next to each other. Defrag works by copying each file over itself. However they only work if the filesystem is reasonably empty. A true defragmentation tool does not exist for ext3.
http://en.wikipedia....Defragmentation
The Ext4 filesystem will have an online defragmenter:
http://en.wikipedia.org/wiki/Ext4
#2
Posted 10 February 2009 - 08:25 AM
http://fedorafastboo...orge.net/Defrag
never worked correctly and it seems like abandoned.
There was a beta from OO:
http://web.archive.o...inux/index.html
http://ubuntuforums....hp/t-50127.html
but it seems like it vanished form the scene.
Maybe, just maybe, this is a new start:
http://polishlinux.o...ux-filesystems/
though it seems not "low-level" as it should be needed
Then there is defragfs:
http://sourceforge.n...ojects/defragfs
seems as well stopped/no more developed, and however it seems like for ext2fs only as well.
jaclaz
#3
Posted 10 February 2009 - 01:16 PM
#4
Posted 10 February 2009 - 03:21 PM
Even if you copy an image file to an empty ext2 partition, the file might be non-contiguous.
So if you need a filesystem to store images for grub4dos emulation, you may use FAT/NTFS, or you can simply use a whole raw partition.
#5
Posted 10 February 2009 - 03:54 PM
What do you mean with a RAW partition? Do you mean write the image with the dd command to a partition without a filesystem?
#6
Posted 10 February 2009 - 07:11 PM
Will linux make, continuous files when writing to fat or NTFS?
It will make continuous files when MS filesystem has no holes; no matter whether the OS is Linux, Dos or Windows. What are holes here I mean? If you delete a file, then possibly there will be holes in the filesystem. If you write a file to an empty FAT or NTFS filesystem, then the file will be continuous. If you continue to write other files(sequently, one after another) without deleting any one, then all the files will be still continuous. But no luck for ext2fs.
What do you mean with a RAW partition? Do you mean write the image with the dd command to a partition without a filesystem?
Yes. So this is less useful than using FAT or NTFS.
#7
Posted 08 January 2014 - 03:11 PM
Dear tinybit.. or others.. sorry for reviving this topic.. but i have a question regarding this workaround of tinybit..
How do i write from Ubuntu an image (VHD) to a filesystemless partition?
If i get it right, i must delete a partition in GParted or so .. (right?) and then use this dd command to write the VHD to this (deleted) partition? (right?)
But.. What is the exact ubuntu/linux shell command for this to do it?
Maybe this is a solution to my problem...
Edited by ScarySpons, 08 January 2014 - 03:12 PM.
- crashnburn likes this
#8
Posted 08 January 2014 - 11:36 PM
You know what a whole drive is, and what a partition is, surely.
A partition is a contiguous area. It has a starting sector and a length. The starting sector is usually the Volume Boot Record, or sometimes called Super Block. If you do not want to create a filesystem for this partition, then the VBR or SB is no use, and you can simply place your data on it.
A raw partition means a partition that (itself) is only created but not yet built any filesystem(on the partition). "raw" means "bare".
The whole partition (whether or not it is raw) can be considered(and accessed) as a file(and surely contiguous). In grub4dos, the "file name" for the partition can be "(hdM,N)XXXXXXXX+YYYYYYYY". In linux, the file name or device name for the partition is somewhat like "/dev/hda1".
"cat --hex Filename_for_your_partition" (in grub4dos) and "hexdump Filename_for_your_partition" (in linux), both will show the same data for you.
#9
Posted 12 January 2014 - 10:26 AM
but how do i write/place my vhd to this 'raw partition' ... what's the linux command for this?
i can't get to find that out... or can i do it via an XP live too? Some tips on this would be welcome...
#10
Posted 12 January 2014 - 04:24 PM
With DD on Linux and DD for Windows on Microsoft Windows.but how do i write/place my vhd to this 'raw partition' ... what's the linux command for this?
i can't get to find that out... or can i do it via an XP live too? Some tips on this would be welcome...
dd if=/path/to/my.vhd of=/dev/sdXYWhere sdXY is the device-name of the destination partition (not the whole disk!).
- ScarySpons likes this
#11
Posted 13 January 2014 - 02:08 AM
Thanks alot for now guys!
#12
Posted 14 April 2017 - 05:44 AM
So any consensus on this for the Ext3 volumes? Which is best/ stable/ reliable?
#13
Posted 14 April 2017 - 02:51 PM
I guess that BEFORE establishing which is best/stable/reliable wee need some consensus of what is the list of the "which".
The list made in 2009 (eight years ago) may need to be updated.
My guess is that for ext3 nothing has changed, whilst for ext4 something may have, check this thread here:
https://www.spinics....4/msg43074.html
Wonko
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users