Re: Best way to create RAID-6 for swap partition - existing one failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- On Thu, 19/5/11, Stan Hoeppner <stan@xxxxxxxxxxxxxxxxx> wrote:

> From: Stan Hoeppner <stan@xxxxxxxxxxxxxxxxx>
> Subject: Re: Best way to create RAID-6 for swap partition - existing one failed
> To: "Gavin Flower" <gavinflower@xxxxxxxxx>
> Cc: linux-raid@xxxxxxxxxxxxxxx, neilb@xxxxxxx, mb@xxxxxxxxxxxxx
> Date: Thursday, 19 May, 2011, 6:59
> On 5/16/2011 4:41 PM, Gavin Flower
> wrote:
> 
> > Motivation, existing RAID-6 swap partition
> failed.  I am thinking I should recreate it in a new
> format, as currently it is 'Version : 0.90', rather than
> simply rebuild it.
> <snip>
> 
> Forget using a partition.  Simply use a swap
> file.  This example creates
> a 1GB swap file in the / filesystem.  You can locate
> it on any
> filesystem you wish.
> 
> # swappoff -a
> # dd if=/dev/zero of=/swapfile1 bs=1024 count=1048576
> # mkswap /swapfile1
> # swapon /swapfile1
> # vi /etc/fstab
> Add:
> /swapfile1 swap swap defaults 0 0
> 
> and remove your old entry for the failed swap partition.
> 
> There is little performance difference between swap files
> and swap
> partitions with modern kernels.  The kernel will map
> the disk location
> of the swap file and perform direct disk access, bypassing
> the
> filesystem and buffer cache.
> 
> -- 
> Stan
> 

Okay Stan,

What obvious thing have I done, or not done, here?

What should I do now?

(I am not panicking, because I can always revert back...)

I tried to implement you suggestion, 

# swapoff -a
# dd if=/dev/zero of=/swapfile1 bs=1K count=16M
16777216+0 records in
16777216+0 records out
17179869184 bytes (17 GB) copied, 119.642 s, 144 MB/s
# mkswap /swapfile1
Setting up swapspace version 1, size = 16777212 KiB
no label, UUID=9afbf206-9a79-45b8-ad4b-148f71c440d7
# swapon /swapfile1
# cp /etc/fstab /etc/fstab-20110519

in
/etc/fstab
I replaced
UUID=654f3b90-ed2c-4de6-9f2a-e2ad65fd1af1 swap                    swap    defaults        0 0
by
/swapfile1                                swap                    swap    defaults        0 0

The log message for the swapon was:
May 19 11:27:38 saturn kernel: [38075.451398] Adding 16777212k swap on /swapfile1.  Priority:-1 extents:159 across:24068092k 


However, it failed to hibernate.  The log messages were:
May 19 11:44:43 saturn kernel: [39043.115385] sd 1:0:0:0: [sdb] Starting disk
May 19 11:44:43 saturn kernel: [39043.128453] sd 2:0:0:0: [sdc] Starting disk
May 19 11:44:43 saturn kernel: [39043.140116] sd 3:0:0:0: [sdd] Starting disk
May 19 11:44:43 saturn kernel: [39043.150889] sd 5:0:0:0: [sde] Starting disk
May 19 11:44:43 saturn kernel: [39043.165729] PM: thaw of devices complete after 756.642 msecs
May 19 11:44:43 saturn kernel: [39043.322491] PM: Saving image data pages (809839 pages) ... done
May 19 11:44:43 saturn kernel: [39094.461575] PM: Wrote 3239356 kbytes in 51.13 seconds (63.35 MB/s)
May 19 11:44:43 saturn kernel: [39094.465739] PM: S
May 19 11:44:43 saturn kernel: [39094.482407] PM: Swap header not found!
May 19 11:44:43 saturn kernel: [39094.485188] |
May 19 11:44:43 saturn kernel: [39094.706731] Restarting tasks ... done.
May 19 11:44:43 saturn NetworkManager[1501]: <info> wake requested (sleeping: yes  enabled: yes)
May 19 11:44:43 saturn NetworkManager[1501]: <info> waking up and re-enabling...
May 19 11:44:43 saturn NetworkManager[1501]: <info> (eth0): now managed
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux