LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   FC5 to FC6 and hard drive upgrade at the same time - problem getting old data (https://www.linuxquestions.org/questions/linux-hardware-18/fc5-to-fc6-and-hard-drive-upgrade-at-the-same-time-problem-getting-old-data-561380/)

neddis 06-13-2007 12:24 AM

FC5 to FC6 and hard drive upgrade at the same time - problem getting old data
 
I run a linux box to host the my documents files for a couple of windows computers at home. I was running FC5 with kernel 2.6.20-1.2316.fc5 and a Maxtor 60GB hard drive. It was pretty much filled to the gills so I got a Seagate 250GB to replace it and I thought I would upgrade to FC6 while I was at it. I installed FC6 on the Seagate(new) drive and put the Maxtor(old) in a USB enclosure and thought it would be easy to just mount the USB drive and copy stuff off of it. It didn't quite work that way. So put the Maxtor back in the computer and still can't get it to mount the partition with all of the data on it. it will mount the boot partition just fine, but can't determine the filesystem of the hdb2 partition. Anyway, what do I do to get my data off of the old drive? Thanks in advance! Oh yeah - I'm still kindof a newbie when it comes to linux.

Simon Bridge 06-13-2007 01:32 AM

You can mount the old root partition but you don't know how to mount any of the others?

Open terminal
enter fdisk -l (will give you a list of partitions - if unsure, show us by pasting the output here)

use mkdir to create a mountpoint in /mnt for each partition you want to mount
use mount (man mount) to mount them

eg... if the old home directories are in sdb2 then you do:

# mkdir /mnt/sdb2
# mount -t ext3 /dev/sdb2 /mnt/sdb2

Now you can browse to /mnt/sdb2 and see all the old files. You will probably need to fiddle with permissions to restore them properly.

neddis 06-13-2007 09:57 AM

That's what I tried initially. I should have known something was wrong because I thought it would be that easy. I get this error: "wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or other error."

when I do fdisk -l, under system it says "Linux LVM".

it shows up in the LVM manager as uninitialized, but when I make that maxtor drive the primary drive, it boots off of it and all of my stuff is there.

Simon Bridge 06-15-2007 04:07 AM

Quote:

when I do fdisk -l, under system it says "Linux LVM".
When you report the output of a command, copy and paste (including the command).

Since you were using LVM, you missed an opportunity to simply add the new drive to the existing setup... as LVM supports dynamic resizing.

Anyhoo, you will end up needing to mount the logical volume.
What is LVM

lazlow 06-15-2007 12:02 PM

I would strong suggest getting rid of LVM before you go to far. It is great until something goes wrong, then you are going to be in for a ride. If the first drive had been formated ext3 (standard non lvm) you could have mounted it in the usb enclosure. I know it is a PITA but I would reinstall FC6 without LVM and then copy your stuff over. If you do not, when you get a couple of years down the line, you will be stuck in the same situation again.

Good Luck
Lazow

ceilingFan 06-23-2007 06:30 PM

I am in an identical situation - upgraded from fc3 to fc6. Simon, you mention that the logical volume will need to be mounted. How should I understand that:

- there is some tool that will let me do that from the new filesystem - btw, Logical Volume Management only offered to delete all data on the other disk, nty
- I need to boot from the old drive and transfer all I need to a partition that is not under a LVM

thanks

Simon Bridge 06-24-2007 04:14 AM

The approach goes something like this:
Code:


vgscan
vgchange -a y

mount -t ext3 /dev/my_volume_group/foo /mnt/backup


ceilingFan 06-24-2007 07:08 AM

Thank you, that's what I needed. I'll keep in mind the vg* commands :study: ...

Simon Bridge 07-16-2007 10:49 PM

I have created a thread displaying my ignorance in the hope of collecting a more definitive method for handling these migrations:
http://www.linuxquestions.org/questi...29#post2826029
... I think there may be a reoccurring issue in the making here. I wonder that there are not some higher-level tools for dealing with this.

BTW: did you have any trouble with your VG's having the same name?


All times are GMT -5. The time now is 07:30 PM.