LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Remove Old HD put in new HD (https://www.linuxquestions.org/questions/linux-hardware-18/remove-old-hd-put-in-new-hd-331027/)

sparckis 06-06-2005 07:48 PM

Remove Old HD put in new HD
 
Hi,
I need to remove a current hard drive and insert a new one. I want to make sure that the old hard drive does not have any data on it. My system currently has 1 windows sata drive, 1 80 GB and a 12 GB. The 12GB is going to my sister. The problem is I don't know wether my 12 GB hard drive has any data on it or not. When I run df I get this

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
87793968 9923700 73410544 12% /
/dev/hda1 101086 25687 70180 27% /boot
none 517636 0 517636 0% /dev/shm
/dev/sda1 117210208 106434768 10775440 91% /mnt/Windows

I don't know what the /dev/mapper/Vol.... thing is doing for me. I usually see lines like /dev/hda1 /dev/hda2 /dev/hdb1 etc. I have FC3 with kernel 2.6.11-1.14_FC3.
If I run fdisk I get

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 9729 78043770 8e Linux LVM

Disk /dev/hdb: 13.6 GB, 13613064192 bytes
255 heads, 63 sectors/track, 1655 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 1655 13293756 8e Linux LVM

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 14592 117210208+ 7 HPFS/NTFS


So i know these drives are recognized in their current sizes. Can anyone explain the mapper, tell me how to disable it (if possible), move the data from the 12 GB to the 80 GB, and how to remove the hard drive safely from linux without causing any problems (unmounting etc)? My goal is to not have to install FC3 fresh...again?

Here is my /etc/fstab file if that helps

# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/dev/sda1 /mnt/Windows ntfs ro,umask=0222 0 0
/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,fscontext=system_
u:object_r:removable_t,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,fscontext=system_
u:object_r:removable_t,managed 0 0


Thanks in advance!

jiml8 06-07-2005 07:15 PM

Looks like that /dev/mapper is the same as /dev/hda2. If you check /dev you'll probably find /dev/hda2 is symlinked to /dev/mapper/blah blah. Your file system on hda2 is Linux LVM which is a "logical filesystem" that can be dynamically resized while Linux is running. I have never used it and don't know how to resize it. Look here:

http://www-106.ibm.com/developerwork...library/l-lvm/

In any case, you can do everything you want to do using the dd command. You should look it up and review it.

Because of my unfamiliarity with LVM, I hesitate to tell you how to proceed; my thought would be that resizing hda2 to make room on the end of hda is what you want to do, but I am not sure of the ramifications and don't feel comfortable offering to experiment on your system via a message board (though I wouldn't blink at doing it if I was sitting in front of it).

Once you figure out how to free the space on hda, I can show you how to get all the data off your 12 gig drive and how to erase that drive.

sparckis 06-07-2005 07:34 PM

Hi,
Here is what I have in /dev that references to the VolGroup thing
root -> /dev/VolGroup00/LogVol00

I'm not too sure what you are saying. I'd like to get rid of this LVM thing if possible. I think you want me to find some free space on hda1, format it to ext3, dd all my dat over to it, and partition the remaining LVM.

Is this correct?


All times are GMT -5. The time now is 05:16 AM.