Announcement

Collapse
No announcement yet.

Swap Wrangling.... yes, again...Sorry... [Solved]

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Swap Wrangling.... yes, again...Sorry... [Solved]

    I got a swap problem.

    When I originally installed Kubu 8.04, I intended to create 8 partitions, and do 'em up like this:

    sda1, sdb1, sdc1, and sdd1 were each 512mb, and I Raid-0'd them all into a 2GB partition, /md0. Was gonna use this for a striped Swap space.

    sda2 and sdb2 were raid-1'd into /md1.
    sdc2 and sdd2 were raid-1'd into /md2.
    /md1 and /md2 were raid-0'd into /md3....Raid-10! Awesome.

    BUT THEN...my Linux shaman Jake told me that the kernel does a good enough job of splitting up the swap space without needing to Raid-0 those 4x 512MB partitions. So I un-MD'ed them...that was a battle.

    So, I finally got rid of /md0, I mkswapped sda1 - sdd1, and was able to swap them on. free -m showed approx 2GB of swap...I was happy.

    However, the swap space goes away after reboot. I know what you're thinking...What about your /etc/fstab? Well, here ya go:

    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc defaults 0 0
    # /dev/md3
    UUID=21440e8f-c76c-40d1-aef3-59ffa52bc83a / ext3 nouser,relatime,errors=remount-ro,atime,auto,rw,dev,exec,suid 0 1
    # /dev/sde1
    UUID=07755cf4-a57a-458b-aa80-4990611d9956 /boot ext3 nouser,relatime,atime,auto,rw,dev,exec,suid 0 2
    /dev/scd0 /media/cdrom0 udf,iso9660 user,utf8,atime,noauto,rw,dev,exec,suid 0 0
    /dev/fd0 /media/floppy0 auto user,utf8,atime,noauto,rw,dev,exec,suid 0 0
    /dev/sda1 <mount\040point> swap noauto 0 0
    /dev/sdb1 <mount\040point> swap noauto 0 0
    /dev/sdc1 <mount\040point> swap noauto 0 0
    /dev/sdd1 <mount\040point> swap noauto 0 0
    ~

    The beginning part of the file shows how the WORKING stuff is set up, but the interesting part is at the end... do those entries for sda1 - sdd1 look right? They were automagically put in there. Can anyone help me out?

    BTW, Jake the shaman is out of town.

    **Edit: could those "noautos" in there cause my problem?


    #2
    Re: Swap Wrangling.... yes, again...Sorry...

    Open a console and type:
    Code:
    sudo fdisk -l
    Copy/paste the output. This will tell us how your HDs are setup, and what drive/partition has been designated as swap. With that information, and the fstab entries you already provided, the question can be answered.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Swap Wrangling.... yes, again...Sorry...

      Here you go.

      root@Demon:/etc# fdisk -l

      Disk /dev/sda: 80.0 GB, 80026361856 bytes
      255 heads, 63 sectors/track, 9729 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
      Disk identifier: 0xffffffff

      Device Boot Start End Blocks Id System
      /dev/sda1 1 62 497983+ 82 Linux swap / Solaris
      /dev/sda2 63 9729 77650177+ fd Linux raid autodetect

      Disk /dev/sdb: 80.0 GB, 80026361856 bytes
      255 heads, 63 sectors/track, 9729 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
      Disk identifier: 0xffffffff

      Device Boot Start End Blocks Id System
      /dev/sdb1 1 62 497983+ 82 Linux swap / Solaris
      /dev/sdb2 63 9729 77650177+ fd Linux raid autodetect

      Disk /dev/sdc: 80.0 GB, 80026361856 bytes
      255 heads, 63 sectors/track, 9729 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
      Disk identifier: 0xffffffff

      Device Boot Start End Blocks Id System
      /dev/sdc1 1 62 497983+ 82 Linux swap / Solaris
      /dev/sdc2 63 9729 77650177+ fd Linux raid autodetect

      Disk /dev/sdd: 80.0 GB, 80026361856 bytes
      255 heads, 63 sectors/track, 9729 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
      Disk identifier: 0xffffffff

      Device Boot Start End Blocks Id System
      /dev/sdd1 1 62 497983+ 82 Linux swap / Solaris
      /dev/sdd2 63 9729 77650177+ fd Linux raid autodetect

      Disk /dev/md1: 79.5 GB, 79513714688 bytes
      2 heads, 4 sectors/track, 19412528 cylinders
      Units = cylinders of 8 * 512 = 4096 bytes
      Disk identifier: 0x00000000

      Disk /dev/md1 doesn't contain a valid partition table

      Disk /dev/md2: 79.5 GB, 79513714688 bytes
      2 heads, 4 sectors/track, 19412528 cylinders
      Units = cylinders of 8 * 512 = 4096 bytes
      Disk identifier: 0x00000000

      Disk /dev/md2 doesn't contain a valid partition table

      Disk /dev/md3: 159.0 GB, 159027298304 bytes
      2 heads, 4 sectors/track, 38825024 cylinders
      Units = cylinders of 8 * 512 = 4096 bytes
      Disk identifier: 0x00000000

      Disk /dev/md3 doesn't contain a valid partition table

      Disk /dev/sde: 1024 MB, 1024450560 bytes
      255 heads, 63 sectors/track, 124 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
      Disk identifier: 0xffffffff

      Device Boot Start End Blocks Id System
      /dev/sde1 * 1 124 995998+ 83 Linux
      root@Demon:/etc#

      Oh, BTW, /dev/md3 has most of my / filesystem on it. /boot is a small 1gb flash drive (/dev/sde) I use to avoid the 1024 cylinder bootloader issue...works great. The PC boots with no trouble (1.5GB of system ram), but I need some swap so i can load up...well...some programs. Planning on seeing if I can get LOTRO running on Wine.

      Comment


        #4
        Re: Swap Wrangling.... yes, again...Sorry...

        Wow. Okay, what you've got setup is way beyond what I have any experience with. I have zero experience with RAID setups, so search in the forum and watch for posts from other members who have used RAID in their systems.
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: Swap Wrangling.... yes, again...Sorry...

          I don't understand the point of the striped swap. I understand disk striping, for performance (at the expense of reliability). But, is your swap space being tasked so hard that you need to stripe it to get better performance out of it? I've never heard of swap getting worked that hard on a newer system. My swap space just sits there as 1.5G of wasted disk space, to be honest.

          Comment


            #6
            Re: Swap Wrangling.... yes, again...Sorry...

            Problem solved. The "noautos" in the fstab were my problem. Got rid of them, and replaced the whole column with "sw" and all the swap partitions mounted with a swapon -a, and they also automounted when the system restarted. This is turning into one sexy rig.

            @Dibl: you're right, it's not being pumped that hard. I'm just a hardass for swap performance. I'm running an old P4, so the more I can squeeze out of the system, the better. Originally, I did intend to stripe the swap partition, so that the disks are never the speed-limiter (the back-side bus is). Turns out, the md driver is slower at managing all the raid activity than the kernel is at managing multiple swaps. I voted to let the kernel do what it's best at.

            Thanks for all the help!

            Comment


              #7
              Re: Swap Wrangling.... yes, again...Sorry...

              Here's some useful information, if you have a future high-performance RAID array in mind:

              http://sidux.com/PNphpBB2-viewtopic-...ight-RAID.html

              Comment

              Working...
              X