LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   raid1 and hibernate (https://www.linuxquestions.org/questions/slackware-14/raid1-and-hibernate-787309/)

noobuser 02-05-2010 04:57 PM

raid1 and hibernate
 
Hi,I'm a new slackware user.
I'm trying to build my mediacenter xbmc with Slack 13.
I've an Amd system with 2 disks configured in raid1.
A / partition as md0, /home partition as md1 and swap as md2
It works everything fine, also suspend to ram (S3) ,but not hibernate(S4).
My problem is that during restart ,the kernel sees the swap partition (md2) "dirty" and starts immediately the background rebuild deleting my suspended image.
What I should do to fix this issue?Is there some kernel parameter to put in lilo.conf?
In lilo.conf I have these parameters:

Code:

boot = /dev/md0                                                                                       
raid-extra-boot=mbr-only                                                                             
compact        # faster, but won't work on all systems.                                               
# Bitmap in BMP format: 640x480x8                                                                     
  bitmap = /boot/slack.bmp                                                                           
# Menu colors (foreground, background, shadow, highlighted                                           
# foreground, highlighted background, highlighted shadow):                                           
bmp-colors = 255,0,255,0,255,0                                                                     
bmp-table = 60,6,1,16                                                                               
 
bmp-timer = 65,27,0,255                                                                             

# Append any additional kernel parameters:
append=" root=/dev/md0 vt.default_utf8=0 resume=/dev/md2"
prompt
timeout = 50
vga = 773
# vga = normal
# ramdisk = 0    # paranoia setting

image = /boot/vmlinuz-2.6.32.7-smp
  root = /dev/md0
  label = 2.6.32.7
  read-only

# Linux bootable partition config ends

If you need any other info ,just ask :)
Thank you

ivandi 02-06-2010 09:20 AM

You do not need to put the swap on raid device. Just add your two swap partitions to fstab and the kernel will use them in parallel.

noobuser 02-07-2010 04:30 AM

Quote:

Originally Posted by ivandi (Post 3854772)
You do not need to put the swap on raid device. Just add your two swap partitions to fstab and the kernel will use them in parallel.

You mean that the kernel will write the same data on BOTH the swap partitions?
I don't think.I'm looking for redundancy also on swap.If I hibernate my system on /dev/sda3 and the next time I resume my system,/dev/sda is dead,I'll lost my system image.

I've found the way anyway,using initrd.The only problem is that the resume is very slow.Probably there is still some recovery of /dev/md2 during resuming.Slackware's initrd script doesn't manage the md_mod.start_ro parameter.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=415441

I need to understand how to add that option.

ivandi 02-07-2010 11:46 AM

Never tried it myself but may be you should use a swap-file.

filefrag -v /swapfile should return the resume_offset (step 2).

noobuser 02-09-2010 07:04 AM

Quote:

Originally Posted by ivandi (Post 3855792)
Never tried it myself but may be you should use a swap-file.

filefrag -v /swapfile should return the resume_offset (step 2).

Thanks for the hint.
I've tried,but I have some problem to manage correctly the resume paramters for the kernel.I think that initrd script doesn't manage correctly the parameters for swap over file.Infact the system at boot time fails looking for the swap file (UUID device not found),but I could be wrong.

Anyway now I'm able to resume correctly from swap device on partition /dev/md2,adding the parameter
Code:

echo 1 > /sys/module/md_mod/parameters/start_ro
in /init script of initrd image.The only problem is that it's really slow,more slow than cold boot.On a single disk configuration (no raid then) it works fine.
Do you have some idea about this problem?


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