Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-05-2011, 03:08 PM
|
#1
|
Member
Registered: Apr 2005
Location: Cambridge, UK
Distribution: KDE Neon, Proxmox
Posts: 37
Rep:
|
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
|
|
|
05-09-2011, 08:11 AM
|
#2
|
Senior Member
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197
Rep:
|
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.
|
|
|
05-09-2011, 09:14 AM
|
#3
|
Member
Registered: Apr 2005
Location: Cambridge, UK
Distribution: KDE Neon, Proxmox
Posts: 37
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 09:05 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|