Hello! > I'm presently trying to shuffle and resize several partitions on a disk device > without losing data.
My answer to this is NOT authoritative, that is, I haven't looked at the code. However, in general, partitioning doesn't move data about; it merely updates a small file which delineates the sets of diskblocks that comprise each partition. The filesystem lays out the the blocks of its partition in accordance with it's policy - the filesystem on /proc is very different to those on /usr, or /, or /var which are in turn very different from that on /msdos. The *nix data partitions (/, /usr, /var, etc.) are layed out with a set of i-nodes at the beginning of the partition (or sets of i-nodes scattered throughout) each of which point to the individual blocks (or sets of blocks) which hold the file. The policy (or format) for msdos is very different, and unknown to me, as are the formats of /proc, etc. Yes -- and I'm looking for filesystem-specific tools that will shrink an ext2fs and a vfat partition. But wouldn't resizing be simple to do in principle? (Defragment the filesystem and move everything to the front of the partition, then change the total number of blocks in the superblock?) > Can the ext2fs resize itself? > That is, can the filesystem shrink or grow in size to accommondate a resized > partition? Is there a tool to do this? > > Can the ext2fs move itself? > If the whole filesystem is moved up or down (relative to the start of the > partition), will it still work? Thus partitions aren't easily moved or combined without foreknowledge of the format of the content. Thus, you need to backup each of the partitions involved, re-partition, and restore the backups to the now empty, new, partitions. HTH. Unfortunately, the problem over here is that backup isn't really feasible. (It's also, theoretically, a very redundant operation.) And wouldn't _moving_ also be simple to do in principle? (Make all filesystem references to disk blocks relative to the superblock, not the start of the disk.) -- Ian!! Pobody's nerfect! -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]