LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-09-2012, 04:27 PM   #1
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,023

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Updating hardware but keeping disks, partitioning/mounting advice.


My system was running with:
/dev/sda1 1Gb mounted in /media
/dev/sdb1 blank unused, was a few different distros
/dev/sdb2 / root for Debian Sid 64 bit
/dev/md0 /home made up of three 320GB drives

Now I have a new system, wich will share no hardware with the old. However it will still be 64 bit and ought to be served with the same NVIDIA driver.
Am I right in thinking I could just drop the drives into the new system as they are?
How likely is it my last system failed due to a hard drive problem which would cause problems on this one? By that I mean boot never got to hard drives or USB so if it's an HDD failure it's electrical and likely to harm my new setup, so how likely is that?
I also have a new SSD which I'll want to use for my new boot and root.

My plan is to plug them all in, boot from USB installer and use SSD for root+boot, /sdb1 for /home and mount both md0 and sda in media (realising names will change). I then take it I'll just have to tell the initial installer to write to MBR, boot into the new Sid install on the SSD and run update-grub?
After that I'd move various "." folders to home (thunderbird and the like) leaving the XFCE comfig files unles I get frustrated trying to get my desktop back. Also I'd maybe uninstall Iceweasel and grab firefox from my old /opt.

Anything wrong there? Or, more likely, is there a more obvious solution I'm missing?
I'm not too bothered about losing anying, as what I need is duplicated, but it would be nice to get back to my normal desktop quickly.

Last edited by 273; 07-09-2012 at 04:32 PM.
 
Old 07-09-2012, 05:22 PM   #2
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
No need to move data from your /home. Just install Debian to the SSD, but don't connect/mount any other disks yet. Make a small partition for a temporary /home. Reboot into your new install, then edit /etc/fstab to change your /home to /dev/md0, reboot again. Now add each remaining disk one at a time, assuming these are SATA disks you can hot-plug them in (no need to reboot) but update /etc/fstab in between each step. As a matter of fact, I just did the same thing last week (save the extra disks) when the H/W on my file server died

If you want to use /dev/sdb for a new /home, create a RAID1 array, using /dev/sdb and /dev/md0 in /dev/md1 and use that for /etc/fstab. That way you don't have to copy everything over (and risk missing something important), the kernel does all the work for you

PS: to make sure you retain all applications/packages from the old setup, use the --get-selections and --set-selections options of dpkg. Use dselect to install all packages. Save the file as selections.txt in your /home directory before switching hardware.

Last edited by Dutch Master; 07-09-2012 at 05:25 PM. Reason: adding info on dpkg
 
Old 07-09-2012, 05:37 PM   #3
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,023

Original Poster
Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
I'm torn between just mounting md0 as /home, starting with a tiny home then changing on reboot and starting a new /home. The RAID is perhaps not good and I think I ought to change my default settings in /home, so I think I'm better putting home on a single partition for now. (Changed from what I said I know, so I appreciate the advice' I'm throwing ideas around)
Changing between using the old HDD and the new SSD is something I need to work out too. Thanks for reminding me about --get-selections, assuming I can boot with my old disk that could be good. I still need to work out MBR changes and stuff but it helps.

Last edited by 273; 07-09-2012 at 05:39 PM.
 
Old 07-09-2012, 05:55 PM   #4
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Is the array RAID 5? If so, the only way it could fail is when 2 disks have failed. If you change /home to a single disk, use rsync to copy its contents over from /dev/md0. However, nothing beats a proper backup solution!
 
Old 07-09-2012, 06:07 PM   #5
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,023

Original Poster
Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Yes it's a RAID5, I think it ought to be OK but it has had sync problems and is 5 years old so may not lat all that longer. The other drive Is old too but a new home could be good to clear old config files and make way for a new home drive -- getting a new clean home to copy to a new drive.
I do have a backup of most things, but hidden files and directories I'm not sure I ought to keep anyhow.
Thanks, you're making me consider the options and reasons .
 
Old 07-09-2012, 07:04 PM   #6
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
I have SATA disks in use that have run >20,000 hours (mostly 24/7) and not a hint of degradation. Key is to get a report from the smartmontools to assess the health of the disks involved. Install Webmin and check it from there, it's the most convenient option (even on a desktop, although it'll work just as fine remotely!)
 
Old 07-09-2012, 08:27 PM   #7
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,023

Original Poster
Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
SMART tools showed only one disk with a couple of bad sectors, so I think they will be OK for now. Long term though I think they've had too many power cycles if nothing else -- running in a home PC switching on and off every day I think is more stressful than a server running constantly at the same temperature for a similar period. The RAID did seem to rebuild a few times but I could put that down to software.
 
Old 07-10-2012, 07:09 PM   #8
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,023

Original Poster
Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Thanks for the suggestions. I've managed to keep the RAID for media and use the other partitions as I wanted. Looking at disk utility the drives do look fine so perhaps they will last.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Celebrity advice on keeping your Linux desktop secure LXer Syndicated Linux News 0 01-26-2008 06:40 AM
Updating gcc while keeping the old version serg.kr Linux - Software 2 07-13-2007 12:29 AM
SAS & partitioning of disks rblampain Linux - General 2 05-14-2007 06:48 AM
Partitioning harddrive + Keeping Linux? Schreiberling Linux - General 2 03-14-2007 01:51 PM
General Advice on keeping your files structured and clean. hamster Linux - Software 2 04-10-2003 10:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration