LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-20-2004, 01:51 PM   #1
wutever
LQ Newbie
 
Registered: Aug 2004
Posts: 15

Rep: Reputation: 0
resize swap and Reiserfs


hi i have just noticed that i have done a big error when partitioning my hard drive , i have a swap space of 11 GB wich is really a lot and stupid , the thing is i don t want to reformat my hard drive just because of this , i ve heard aboput a program called parted that will let me resize my hard drive but i want to know how safe is it and did someone tried doing this ? thanks for the help
 
Old 09-20-2004, 02:01 PM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
What is your output with :
/sbin/fdisk -l

Maybe all you have to do is delete swap partition then create 2 partitions without resizing
 
Old 09-20-2004, 02:25 PM   #3
wutever
LQ Newbie
 
Registered: Aug 2004
Posts: 15

Original Poster
Rep: Reputation: 0
thanks for you fast reply the outout was :
Disk /dev/hda: 30.7 GB, 30735581184 bytes
255 heads, 63 sectors/track, 3736 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 1346 10811713+ 82 Linux swap
/dev/hda2 1347 3736 19197675 83 Linux

thanks again
 
Old 09-20-2004, 02:43 PM   #4
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
You could delete /dev/hda1 then create 2 partitions in the empty space. One for swap and another for data.

One warning though: after that, your / (root) partition will be renammed to /dev/hda3 so you must edit /etc/fstab and change /dev/hda2 to /dev/hda3 for /, if you don't make the change, the system won't boot.

[edit]
To make things clear :

before :
/dev/hda1 swap
/dev/hda2 /

after you create the 2 partitions :
/dev/hda1 swap (or data)
/dev/hda2 data (or swap)
/dev/hda3 /

Last edited by Cedrik; 09-20-2004 at 02:49 PM.
 
Old 09-21-2004, 01:56 AM   #5
wutever
LQ Newbie
 
Registered: Aug 2004
Posts: 15

Original Poster
Rep: Reputation: 0
ok thanks for the info will do this but i don t want to restart my pc because i m running a server , so i ll wait for the right moment thanks again i really apreciate your help
 
Old 10-14-2004, 11:55 PM   #6
wutever
LQ Newbie
 
Registered: Aug 2004
Posts: 15

Original Poster
Rep: Reputation: 0
ok i have just did what u suggested and it worked charmly , so thx , but the thing is when i type free :
free
total used free shared buffers cached
Mem: 515444 257452 257992 0 27204 135804
-/+ buffers/cache: 94444 421000
Swap: 0 0 0

my hard disk looks like this :

Disk /dev/hda: 30.7 GB, 30735581184 bytes
255 heads, 63 sectors/track, 3736 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 232 1863508+ 82 Linux swap
/dev/hda2 1347 3736 19197675 83 Linux
/dev/hda3 233 1346 8948205 83 Linux

and my fstab looks like this :
/dev/hda1 swap swap defaults 0 0
/dev/hda2 / reiserfs defaults 1 1
/dev/hda3 /wutever
/dev/hdc /mnt/cdrom iso9660 noauto,owner,ro,user 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro,user 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0


can u plz tell me why linux is not seing my swap ?
 
Old 10-15-2004, 12:08 AM   #7
wutever
LQ Newbie
 
Registered: Aug 2004
Posts: 15

Original Poster
Rep: Reputation: 0
ok i found it

if anyone will have the same problem what i did to fix this was as root i typed this command:
mkswap /dev/hda1 wich will make swap
and then :
swapon -a

the free command gave this:
total used free shared buffers cached
Mem: 515444 171068 344376 0 7464 61420
-/+ buffers/cache: 102184 413260
Swap: 1863500 0 1863500
 
  


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
Resize ReiserFS ultramancool Linux - Software 2 04-26-2005 09:01 PM
Resize ReiserFS partition? cdlyon Linux - General 1 04-19-2005 11:32 AM
ReiserFS resize help needed Godji Linux - General 9 01-08-2005 08:04 AM
how to unmount + resize reiserfs with parted? neenee Linux - General 8 02-19-2004 08:20 PM
problem with parted resize on reiserfs Sammy2ooo Linux - General 2 12-24-2003 02:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:58 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