file storage while switching distros
I'm about to switch from BLAG (a fedora spin) to ubuntu. Is there any way to keep everything in my home folder, or is there a place where I can store like 50 gigs of music and videos for a couple hours while I switch? Or do I have to burn like 60 CDs?
|
Depends on whether or not you have /home on a separate partition. If /home has its own entry in 'mount', then you have it on a separate partition. In that case, when you install Ubuntu, you can tell the installer that that partition is /home and that it should NOT be formatted. This should preserve all of your data.
If you don't have /home on a separate partition, things get trickier. If you have an external hard drive, you could always dump it there. :P If not, you *might* be able to resize some other partitions and make a new partition for /home, then follow the above suggestion. That depends on a number of variables, though, and it's potentially dangerous even if its possible. To advise you more on that, I'd need to see the output of 'fdisk -l', 'mount', 'pvs', 'vgs', and 'lvs'. |
I don't think I have a seperate /home partition (though next time I may). I do have a windoze partition. And no external HD (or I'd use that of course)
Code:
[thirtysix@localhost ~]$ sudo /sbin/fdisk -l Code:
[thirtysix@localhost ~]$ sudo /sbin/pvscan |
Well, looks like your Volume Group is fully used. You could try shrinking the root partition and creating a separate /home, if you've got the free space. You'd have to do it from a LiveCD, of course (I'd recommend the rescue mode on the Install CD, if BLAG has a rescue mode), and you need the available space. What's the output of these two commands?
lvs df -h |
Code:
[thirtysix@localhost ~]$ df -h Code:
[thirtysix@localhost ~]$ /usr/sbin/lvs |
Strange that there are no volume groups found - you clearly have a volume group mounted. Make sure you run these commands as root.
Anyway, LogVol00 has 58 GB of free space. Assuming that's enough, we can shrink it and move /home to a new Logical Volume. I will admit now that I'm not sure how elegantly Ubuntu's installer handles LVM, though. I've only installed Ubuntu twice, and only used it for a couple months... never did anything too fancy. Hopefully someone else can attest to whether this will result in something Ubuntu can use without clobbering. Also, I'm assuming your partitions are ext3. Throw the output of 'mount' up here on your normally running system if you're not sure whether this is true. To do this, get the machine booted into a rescue mode or LiveCD (if the install disc has a rescue mode, that's preferable. It will help ensure that the tools are all versions that are compatible with your installation). When you boot, make sure you choose NOT to mount your filesystems, if prompted. Once you're at a shell, you may need to scan for lvm devices. These commands may vary a bit from distro to distro, but this will typically work: lvm.static pvscan lvm.static vgscan lvm.static lvscan lvm.static vgchange -ay Now, 'lvm.static lvs' should show your volume group. Shrink it with these commands: e2fsck -f /dev/VolGroup00/LogVol00 resize2fs /dev/VolGroup00/LogVol00 69G lvm.static lvm.reduce -L 70G /dev/VolGroup00/LogVol00 resize2fs /dev/VolGroup00/LogVol00 Notice the 3-step process there: shrink FS, shrink partition to something slightly larger, then re-grow FS. This is a sanity check that helps avoid a potentially bad situation where your FS extends past the end of your partition. Now, you can create a new Logical Volume and put a filesystem on it: lvm.static lvcreate -n home -L100%FREE VolGroup00 mkfs.ext3 /dev/VolGroup00/home Now you can mount /dev/VolGroup00/home on a temp directory, copy everything in /home over to it, and you have everything from /home on a new partition. If you're going to keep using this install for a while, I'd recommend adding an entry to /etc/fstab to have /dev/VolGroup00/home mount on /home at boot, so any changes you make go to the correct partition. |
Code:
[thirtysix@localhost ~]$ sudo mount |
and so, the commands starting at lvm.static pvscan should be typed in during rescue mode of the ubuntu CD?
|
also, can I get specific instructions for mounting the partition to a temp directory, and copying everything from home over to it. And I'm not going to be using BLAG for much longer at all, so the FStab alteration shouldn't be necessary, but I'm wondering if the ubuntu install will just know that /home is mounted there or if I'll have to add something to fstab there.
|
Yes, those commands are all from rescue mode. I thought the previous paragraph said so :)
In the Ubuntu install, you'll probably have to specify that the partition is /home, and tell it NOT to format the partition. I've never worked with the Ubuntu partition setup during install (always just accepted the defaults), so I don't know the exact procedure there. Like I said before, I don't even know how Ubuntu deals with LVM... To mount & copy the data, though, I'd do something like this: mkdir /tmp/root mkdir /tmp/home mount /dev/VolGroup00/VolGroup00 /tmp/root mount /dev/VolGroup00/home /tmp/home cp -pR /tmp/root/home/* /tmp/home/ umount /tmp/root umount /tmp/home |
All times are GMT -5. The time now is 04:16 PM. |