Re: Upgrading datastructures between different filesystem versions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 28, 2007 at 03:11:00PM +0200, Erik Mouw wrote:
> There are however ways to confuse it: if you reformat an ext3
> filesystem to reiserfs (version 3), mounting that filesystem without
> "-t reiserfs" will trick mount(8) into mounting it as an ext3
> filesystem (which will usually fail). This is because the ext3
> superblocks lives at offset 0x400, and the reiserfs superblock at
> 0x8000. When you format a partition as reiserfs, it will not erase old
> ext3 superblocks. Before looking for a reiserfs superblock, mount(8)
> first looks for an ext3 superblock. The old ext3 superblock wasn't
> erased, but usually most of the other ext3 structures are and so
> mount(8) will fail to mount the filesystem. Don't know if this
> particular "bug" is still there, but it has bitten me in the past.

This is easy to fix, though.  Quoting mkfs.xfs:

	/*
         * Zero out the beginning of the device, to obliterate any old
	 * filesystem signatures out there.  This should take care of
	 * swap (somewhere around the page size), jfs (32k),
	 * ext[2,3] and reiserfs (64k) - and hopefully all else.
	 */
	buf = libxfs_getbuf(xi.ddev, 0, BTOBB(WHACK_SIZE));
	bzero(XFS_BUF_PTR(buf), WHACK_SIZE);
	libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);
	libxfs_purgebuf(buf);

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux