LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 11-16-2006, 11:43 AM   #1
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Rep: Reputation: 75
Repartitioning safely


This is my partition set up

sdb1 40GB spare Linux ( was slackware 10.2)
sdb2 4GB swap
sdb3 40GB Slackware 11.0
followed by about 5 partitions for storing data/FAT/playing with other distro.

Swap is far too big and I was thinking of changing this to:

sdb1 2GB swap
sdb2 42GB spare Linux ( was slackware 10.2)
sdb3 etc unchanged

My data and /etc are backed up externallly.

Is it safe to do the repartitioning without damaging sdb3?

TIA

Alan
 
Old 11-16-2006, 11:48 AM   #2
dohpaz
Member
 
Registered: Feb 2006
Location: Edmonton
Distribution: Slackware 12.2, Ubuntu
Posts: 117

Rep: Reputation: 16
I always assume that it isn't and do a full image of the drive I'm
partitioning. I use G4U:

http://www.feyrer.de/g4u/

That way if anything goes wrong I just restore from the image backup.
 
Old 11-16-2006, 12:03 PM   #3
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
I concur with dohpaz and strongly second his recommendation. Otherwise, sdb3 shouldn't be harmed.

I also think 2GB for swap is still too big. I have 1GB RAM and a 512MB swap. The most swap I've every seen used was 43MB and that was when I was running a computationally intensive simulation. I mean 70,080 MILLION calculations were performed during the simulation. I was still able to check my e-mail and poke around LQ.org, but mostly just let the simulation run. Just something to think about.
 
Old 11-16-2006, 12:14 PM   #4
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Original Poster
Rep: Reputation: 75
I do not have an ftp server or an empty spare hard disc. Would saving a tar of sdb3 be feasible?
 
Old 11-16-2006, 12:16 PM   #5
swampdog2002
Member
 
Registered: Jul 2005
Distribution: Slackware 12.2, 13.0, openSUSE 11.2
Posts: 400

Rep: Reputation: 33
I remember from the first edition of "Slackware Linux Essentials" that it made reference to creating a swap partition that was double the amount of RAM in a user's system. With the amount of RAM in some machines today, which are larger than a few of my hard drives , I don't know how applicable this is anymore. Typically, I have always created a 1 GB swap partition for my machines, just as my own setup rule. Whether or not I actually need this size I have yet to determine, and the space is not wasted in my case as I never get the opportunity to completely use all the space that my hard drive offers.
 
Old 11-16-2006, 12:43 PM   #6
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Original Poster
Rep: Reputation: 75
I have plenty of disc space and if there is any risk attatched to the procedure I would rather keep things as they are than get the extra 3MB
 
Old 11-16-2006, 12:45 PM   #7
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Quote:
Originally Posted by arubin
I do not have an ftp server or an empty spare hard disc. Would saving a tar of sdb3 be feasible?
Quote:
Originally Posted by arubin
followed by about 5 partitions for storing data/FAT/playing with other distro.
Could you use one of these or combine a couple together? Once you know there's been no data corruption, you can nuke the image.
 
Old 11-16-2006, 01:33 PM   #8
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Original Poster
Rep: Reputation: 75
Quote:
Could you use one of these or combine a couple together? Once you know there's been no data corruption, you can nuke the image.
I don't get that. I am worried about damaging sdb3 when I am repartitioning sdb1 and sdb2. Is the safe place to back it up sdb6?
 
Old 11-16-2006, 06:50 PM   #9
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
If there is nothing that you want to save in either /dev/sdb1 or /dev/sdb2, you could simply run cfdisk, delete those two partitions, then redefine the resulting free space into two new partitions. Of course, just to play it safe, do a backup of any data in /dev/sdb3 that is important to you. However, as long as your actions only involve sdb1 and sdb2, I would say you are safe, and there is very little chance that the approach I described above would negatively impact sdb3.

