Debian This forum is for the discussion of Debian Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-06-2006, 03:11 AM
|
#1
|
|
Member
Registered: Oct 2005
Location: Boise, ID
Distribution: Debian testing
Posts: 99
Rep:
|
I forgot to make a swap partition
I setup debian testing the other day and didn't assign any space to be swap space. Luckily i do have two HDDs and one of them is holding most of my stuff that would otherwise be in /home.
Is is possible to safely modify my /home partition (ext3) in place to make room to create a swap partition (and how would I do so if it is)? Or should I just move everything in /home to another location, erase and recreate the partition at a new smaller size, and then make the swap space?
|
|
|
|
06-06-2006, 03:48 AM
|
#2
|
|
Senior Member
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Rep:
|
You don't need an actual partition, you can use a file for swap. Clicky here. The instructions are old but they'll work the same for modern distrobutions.
|
|
|
|
06-06-2006, 03:50 AM
|
#3
|
|
Member
Registered: Mar 2006
Distribution: BackTrack, RHEL, FC, CentOS, IPCop, Ubuntu, 64Studio, Elive, Dream Linux, Trix Box
Posts: 310
Rep:
|
Hi lokathor,
can you pour in the outputs of
/etc/fstab
df -m
fdisk -l
If you have enough space and two drives you may move /home data to /home on partition where / is located then change proper changes in /etc/fstab and remount all or reboot to make the changes you wanted to do.
Hope this is going to help you
|
|
|
|
06-06-2006, 03:54 AM
|
#4
|
|
Member
Registered: Mar 2006
Distribution: BackTrack, RHEL, FC, CentOS, IPCop, Ubuntu, 64Studio, Elive, Dream Linux, Trix Box
Posts: 310
Rep:
|
Hi Lokathor & cs-cam,
Physical swap is always faster than that of looped one? Won't it degrade the performance of the whole system?
This is what I have observed. If no other chance is left
then this option is great but in other cases we should try to avoid that. ie. where we can make partitions available.
Pinch me If I am wrong
|
|
|
|
06-06-2006, 04:08 AM
|
#5
|
|
Member
Registered: Oct 2005
Location: Boise, ID
Distribution: Debian testing
Posts: 99
Original Poster
Rep:
|
Quote:
|
Originally Posted by imagineers7
can you pour in the outputs of
/etc/fstab
df -m
fdisk -l
|
Code:
compy:/home/daniel# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 noatime,errors=remount-ro 0 1
/dev/hda6 /home ext3 noatime,nodev 0 2
/dev/hdg1 /mnt/hdg ext3 noatime 0 2
/dev/hda5 /tmp ext3 noatime,nodev,nosuid 0 2
/dev/hda2 /usr ext3 noatime,nodev 0 2
/dev/hda3 /var ext3 noatime,nodev,nosuid 0 2
/dev/hdc /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/hdd /media/cdrom1 iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
compy:/home/daniel# df -m
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/hda1 1787 152 1540 9% /
tmpfs 253 0 253 0% /dev/shm
/dev/hda6 18786 264 17568 2% /home
/dev/hdg1 187786 97284 80964 55% /mnt/hdg
/dev/hda5 4695 36 4421 1% /tmp
/dev/hda2 7513 793 6339 12% /usr
/dev/hda3 4695 602 3855 14% /var
compy:/home/daniel# fdisk -l
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 243 1951866 83 Linux
/dev/hda2 244 1216 7815622+ 83 Linux
/dev/hda3 1217 1824 4883760 83 Linux
/dev/hda4 1825 4865 24426832+ 5 Extended
/dev/hda5 1825 2432 4883728+ 83 Linux
/dev/hda6 2433 4865 19543041 83 Linux
Disk /dev/hdg: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdg1 1 24321 195358401 83 Linux
cs-cam: is it "Just as good" to have a file for it? I seem to have gotten the impression from things that it's better to have an actual partition for the swap space (fore reasons that are currently beyond me).
Last edited by Lokathor; 06-06-2006 at 04:10 AM.
|
|
|
|
06-06-2006, 05:31 AM
|
#6
|
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,234
|
Quote:
|
Originally Posted by imagineers7
Pinch me If I am wrong
|
: pinch :
I personally always prefer partition(s), but with 2.6 the performance penalty of using a swap file is no more.
|
|
|
|
06-06-2006, 05:33 PM
|
#7
|
|
Member
Registered: Apr 2004
Location: Warrington, Cheshire, UK
Distribution: Linux Mint 12 LXDE
Posts: 555
Rep:
|
|
|
|
|
06-07-2006, 02:24 AM
|
#8
|
|
Member
Registered: Mar 2006
Distribution: BackTrack, RHEL, FC, CentOS, IPCop, Ubuntu, 64Studio, Elive, Dream Linux, Trix Box
Posts: 310
Rep:
|
Hi Lokathor,
You have /tmp on /hda5 . Your / on hda1 both of which have a lot of space in it.
Idea:-
1) Temporarily change /etc/fstab to reflect
Quote:
|
#/dev/hda5 /tmp ext3 noatime,nodev,nosuid 0 2
|
So that the next time machine gets rebooted the hda5 gets released and your /tmp directory is on / ie. on hda1. And you will not get the resource busy error.
Reboot the machine.
2) fdisk /dev/hda
delete partition 5 which is very safe to do as it is temp partition.
create partition for /tmp & keep some space for swap partition
then create a partition for swap all the remaining proccess goes as usual.
3) Change /etc/fstab as per new partition table.
Reboot the machine with swap enabled!
Hope this will help you.
Last edited by imagineers7; 06-07-2006 at 02:28 AM.
|
|
|
|
06-07-2006, 02:46 AM
|
#9
|
|
Member
Registered: Jul 2004
Distribution: Debian
Posts: 40
Rep:
|
i made a swap partition... but i dont think its enabled... does it matter?
|
|
|
|
06-07-2006, 03:00 AM
|
#10
|
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,234
|
Only if you want to use it.
Try "swapon -s" from a terminal session.
|
|
|
|
06-07-2006, 03:10 AM
|
#11
|
|
Moderator
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Add an entry in /etc/fstab for you new swap partition.
/dev/hda6 swap swap defaults 0 0
I don't know which device it is on your system.
|
|
|
|
06-09-2006, 05:59 AM
|
#12
|
|
Member
Registered: Oct 2005
Location: Boise, ID
Distribution: Debian testing
Posts: 99
Original Poster
Rep:
|
Thanks all, a bit of a bump when i restarted at first (forgot to format the new partitions properly for a moment), but it turned out great.
|
|
|
|
06-09-2006, 11:34 PM
|
#13
|
|
Member
Registered: Mar 2006
Distribution: BackTrack, RHEL, FC, CentOS, IPCop, Ubuntu, 64Studio, Elive, Dream Linux, Trix Box
Posts: 310
Rep:
|
Hi Lokathor,
Thanks,
For you told us that you are out of trouble now. Many people don't reply about what happened next.
Keep it up and Pay it Forward!
Happy Linuxing
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:46 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|