LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-13-2005, 06:46 AM   #1
fieldyweb
Member
 
Registered: Jun 2005
Location: Wycombe, England
Distribution: Mepis 3.4.3 , Ubuntu & Damm Small Linux
Posts: 119

Rep: Reputation: 15
Question Hard Disk rePartition


I have Mandrake 10.1 Powerpack /KDE 3.2 installed and when it installed it allocated all fre hard disk space as

/dev/hd6 (20Gb)

And this is where the /home folder resides, now as i'm the only user, i still have 17Gb free after 3 months of usage, i want to free up some of that hard disk space, so i can put another linux version there... so i can test it (edubuntu)

So far i have backed up the contents of the /home/david directory using webins backup system...

Now i guess it is safe to

logout

login as rot

run fdsik

delete hda6

create a new partition with say 10Gb

And i am hoping this new partition will mount as home again and i can get Webmin working agian can restore my back up reboot and i will be where i left off, with 10Gb (approx) of remaining free space..

before i do this could i please ask

1) does this seem like the right idea?
2) is there an alternative way to achive the freeing up of this space?
3) Would i be advised to add LVM2 when i create the new partition etc? so i don't have to repartion again? and if so, is that a simple task..

A thank ANYONE who can give me some positive feedback.
 
Old 11-13-2005, 07:49 AM   #2
Riddick
Member
 
Registered: May 2004
Location: Rome, Italy
Distribution: slackware-current
Posts: 454

Rep: Reputation: 30
this sounds a bit confusing.
What I would do is try to get rid of using hda6
all together for home (for your mandrake partition),
and remount home where the rest of the file system is.

Copy all your files into that new home.

Then install the new distro completely into hda6

how does that sound?

Riddick
 
Old 11-13-2005, 07:54 AM   #3
fieldyweb
Member
 
Registered: Jun 2005
Location: Wycombe, England
Distribution: Mepis 3.4.3 , Ubuntu & Damm Small Linux
Posts: 119

Original Poster
Rep: Reputation: 15
Sounds really good,

excuse my complete igonorance.. how do i remount my home at another location? and do i have to use a backup and restore to do it?

I think i know how to do this, but i really on't want to screw up my current config..
 
Old 11-13-2005, 07:55 AM   #4
fieldyweb
Member
 
Registered: Jun 2005
Location: Wycombe, England
Distribution: Mepis 3.4.3 , Ubuntu & Damm Small Linux
Posts: 119

Original Poster
Rep: Reputation: 15
[david@gb david]$ df
Filesystem Size Used Avail Use% Mounted on
/dev/hda1 5.8G 5.0G 544M 91% /
/dev/hda6 21G 4.5G 17G 22% /home
/dev/sda2 4.3G 4.1G 304M 94% /mnt/data
/dev/sda1 33G 29G 4.5G 87% /mnt/music
none 252M 280K 252M 1% /tmp
 
Old 11-13-2005, 07:57 AM   #5
Riddick
Member
 
Registered: May 2004
Location: Rome, Italy
Distribution: slackware-current
Posts: 454

Rep: Reputation: 30
ah - looks like you don't have the space to do it!

So, where did the webbackup go? where is it saved?
 
Old 11-13-2005, 08:03 AM   #6
fieldyweb
Member
 
Registered: Jun 2005
Location: Wycombe, England
Distribution: Mepis 3.4.3 , Ubuntu & Damm Small Linux
Posts: 119

Original Poster
Rep: Reputation: 15
The backup of the /home/david directory went onto my external USB HDD /dev/sda2

So now you can see what i wanted to do, reduce the size of hda6 by 50% and reinstall the backup onto that...
 
Old 11-13-2005, 10:33 AM   #7
Riddick
Member
 
Registered: May 2004
Location: Rome, Italy
Distribution: slackware-current
Posts: 454

Rep: Reputation: 30
yes... you're doing good.
As root can you do "fdisk -l" and tell me the output of that?
Also, was that our entire fstab above?


thanks, Riddick
 
Old 11-13-2005, 05:22 PM   #8
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
Using fdisk in Mandrake is a bit like using fdisk in DOS when you've got Partition Magic. Go into the Mandrake Control Centre and in Mount Points->Partitions you'll find a nice GUI partitioning program. You can resize your disks safely (ie. no data loss), among other features.

If you need to resize the root partition (you can't resize partitions when they're in use, ie. 'mounted') just boot off the install CD and go up to the partitioning step. You can then press the reset button on your box when it gets up to the pacakge selection to stop it from reinstalling everything.
 
Old 11-13-2005, 05:57 PM   #9
Riddick
Member
 
Registered: May 2004
Location: Rome, Italy
Distribution: slackware-current
Posts: 454

Rep: Reputation: 30
...but we both know how to use fdisk and it is standard.

fieldyweb if you need more help decide what route you're going to take.

