LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-21-2008, 12:49 PM   #1
ArianaPantalaimon
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Rep: Reputation: 0
Repartition a HD without losing data


Hi i was wondering if there was a way to add a swap file to a vps i just got. The space i ordered was 12GB so im assuming thats the space i would need to modify. Any help/suggestions would be appreciated

server:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 12G 824M 12G 7% /
tmpfs 7.9G 0 7.9G 0% /lib/init/rw
tmpfs 7.9G 0 7.9G 0% /dev/shm
 
Old 08-21-2008, 01:55 PM   #2
pokemaster
Member
 
Registered: Apr 2005
Location: Massachusetts, USA
Distribution: debian,ubuntu,slackware
Posts: 110

Rep: Reputation: 17
Easy way would be to use a swap file, rather than partition. Namely, on the 12G partition create a file
Code:
dd if=/dev/zero of=swapfile bs=1M count=1024
mkswap swapfile
swapon swapfile
I'm fairly certain this works, though I'm unable to verify ATM
 
Old 08-21-2008, 02:12 PM   #3
ArianaPantalaimon
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Original Poster
Rep: Reputation: 0
server:/dev# mkswap swapfile
Setting up swapspace version 1, size = 1073737 kB
no label, UUID=6931744b-843e-43e4-9897-411161927031
server:/dev# swapon swapfile
swapon: swapfile: Operation not permitted

first command worked second one worked third one ...not permitted
 
Old 08-23-2008, 12:28 AM   #4
ArianaPantalaimon
LQ Newbie
 
Registered: Aug 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ArianaPantalaimon View Post
server:/dev# mkswap swapfile
Setting up swapspace version 1, size = 1073737 kB
no label, UUID=6931744b-843e-43e4-9897-411161927031
server:/dev# swapon swapfile
swapon: swapfile: Operation not permitted

first command worked second one worked third one ...not permitted
Apparently that is normal in a VPS ... i guess you arent allowed to make a swap file i did a ton of google searching and even asked the help desk with the company and they said they cant do it either
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Repartition hard drive w/o losing data, centOS 5 sir-lancealot Linux - Server 3 06-05-2008 10:51 AM
Re-partition without losing data goodtogo Linux - Software 4 06-22-2007 08:20 AM
Repartition (or partition resizing) without data loss? MasterOfTheWind Linux - Software 2 05-11-2006 02:22 AM
Repartitioning without losing data Cdzin Slackware 4 01-30-2005 08:27 PM
Upgrade to RH 9.0 without losing data? habadash Linux - Newbie 3 07-31-2003 05:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration