Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an Ubuntu home media server setup with 4.5TB split across a few hard-drives (1x3TB, 2x1TB) and I'm using LVM2 to manage the volumes. I have recently added a 60GB SSD to my server, and I wish to use it to house the 'root' partition of my server (which is currently under the LVM group).

I don't want to simply add it to the LVM volume group, because (afaik) there's no way to ensure that the SSD will be used for the root filesystem. If I just throw it at the VG, it may be used to house my media, which would defeat the purpose of having the SSD in the first place.

I feel that my only solution is to somehow remove my root partition from the LVM setup and copy it across to the SSD. My boot partition is, of course, not part of the LVM group.

My disk setup is as follows:

60GB SSD: EMPTY.
1TB HDD: /boot, LVM space.
1TB HDD: LVM space.
3TB HHD: LVM space.

I have a few logical volumes. my root (/), a 'media' volume for my media collection, a backup one for my network backups.etc.

Does anyone have any advice as to how to go about this? My end goal is to have the 60GB SSD used for my boot and root partitions, with everything else on the 3TB/1TB/1TB hard-drives.

share|improve this question
    
What I usually do in these situations is to boot with SystemRescueCD, create the new partitions, copy the content of the old ones to the new ones with FSArchiver and finally install grub on the new disk. It's usually a fairly smooth procedure. –  Pedro Romano Nov 13 '12 at 8:51
    
how much space are you uisng? you can try to mv all data to one disk with pvmove and than detach the other devices from your lvm. –  l1zard Nov 13 '12 at 9:10
    
@l1zard: I'm using about two thirds of the space. Why would it be necessary to move the data away from one of the drives? I don't follow. –  Kye Nov 13 '12 at 9:12
    
BTW, there is a way to ensure the SSD will be used for root lvcreate -n root VG PV where PV is the name of SSD device. –  Martian Nov 16 '12 at 9:06
add comment

2 Answers

I can't understand the struggle here. This is fairly straight forward.

1.0 cfdisk two partitions on the SSD
1.1 (optional) make a PV out of the non-boot partition
1.2 mkfs on the root and boot partitions

2.0 boot Knoppix (or whatever), mount your filesystems
2.1 rsync -av /old/boot /new/boot and /old/root /new/root

3.0 grub - start shell
3.1 (optional) device (hd0) /dev/ssd
3.2 root (hd0,0) - where hd0,0 is the boot partition of SSD
3.3 install (hd0)

4.0 update /boot/grub.conf

5.0 boot.

6.0 delete old logical volumes

If this is insufficient, please let me know and I'll work in a few more steps or explain the steps in more detail.

share|improve this answer
add comment

In the end, I followed Pedro's instructions.

What I usually do in these situations is to boot with SystemRescueCD, create the new partitions, copy the content of the old ones to the new ones with FSArchiver and finally install grub on the new disk. It's usually a fairly smooth procedure.

He answered as a comment so I can't mark it as an answer.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.