Riddick
 
Old 11-14-2005, 07:26 AM   #10
fieldyweb
Member
 
Registered: Jun 2005
Location: Wycombe, England
Distribution: Mepis 3.4.3 , Ubuntu & Damm Small Linux
Posts: 119

Original Poster
Rep: Reputation: 15
thaks for both your advice...

I knoew about the Partition in MCC however as its my home partition i want to resize, i'm a bit buggered, as its in use, and there is no option (as there is in partion magic) to choose a new size, and repartition after a reboot, which would be a nice feature?

So i'm gonna go down the fdisk route guys,

so the contents of an fdisk -l as su - are

[root@ppp-58 root]# fdisk -l

Disk /dev/hda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 764 6136798+ 83 Linux
/dev/hda2 765 3648 23165730 5 Extended
/dev/hda5 765 904 1124518+ 82 Linux swap
/dev/hda6 905 3648 22041148+ 83 Linux

this is with my External HDD unplugged..

I had a look at Parted last night, booted off the Install DVD and it came up telling me that the block size was wrong, and to cancel or ignor, seeing as how i was feeling brave, i ignored, and tried to repartition /dev/hda6, and when i tried it it came back that the hard disk was ext2 and it couldn't repartion it (yet) now i have checked with 3 utils and /dev/hda6 is definatly ext3?
 
Old 11-14-2005, 07:28 AM   #11
fieldyweb
Member
 
Registered: Jun 2005
Location: Wycombe, England
Distribution: Mepis 3.4.3 , Ubuntu & Damm Small Linux
Posts: 119

Original Poster
Rep: Reputation: 15
And the /etc/fstab is as follows

[root@ppp-58 root]# more /etc/fstab
/dev/hda1 / ext3 noatime 1 1
/dev/hda6 /home ext3 noatime 1 2
/dev/hdc /mnt/cdrom auto user,unhide,umask=0,iocharset=iso8859-1,codepage=850,no
auto,ro,exec,users 0 0
/dev/sda2 /mnt/data auto defaults,uid=david,gid=david,users 0 0
/dev/sda1 /mnt/music auto defaults,uid=david,gid=david,users 0 0
none /proc proc defaults 0 0
none /tmp tmpfs defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/sr0 /mnt/cdrom2 auto umask=0,user,iocharset=iso8859-1,sync,codepage=850,noauto,ro,exec,users 0 0
[root@ppp-58 root]#
 
Old 11-14-2005, 11:34 AM   #12
Riddick
Member
 
Registered: May 2004
Location: Rome, Italy
Distribution: slackware-current
Posts: 454

Rep: Reputation: 30
ok are we ready to continue - are you sure that hda6 and everything on it is expendable?
Do you have some sort of IM client so we can do this over chat?

Riddick
 
Old 11-14-2005, 04:10 PM   #13
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
Quote:
I knoew about the Partition in MCC however as its my home partition i want to resize, i'm a bit buggered, as its in use, and there is no option (as there is in partion magic) to choose a new size, and repartition after a reboot, which would be a nice feature?
Click on the partition and click 'unmount', although you may have to login as root to do this. Now you can manipulate it safely. As I said before if its your root partition (or it still doesn't want to unmount it for some reason) you can reboot off the install CD and do the partitioning from there.

Its up to you wether you use diskdrake or fdisk, I just think that using fdisk for something like this is unecessarily complex and difficult and unecessarily destructive (you lose any data on any partitions you resize with fdisk).
 
Old 11-15-2005, 05:42 AM   #14
fieldyweb
Member
 
Registered: Jun 2005
Location: Wycombe, England
Distribution: Mepis 3.4.3 , Ubuntu & Damm Small Linux
Posts: 119

Original Poster
Rep: Reputation: 15
Cheers for all your help guys, I took the MCC Partition manager option, figured out how to login as roon, resized my partition by 50% and Well lost the lot, glad i had a backup...

when irebooted it came up with whole stream of errors.... for the /dev/hda6 drive..

It might be useful anyway for anyone using this information for you to put the process to change a disk partition soze using FDISK?

Anyway, i have reloaded, from scratch, and have setup my partitions how i would like them now!!
 
  


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
Cloning 1 hard disk to smaller hard disk, dd or ghost? fireman949 Linux - Hardware 8 12-23-2012 12:51 AM
Reiser file system / Hard Disk/ Hard Drive Problems Oxyacetylene Linux - Software 4 10-10-2005 02:24 PM
Hard Drive repartition crashed crewblunts Linux - Hardware 7 02-07-2004 11:19 PM
Hard Disk question - Making a big hard disk MrAnonym Linux - General 2 09-15-2003 06:08 PM
format part of disk/repartition? mrburrito00 Linux - Hardware 3 09-28-2002 01:26 PM

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

All times are GMT -5. The time now is 04:09 AM.

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