> who got experience or an "estimate for results" for the following plan:
Sorry -- only the latter ... :-(
> I have used Partition Magic 4.0 several times on non-raid systems.
> I didn't encounter any trouble shrinking, expanding, creating or moving
> ext2fs Partitions.
Did you ever move a primary to a logical ?
> 1. Backup the md1 (all Data) Device
Good idea ... :-))
1.5) run resize2fs on md1, while still running Linux.
This "should" work for RAID[0134], but not linear ...
> 2. Boot the server from a DOS Disk with Partiton Magic ("PM").
Personally, I'd use fdisk rather than Partiton Magic, as you can do it all
from Linux without rebooting until the deed has been done (to re-read the
partition table, which needs a rebbot -- real bummer that !!!!).
> 3. Shrink the sda3/sdb3 Partitions by 1 GB.
So long as they are not linear this "should" be fine if you have done "1.5)".
If md1 is RAID1, it stands some chance of working anyway ...
> 4. Move the sda4/sdb4 Partitions to the end of sda3/sdb3.
> 5. Change the Partition type of sda4/sdb4 to logical (alll four partitions
> were primary partitions)
> 6. Create sda5/sdb5 (Swap) and sda6/sdb6 (1GB each) logical partitions
sdX4 are swap, so I'd say "delete sdX4, create bigger sdX4 as ext, and create
two logical partitions".
> 7. Mark the new partitons to be mirrored as fd
> 8. Reboot Server and create md2 device
Sounds fine ...
> In particular I think about the md1 device: Will it work without rebuilding
> it after I shrinked the partitions,
I think the answer is probably "no".
1) if you are using PSBs (which I assume you are), it will have been trashed.
2) if md1 is RAID1 (you didn't specify) then the two partitions "should" be
identical (other than the PSB which you have trashed), and assuming PM
is determinstic, the result of shrinking them both "should" be the same,
so it "should" work ...
3) If md1 is anything other than RAID1, I think there is NO CHANCE !
I strongly reccommend doing "1.5)" above -- that should work for all but linear.
> but didn't change the location on the HDD?
As I understand it, as it's not bootable (LILO, grub, etc need to use absolute
block numbers) it should work if it is *just* moved.
> Therefore I am not too much used to all the RAID traps any more. But I am
> quite reluctant to kill this server. It is running so nicely.....
OK -- consider an alternative ...
1) backup all data
2) dismount and raidstop md1
3) run resize2fs on md1
ensure there is at least 8K free at the end of each partition for the PSB
(it's 4K on a 4K boundry)
4) use fdisk (or cfdisk or whatever) to
a) delete sdX4
b) create the (now larger) sdX4 as ext
c) create sdX[56], setting the partition types accordingly
5) be tidy rather than lazy -- delete swap and md1 from /etc/fstab
6) reboot (single user if plausible, otherwise multi-user)
7) mkswap, edit fstab, and "swapon -a"
8) "mkraid /dev/md1", edit fstab and "mount -a"
9) add md2 to raidtab, "mkraid /dev/md2", edit fstab and "mount -a"
NB: assuming you are using raidtools 0.90, the "mkraid" in step 8 should *ONLY*
write the PSB -- it should *NOT* destroy the data. It will waste its time
doing a "resync" if RAID[145], but that *should* be harmless if everything
was consistent in step "2)".
But hey -- you did step "1)" :-))