Operating System - Linux
1829921 Members
2322 Online
109993 Solutions
New Discussion

Re: install new disk and retain the data on that disk

 
SOLVED
Go to solution
Martha Mueller
Super Advisor

install new disk and retain the data on that disk

Greetings!
Like many others, I am learning linux from an HP-UX administrator's point of view. My question of the day concerns installing a disk that contains data, and keeping that data. In HP-UX, I would use the vgexport command and then vgimport. The current installation of linux is not using lvm. If I have data from an hp-ux environment that uses lvm, raw though, no filesystem on this logical volume, can I present this data to the linux server after moving the disk into the linux server? Would it work if the linux server is also using lvm?

Any general knowledge is appreciated.
9 REPLIES 9
John Poff
Honored Contributor

Re: install new disk and retain the data on that disk

Hi,

It doesn't sound like it would work. Even if your Linux system is using LVM, it is a different implementation of LVM and probably wouldn't recognize the disk.

I've never tried anything like that before, so I can't say for sure if it would work, but it doesn't sound good. You might be able to put the disk in and then use 'dd' to try to pull the raw data off the disk, but that would be tricky.

JP
xyko_1
Esteemed Contributor

Re: install new disk and retain the data on that disk

Hi Martha,

first of all I need some details.

Your new disk came from a linux system ? What is the file system type ? The server that will receive the disk is an Intel one ? What distro is running on it ? How will you install the new disk, on a new scsi contrller Iis it scsi or ide ?) ?

If your disk is origilaly from a linux system and the filesystem is supported on the new system, everything will work fine and after the boot you will just have to mount the disk (all the partitions/filesystems) and access it.

regards,
xyko
Martha Mueller
Super Advisor

Re: install new disk and retain the data on that disk

This is just a hypothetical question. We have several HP-UX servers all sharing a symmetrix. I can move data around by first assigning a lun to hp-ux server A, then creating a logical volume on this lun. run the vgexport to write information to this lun. Then move this lun from hp-ux server A over to hp-ux server B, and run the vgimport to have the data be available to server B.

Is there anything comparable in linux? As was already pointed out, the lvm might not be compatible, so this might not work.

Just trying to find which tools are portable between hp-ux and linux.

thanks
xyko_1
Esteemed Contributor

Re: install new disk and retain the data on that disk

Martha,

as far as I know the lvm implementation on linux is based on hp-ux lvm. I think that you will may take quite the same steps. I think there is vgexport and vgimport on linux lvm. I don't use lvm on linux because I'm running RedHat As 2.1 and it does not support lvm. If you just want another device, not part of a lvm, you just need to unmout the symmetrix disk from the original system, remove the zooning for security reasons, make a new zooning between the new server and the required disk, probe the scsi again (rmmod and insmod the module that supports the fibre chanell adapter will work but you cannot have mounted luns on it), mount the new device and go on.

Hope it helps.
xyko
Martha Mueller
Super Advisor

Re: install new disk and retain the data on that disk

This is great information. But can you explain more about "probe the scsi again"?
I'm not familiar with this, and I appreciate the warning about not having other luns on it. I think that this makes it necessary to do at a downtime, though. We only have the two fibre channel cards (primary and failover), so all the luns are on the same path. In hp-ux, I can run the ioscan command to find the new hardware.

thanks
Martha Mueller
Super Advisor

Re: install new disk and retain the data on that disk

Oh, and for anyone else following along, I found a reference on red hat's site in the system administration guide for the need to use "devlabel" command. "If a hard drive is physically moved to a different location in the machine, is removed, or fails to initialize, some of the device file names will change, potentially leaving device name references invalid. For example, if a system has 3 SCSI hard drives, and the second SCSI hard drive is removed, /dev/sdc becomes /dev/sdb, causing any references to /dev/sdc to become invalid and any references to /dev/sdb invalid as well since it is a different drive"

Do a man page on devlabel for details.
xyko_1
Esteemed Contributor
Solution

Re: install new disk and retain the data on that disk

Martha,

we don't have any command similar to ioscan in linux (as far as I know), so you have to reboot your server or to remove and reload the driver associated to the fibre channel controler (you may have a qlogic or emulex card).

Doing a lsmod command you can see all modules (drivers) loaded in your system. For qlogic you may have qla2300 module and if the controller is emulex the driver is lpfcdd. So for qlogic you do rmmod qla2300 and after modprobe qla2300. For emulex the same commands changing the module name. But please dont't forget to unmount all devices associated to the controler before rmmod. The command does not work if the device is busy. You may see if there is any busy device using the module using lsmod. If the "used" field is not zero, so you have busy devices.

regards,
xyko
Martha Mueller
Super Advisor

Re: install new disk and retain the data on that disk

OK, that helps clear things up.
Martha Mueller
Super Advisor

Re: install new disk and retain the data on that disk

.