LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-05-2011, 03:08 PM   #1
adrian_stephens
Member
 
Registered: Apr 2005
Location: Cambridge, UK
Distribution: KDE Neon, Proxmox
Posts: 37
Blog Entries: 2

Rep: Reputation: 1
How can I create a "slow to update" raid - to keep spindle on second disk spun down


Hello,

I have a small SDD system disk and a large data disk on a server based on fedora core. It is organized this way so that the data disk can be spun down most of the time, reducing noise and heat.

I'd like some way to periodically create a bootable backup of the system disk on the data disk, so that if the SDD goes belly-up, I lose minimal data and can very quickly bring the system up.

Some thoughts:
1. I know I can create a partition on the large disk and make the system boot from a raid0 mirror. However, the constant writes to the system disk (e.g. by the journal daemon) will ensure it never spins down.
2. I can do a periodic format and cp -ax to the "copy of system" partition, but that doesn't leave the disk bootable because it needs changes to the /etc/fstab, and possibly a mkinitrd to become bootable.
3. Or something like boot from a TFS (translucent filesystem) where base layer would be the raid, and the writable layer would be on the SDD, with periodic pushes of the writable part to the base layer (I'm not sure this is even possible).
4. In a virtual world this could be managed by appropriate location and use of snapshot images, but I'm not in a virtual world - as far as I know :0).

Ideally I'd like something like raid that only brought the copy of system disk into sync with the running system infrequently (perhaps every few hours).


Can anybody suggest how to do this?

Thankyou,


Adrian Stephens
 
Old 05-09-2011, 08:11 AM   #2
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
I did something like this on Solaris a few years back. My idea was that I wanted a bootable alternate drive that wasn't susceptible to operator messups -- in other words, if I did a configuration or update error that botched the system, it wouldn't immediately be mirrored to the other drive. I did this with a cron script that ran once a day (at 2am) and replicated the drive. I listed the script here http://www.linuxquestions.org/questi...fsdump-584857/. It might give you some ideas, but wouldn't work directly for linux.

If you were to replace pieces of that script with standard linux tools to create a bootable copy of the drive and then run it off cron, that might do the job. I was trying to google something for linux and wasn't having much luck. Maybe this will get you started and you or someone else might hit the right combination in google to find a linux example.
 
Old 05-09-2011, 09:14 AM   #3
adrian_stephens
Member
 
Registered: Apr 2005
Location: Cambridge, UK
Distribution: KDE Neon, Proxmox
Posts: 37

Original Poster
Blog Entries: 2

Rep: Reputation: 1
I'm starting to think I can do this with using a software raid.

My second hard disk mirror of the system partition (e.g. /dev/sdb2) would normally be in a raid "fail" state.

A cron job would do the following:

mdadm /dev/md0 --re-add /dev/sdb2 (re-add the disk into the raid, starts it re-synching)
(wait until /proc/mdstat shows it's in sync)
mdadm /dev/md0 --fail /dev/sdb2
mdadm /dev/md0 --remove /dev/sdb2

I've tried doing this manually, and it appears to work. Question is whether I'm putting the integrity of
my system in any danger from the repeated manipulation of the raid state.

Best Regards,

Adrian
 
  


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
[SOLVED] Single RAID 0 disk on "normal" controller - will it work? abisko00 Linux - Hardware 3 12-09-2009 03:20 PM
Kubuntu slow system -- now get "low disk space" error drjoewebb Linux - Hardware 8 08-23-2008 06:28 PM
Disk might not be spun down properly. Update shutdown utility adityavpratap Debian 14 11-14-2007 02:58 AM
Red Hat FC 3 RAID 1 Disk Boot Error "LI" najeebsyed2 Linux - Hardware 6 10-26-2007 02:41 PM
"howto hot-swap an ide-raid-disk with promise fasttrak tx2000pro" mweis Linux - Hardware 0 05-24-2004 04:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:05 PM.

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
Open Source Consulting | Domain Registration