Jump to content

Backwards resizing of partitions


Recommended Posts

Ok, so here' s my problem. Recently I switched to Debian from Mandrake (I have nothing against Mandrake lol, just wanted to try another distro). Anway, I'm running out of space on my Debian partition, so I deleted my Mandrake partition to give me more room for Debian. The df command now gives this output: In order, it goes Windows (sda1), swap (sda5), Debian (sda6).

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda6             15741824  14059444   1362568  92% /
tmpfs                   257508         0    257508   0% /dev/shm
/dev/sda1             20514968  16808852   3706116  82% /mnt/windows

 

Since the Debian partition starts AFTER the free space, when I attempt to resize it with Mandrake CD 1, it won't let me resize. So the question is, how can I make the Debian partition (sda6) start at a different sector so it can resize? Thanks.

 

[moved from Hardware by spinynorman]

Link to comment
Share on other sites

Before you start any repartitioning: Have you freed up some space already, emptying e.g. your apt-get cache? I would examine the system in detail and use repartitioning only as a last, desperate measure. ;)

Link to comment
Share on other sites

Cleaned the cache, and for the moment I'm okay, but I'd still like to repartition, as Debian as 15GB allocated and I have about 45GB free space :).

 

Could I make an ext3 partition of, say 16GB (just enough to hold it) and copy the entire Debian system onto it, then resize to 45GB?

Link to comment
Share on other sites

Well, while I was messing around, I accidentally did an rm -rf / through Knoppix (forgot to chroot first, just trying to delete a different partition), and, though my /home directory is still intact, I lost my /var and /etc directory. I guess I'll be reinstalling now... :(. This sucks.

Link to comment
Share on other sites

Of course if you did not create separate real partitions for /var or /etc then if you lose (NOT loose, as so many spell it) / then of course you will lose those two, but what the heck would you want to make such real partitions for them anyhow. In 3yrs of following this particular subject, I have never found a single compelling argument in favour of it.

I hope you had important data backed up and if not then "naughty, naughty, naughty". :D

Anyway, doing a reinstall is no big deal and it cleans out a lot of stuff for you.

Good luck with your efforts.

 

Cheers. John.

Link to comment
Share on other sites

Well, while I was messing around, I accidentally did an rm -rf / through Knoppix (forgot to chroot first, just trying to delete a different partition), and, though my /home directory is still intact, I lost my /var and /etc directory. I guess I'll be reinstalling now...  :(. This sucks.

:lol: Say, couldn't you wait a bit until I finished sleeping in order to help you? :D Well, you "sorta" solved that one by yourself. I wish you better luck next time. ;)

Link to comment
Share on other sites

AussieJohn, a lot of people use a separate /var partition on servers. The /var log files can really fill up on a server fast, depending on the traffic. Keeping it on a separate partition keeps /var from consuming too much space on /. At least, that's the main rationale I've heard. This should not be a concern for a desktop install, however.

Link to comment
Share on other sites

Yeah, I had stuff backed up, so I was ok. It fixed that wierd xdm problem I'd been having lol.

 

Actually, my plan with copying would have worked quite fine, if it weren't for the misstyped command. I forgot to type rm -rf /mnt/sda5 and instead typed rm -rf / :). Also, if I had mounted the partition readonly I would have been fine too.

Link to comment
Share on other sites

I don't use a separate /var myself, but it does make sense, even for desktops, since the package updates are cached there. For bleeding edge distro users, these updates can be a few gigabytes fat!

I'm one of those bleeding edge seperate /var using fellows :) I"ve also been using lvm for about 3-4 years now too so I can resize them when I want :D

Link to comment
Share on other sites

LVM is the logical Volume Manager, used by RedHat and Fedora. Here you can find more information about it: http://www.tldp.org/HOWTO/LVM-HOWTO/

 

excerpt:

Logical volume management provides a higher-level view of the disk storage on a computer system than the traditional view of disks and partitions. This gives the system administrator much more flexibility in allocating storage to applications and users.

 

Storage volumes created under the control of the logical volume manager can be resized and moved around almost at will, although this may need some upgrading of file system tools.

 

The logical volume manager also allows management of storage volumes in user-defined groups, allowing the system administrator to deal with sensibly named volume groups such as "development" and "sales" rather than physical disk names such as "sda" and "sdb".

Link to comment
Share on other sites

Most distros support LVM now, but Fedora/Redhat implement online reszie on ext3 file systems so it makes it a breeze to resize on the fly (even while data is being writen, I've tested it :) )

 

the code for ext3online was put into kernel proper recently, (i believe).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...