On a different note, I'd also suggest that a 2G swap space is way too large. Keep in mind that the only time swap gets used is when your system load exceeds your RAM capacity, and the system is forced to write memory pages to disk. The old "swap=2xRAM" rule dates from the days when having 16Mg or 32Mg of RAM was considered leading edge, and it actually was pretty common to completely exhaust your RAM. These days, where a typical desktop has 512Mg or 1G of RAM (or even more) it becomes increasingly unlikely that you'd ever use up all your RAM, and thus creating a huge swap space basically just wastes disk space. For large scale systems with thousands of users, Yes, having a lot of swap is critical, but for the typical desktop, if you've got 512Mg of RAM or more, then I'd say that having a 256Mg or 512Mg swap space is plenty, and more likely than not will rarely be used at all. Personally, for a desktop environment, I always define a swap of 256Mg as long as the machine has 128Mg or more of RAM -- for machines with only 128, it follows the "twice RAM" rule, but at higher levels, it becomes increasingly unlikely that you'd actually need to use swap, so way waste the disk space.

Overall, partitioning decisions are highly subjective, so if you ask a lot of people what's "best", you'll get a lot of different answers. Good luck with it either way
 
Old 11-17-2006, 02:21 AM   #10
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Original Poster
Rep: Reputation: 75
Thanks.

I have 2MB of RAM and I had just followed the 2x rule when I set up the system.
 
Old 11-17-2006, 06:18 AM   #11
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
As much space as you have I wouldn't think adding 2GB to your unused partiton would be worth the effort.

Anytime you remove or resize a partition, you#ll lose the info in the following partitions -something to think about when you are first setting up. In other words, try to make the first partitions with an acceptable size and leave the end of the hard disk unpartitioned or filled with extra partitions which are not so important. By shuffling data out of them you can resize them and copy stuff back into them.

Unless you are doing a lot of video or sound editing or 'remastering' iso's, you should never need more than 1Gb of swap. If you have as much as 512MB RAM your swap will almost never be touched.
 
Old 11-17-2006, 06:23 AM   #12
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Original Poster
Rep: Reputation: 75
J.W. says
Quote:
If there is nothing that you want to save in either /dev/sdb1 or /dev/sdb2, you could simply run cfdisk, delete those two partitions, then redefine the resulting free space into two new partitions.
gnashley says
Quote:
Anytime you remove or resize a partition, you#ll lose the info in the following partitions
You cannot both be correct. My guess is J.W is right
 
Old 11-17-2006, 06:39 AM   #13
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
If you delete intermediate partitions, your existing partition numbers will change. If you resize them, you may lose disk space because of unmatched cylinder boundaries.
 
Old 11-17-2006, 06:45 AM   #14
rkrishna
Member
 
Registered: Mar 2005
Location: chennai(madras), India
Distribution: slackware ofcourse
Posts: 654

Rep: Reputation: 32
try qtparted, but i will allways suggest to keep a backup of the drive, you can always use "dd" command to have a disk copy. as everyone says it is not worth adding 2gb to our slack partition with thismuch risk. also for you a max of 512 mb swap is needed regards rkrishna
 
Old 11-17-2006, 07:05 AM   #15
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Original Poster
Rep: Reputation: 75
Gnashley
If I go into fdisk delete sdb1 and sdb2 and then create them with different sizes but so that (sdb1 old + sdb2 old) = (sdb1 new + sdb2 new) and write the new partition table why will that necessarily make me lose sdb3?
 
  


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
repartitioning metalsam Linux - Software 5 07-02-2006 05:39 PM
can you apply 2.6.x kernel config to 2.4.x safely/somewhat safely? silex_88 Linux - Software 3 12-09-2005 11:38 PM
Repartitioning fearofcarpet Fedora 3 09-05-2004 02:16 PM
Repartitioning King4lex Linux - Newbie 4 09-02-2004 06:15 PM
Repartitioning Lazlo Linux - General 3 12-11-2001 02:43 AM

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

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