LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Add an extra hard disk to an existing one without data loss and use them as single??? (https://www.linuxquestions.org/questions/linux-hardware-18/add-an-extra-hard-disk-to-an-existing-one-without-data-loss-and-use-them-as-single-549429/)

nics 04-27-2007 05:27 AM

Add an extra hard disk to an existing one without data loss and use them as single???
 
hello everybody!!!
i just like to inquire if we could add an extra hardisk to an existing one and make them work as single hard disk without making raid 0.coz as far as i know if we make raid 0 we need to format both hard disks causing data loss...
the existing harddisk is nearly full containing significant data..so we can't lose the data in it anyway...
is any other solution possible

nics 04-27-2007 05:27 AM

Add an extra hard disk to an existing one without data loss and use them as single???
 
hello everybody!!!
i just like to inquire if we could add an extra hardisk to an existing one and make them work as single hard disk without making raid 0.coz as far as i know if we make raid 0 we need to format both hard disks causing data loss...
the existing harddisk is nearly full containing significant data..so we can't lose the data in it anyway...
is any other solution possible

Brian1 04-27-2007 06:38 AM

Yes you can with the use of LVM partitions. Check that out. Not knowing your distro and current setup, it can be easy or take some time. If current drive is not LVM then you will need to make the second drive one large LVM partition and create LVM volumes with in it matching or larger than current used linux partitions. Then copy the data over to them. Next unmount old partitions and bring the new volumes up as the same directory as the old. Now you can repartition the old drive and either move them back or leave them where they are. One thing to leave as a standard ext2/3 partition is the /boot partition and leave on the main drive.

Brian

MensaWater 04-27-2007 10:03 AM

The only way to use them as a "single" is to either do RAID or LVM and in either case to maximize usage you'd have to "reformat" (not actually what you do but close enough for this discussion) unless it was already in a RAID or LVM setup. Some distros automatically lay out things as LVM if the drive is large enough.

Run "df -h" to see what you have mounted. If you see "VolGroup" somewhere the device side of the df then it means you're using LVM already and can expand the Volume Group fairly easily.

However you don't have to use them as a "single". You can add the second disk and add its space to the system. You could then migrate your important files to that space leaving your OS, swap, /tmp on the original disk. So if you had a single mount (/) but all the key files you want are in a directory called /importantstuff you could setup the new drive. mv /importantstuff /importantstuff.old then mount the partition (or logical volume) from the new drive as /importantstuff then copy all the files from /importantstuff.old to /importantstuff. Once you were sure everything were operational on the new /importantstuff you could remove /importantstuff.old to free up the space on the original drive.

jtshaw 04-27-2007 03:57 PM

I merged the duplicate threads...


All times are GMT -5. The time now is 03:17 PM.