Prev: RfC: Building an Medical Software Task Force
Next: Simple question: Is there anything architecture-specific about"mkswap"?
From: Kenny McCormack on 4 Aug 2010 07:58 In article <Xns9DCA805323E06650A1FC0D7811DDBC81(a)85.214.73.210>, Rahul <nospam(a)nospam.invalid> wrote: >gazelle(a)shell.xmission.com (Kenny McCormack) wrote in news:i37mih$23s$1 >@news.xmission.com: > >> That is, is there anything wrong with using "mkswap" on a machine >> running Linux on one architecture (say, i386) to create a swap partition >> on a device, then using that device for swap under Linux running on >> another architecture (say, ARM). I.e., assume that, for whatever >> reason, "mkswap" does not exist on the target architecture. >> > >I have a Intelx32, Intelx64, and AMDx64 server sitting next to each other. >If you want me to try I'm game. Feel free, although I doubt you'll find any difference between the 2 64 bit platforms. You *might* find a difference between the 32 and the 64. It's more likely to show if the platforms are really different (like Intel vs. ARM or Sparc or something like that) The other question is: What is the failure mode? Suppose you get it wrong. Does "swapon" complain (and refuse to add the device/file to the swap pool) ? Or does it just fail silently (i.e., weird memory errors, etc) ? -- (This discussion group is about C, ...) Wrong. It is only OCCASIONALLY a discussion group about C; mostly, like most "discussion" groups, it is off-topic Rorsharch [sic] revelations of the childhood traumas of the participants...
From: Rahul on 4 Aug 2010 10:33 gazelle(a)shell.xmission.com (Kenny McCormack) wrote in news:i3bkl1$vbm$6 @news.xmission.com: > Feel free, although I doubt you'll find any difference between the 2 64 > bit platforms. You *might* find a difference between the 32 and the 64. > It's more likely to show if the platforms are really different (like > Intel vs. ARM or Sparc or something like that) > > The other question is: What is the failure mode? Suppose you get it > wrong. Does "swapon" complain (and refuse to add the device/file to the > swap pool) ? Or does it just fail silently (i.e., weird memory errors, > etc) ? It seems a little harder than I thought because of this comment in the swapon manpage: >>>Swap over NFS may not work. <<< My armchair experiment won't work. I guess I have to phsically swap disks or use a USB stick. :) -- Rahul
From: Jerry Peters on 4 Aug 2010 16:29 Rahul <nospam(a)invalid.invalid> wrote: > gazelle(a)shell.xmission.com (Kenny McCormack) wrote in news:i3bkl1$vbm$6 > @news.xmission.com: > >> Feel free, although I doubt you'll find any difference between the 2 64 >> bit platforms. You *might* find a difference between the 32 and the 64. >> It's more likely to show if the platforms are really different (like >> Intel vs. ARM or Sparc or something like that) >> >> The other question is: What is the failure mode? Suppose you get it >> wrong. Does "swapon" complain (and refuse to add the device/file to the >> swap pool) ? Or does it just fail silently (i.e., weird memory errors, >> etc) ? > > It seems a little harder than I thought because of this comment in the > swapon manpage: > >>>>Swap over NFS may not work. <<< > > My armchair experiment won't work. I guess I have to phsically swap disks > or use a USB stick. :) > Run mkswap to a swap file via NFS, from say machine A to machine B, then do a swapon on machine B. No actual swapping over NFS necessary. Jerry
From: Rahul on 4 Aug 2010 19:21
Jerry Peters <jerry(a)example.invalid> wrote in news:i3cik0$bp8$1(a)news.eternal-september.org: >> It seems a little harder than I thought because of this comment in >> the swapon manpage: >> >>>>>Swap over NFS may not work. <<< >> >> My armchair experiment won't work. I guess I have to phsically swap >> disks or use a USB stick. :) >> > Run mkswap to a swap file via NFS, from say machine A to machine B, > then do a swapon on machine B. No actual swapping over NFS necessary. > Thanks. Dumb me. Seems to work. At least no immediate errors: star100 [Intel 32 bit] dd if=/dev/zero of=/tmp/swapfile.100 bs=1024 count=65536 mkswap /tmp/swapfile.100 scp /tmp/swapfile.100 star200:/tmp star200 [AMD 64 bit] free Swap: 2096472 13016 2083456 [snip] swapoff -a chmod 0600 /tmp/swapfile.100 swapon -v /tmp/swapfile.100 free [snip] Swap: 65528 0 65528 I'll let you know if the server gets unstable. -- Rahul |