I have an interesting problem.
Linux box.
/, /boot, swap on 3 RAID1 partitions
2 disks
currently RAID is degraded, just using 1 750G disk.
/ (ext3) is 700G, only 200G used.
No LVM.
I added a 500G SSD. I want that to be the new 2nd RAID1 disk.
I need to shrink / to be ~450G before I can do this.
resize2fs can only do shrink on unmounted. That's a problem. RAID1 can
shrink the RAID block dev once I get the fs shrunk, so that's not a
problem.
I'm offsite and want to find a way to do this without going onsite and
using single-user mode or a boot cd.
Options?
I guess I could make a new, smaller RAID1 / on the SSD, quiet down all
services, and do a cp -a or cpio or something? Then get the system to
boot off the new / and ignore the old one, and reboot. Besides in theory,
has anyone actually do a whole cpio or cp -a of an entire *running* / and
been successful? Sample command lines? I guess nowadays there would be
zero dev files that need to be copied because udev recreates them all? So
it's literally just files, dirs, links and fifos that need copying?
Any options using just ext3 and mdadm tools? Surely there must be some
way... unless the no-shrink-mounted makes that impossible.
Maybe I'm missing something.
Thanks!