Fedora Linux Support Community & Resources Center
  #1  
Old 29th June 2012, 11:30 PM
Quantum Offline
Registered User
 
Join Date: Jun 2012
Location: Seattle, Ecotopia
Posts: 32
linuxkonqueror
Adding Swap

I have installed F17 into a VirtualBox VM, and would like to add another swap.

I know it should be as easy as mkswap /dev/??, but I don't know what partitions are available in my virtual machine. How do I find out? I can't make sense out of fdisk output. It has /dev/sda and then /dev/mapper devices, I guess because I have an encrypted disk, but don't understand them and for some reason the fdisk output copied to clipboard on guest will not transfer to host.

Anyone advise?
Reply With Quote
  #2  
Old 30th June 2012, 12:05 AM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105
linuxfirefox
Re: Adding Swap

The VM doesn't use X when communicating with the host, so cut/past can't work.

I put it in a file and use scp to copy it. I also use ssh to log into the box from which I can use X for cut/past and windows from the VM.

Fdisk should list the partitions known. The /dev/mapper are virtual disks/partitions composed of partitions already existing.

In my case, things show up as:
Code:
# fdisk -l

Disk /dev/vda: 17.2 GB, 17179869184 bytes
16 heads, 63 sectors/track, 33288 cylinders, total 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001a906

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048     1026047      512000   83  Linux
/dev/vda2         1026048     9414655     4194304   82  Linux swap / Solaris
/dev/vda3         9414656    33554431    12069888   83  Linux
I get vda from using xen with only one disk defined.

Adding swap (if you want a new disk) has to be done via the virtualbox control to define it. Otherwise you are just creating a swap file, which can be put on any mounted disk. And yes, the filesystem it is on must be mounted before it can be added as a swap device.
Reply With Quote
  #3  
Old 30th June 2012, 05:30 PM
Quantum Offline
Registered User
 
Join Date: Jun 2012
Location: Seattle, Ecotopia
Posts: 32
linuxkonqueror
Re: Adding Swap

Oh for Heaven's sake, create a new disk. Thank you.

Now according to swapon -s I have the new swap drive. To make this permanent I guess I have to edit fstab? Like this?
UUID="{whatever}" swap swap defaults 0 0

With selinux, is there anything I have to do there?

Last edited by Quantum; 30th June 2012 at 05:34 PM.
Reply With Quote
Reply

Tags
adding, swap

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Swap file and complete removal of swap partition RVF16 Using Fedora 9 20th November 2008 10:32 PM
Adding LVM, expanding storage w/more disks + adding LVM encryption w/ LUKS dsuchter Using Fedora 3 20th May 2008 02:56 AM
crashing swap space or swap command ? mnisay Servers & Networking 2 18th January 2006 04:01 PM


Current GMT-time: 21:38 (Wednesday, 22-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat