Hi ALUG,
So we've recently purchased a new server on which we intend to run Xen and hand out some virtual OSs to the students our Digital Sociology and Digital Journalism courses.
The server machine has two HDDs and I allowed the Debian installer to set up LVM using just one of the drives, leaving the other un-partitioned. I let it create swap and root logical volumes with the root logical volume taking up all the volume group space not used by swap.
Now, however, I realise that what I really wanted was a small root LV and then a large LV for Xen to use to store guest OSs which could use physical extents from both HDDs. In principle this should be a matter of:
1. Reduce the size of the / filesystem 2. Reduce the logical volume on which / is mounted 3. Create a new partition on sdb 4. Add sdb to the volume group 5. Create a new logical volume using all of the remaining space 6. Create a new filesystem on the new logical volume 7. Mount this new filesystem in the place where Xen stores its guest OSs
However, I can't resize the root filesystem while it's mounted. And now the server has been moved to the rack. Before I face the ITS staff and ask to be allowed to login locally in single user mode in order to resize the root filesystem, I wondered if there's any way to, either:
1. Resize the root filesystem while it's mounted (it's an ext3 filesystem) or;
2. Log in to the computer remotely in single user mode so that the root filesystem is mounted read-only and is thus resizable? (such as running sshd in single user mode)
I know this is total schoolboy stuff and please feel free to point and laugh. But after that, any advice would be very much appreciated.
Best, Richard
At Thu, 20 Oct 2011 13:46:51 +0100, Richard Lewis wrote:
- Resize the root filesystem while it's mounted (it's an ext3 filesystem) or;
A bit of lateral thinking from one of my colleagues provided the solution to this. "Why not just create a new ext3 filesystem on the other HDD, copy the current / to it, set GRUB to boot from that, reboot, resize the old /, restore original GRUB settings, reboot," he said (I paraphrase, but you get the idea).
Anyway, job done.
Best, Richard