Changing File System Without Formatting
I have a fresh Lucid Lynx (Ubuntu 10.04) running on a laptop. where I defined the filesystems as:
- mount point / on ext4 (46 Gb)
- mount point /home on jfs (63 GB)
- swap as 3 Gb
I left the machine over night to do some task, without AC power supply. next day in the morning I found it on standby, task completed, but filesystem was not reachable. it gave me I/O error
Free Download iCare Data Recovery to change RAW to FAT32 file system without formatting/losing data: Recover Data from RAW Drive Whether the digital device contains only one single file or a large amount of data, you really need to perform data recovery if you do not want to lose any file on the RAW device.
it seems that there is a problem with jfs and standby.
anyways, to avoid any hassle, I want to move this mount point from jfs format to ext4.
can I do this without losing data and without the need to place the data in a temporary location until transformation is done?
sorry to mention that, but I recall back in the windows days, we would change a FAT16 to FAT32 or a FAT32 to NTFS without having to lose the data. I hope this is available on Linux. Vision mega bra forum.
UpdateThe /home filesystem was xfs not jfs, and it seems there is a bug with this filesystem for some reason, I had to re-install the OS twice until I ended up with ext4 for the entire /
However, as a conclusion, it seems that there is no way to make a conversion
3 Answers
i am unaware of any way to non-destructively convert a file system. this does not mean it is impossible, but i would put it at very low odds.
you can, for example, convert from ext2
to ext3
without wiping the disk, and from ext3
to ext4
.
but to go from something like jfs
to ext4
seems highly improbable, without first copying your /home
files to another partition or external hard disk.
even then, you would want to create a new user on your system, with a home directory somewhere like /tmp/tempuser
or copy your configurations for your user, usually the 'dot' files (files beginning with .
) in your home directory to a new location off /home
and updating /etc/passwd
to use the new home directory, so you can log in as a normal user while you're performing this update.
then, back up your files, unmount /home
and format it using /sbin/mkfs.ext4
or whatever tool you plan to use. mount the fresh partition at /home
and copy your files back.
also, i would recommend something 'intelligent' like rsync
to copy your files, to assure you preserve your permissions and all that jazz.
fstransform converts between ext2, ext3, ext4, jfs, minix, xfs, reiserfs.
I see it in Debian repositories, so it probably is also available in other Debian-based distributions.
You can try http://tzukanov.narod.ru/convertfs/ When I used it a few years ago it worked in one case and trashed the file system in another case.
Florian DieschFlorian DieschNot the answer you're looking for? Browse other questions tagged linuxubuntuxfsext4jfs or ask your own question.
I have a 1TB external hard drive with about 800gb data of ext4 format. Is there a way of converting it to ntfs format without having to format hence losing my data?
2 Answers
As far as I know, no. Being able to convert a FAT32 drive to NTFS is an exception, not a rule, and converting from one modern, journaled file system to another to another is implausible. For that matter, you can't convert from NTFS to another FS/
Any file system operation is tricky - I suppose you could shrink the EXT4 partition, then create a small NTFS partition, move some files, and repeat until everything is moved over and the EXT partition is gone, but one mistake and its all gone.
Backing up, reformatting and copying back the data is the smart choice.
You might also want to look into ext3/4 drivers for windows if its just a matter of access. I had reasonable luck in the past with them, but I haven't worked with them recently
Journeyman Geek♦Changing File System Without Formatting Examples
Journeyman GeekChanging File System Without Formatting In Excel
It's not possible, but it certainly could be since file systems can be resized on the fly these days. That alone tells me it's entirely possible but it would probably never be recommended. 879 gigs isn't much, try managing like 11 TB.