This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
To: balug-talk@balug.org From: Rick Moen <rick@linuxmafia.com> Subject: Re: [Balug-talk] resize partition without losing Date: Thu, 7 Mar 2002 11:24:24 -0800 Quoting Paul Larkin (larkin@jps.net): > I went to Parted web page. It says: -for ext2. What about ext3? So, the one distinctive thing about ext3, compared to other filesystems, is that you have an automatic fallback option to ext2. ext3 is just ext2 with a journal. Step 0: Make a backup. Make a second backup. Test your backup (which requires doing a restore). Step 1: Remount the filesystem as type ext2. Step 2: Do the PartED thing. Step 3: Mount your new partitions as ext2. Initialise ext3 journals on them. Step 4: Remount them as type ext3. Of course, if you've already made backups, and you trust them, then why on earth do you need a "non-destructive" repartitioning tool? If you _don't_ have backups, either you don't care about your files, in which case just blow them away, or you need to make backups you can trust. http://linuxmafia.com/pub/linux/backup/ http://kmself.home.netcom.com/Linux/FAQs/backups.html > -Is it possible to move all the files (this partition has all /usr > files) to a current existing partition? Then resize the partition > and move everything back? Sure. Why not? (Following assumes you're on Linux and thus have the GNU version of cp. It also assumes a destination directory exists.) Step 0: Go to single-user mode. ("init 1") Step 1: "cp -ax /usr /var/for-safekeeping" Check the results. Step 2: "umount /usr" Step 3: Use cfdisk or fdisk to blow away the /usr partition, then remake it at the desired size. Step 4: "mount /usr" Step 5: "cp -ax /var/for-safekeeping /usr" There are quite a few other tools that would suffice. I personally like rsync. Some people like GNU tar. Fans of twisted syntax might use afio or cpio. > Are there links that would get lost if I tried that? You mean symbolic liks? The "-a" option to GNU cp means (among other things) that symbolic links will be replicated, and not dereferenced. > Or would it work at all, given there may be files in /usr that will be > needed to run the OS? thanks. If you're nervous about this, then heed the above advice about backups. ;-> ===