You are not logged in.
O.K. so I have this stupid problem:
[rsw@myhost ~]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 2542076 2320972 92988 97% /
none 94784 0 94784 0% /dev/shm
/dev/sda4 12041420 2406244 9028324 22% /home
/dev/sda1 38888 8336 28544 23% /boot
When I set up my partitions I expected 2.5 gigs to stretch a little farther than this. is there any way to resize it without formating the drive and starting over?
Last edited by rsw (2008-10-16 00:52:02)
Offline
I ran into the same problem thinking i wouldn't use arch64 as much as i do.
All i did was copy+pasted my /opt directory into a seperate partition (in my case my huge other harddrive that was just sitting there). Then i just
"mount --bind /dev/(other partition)/optcopied /opt". It freed up a LOT of space. You could theoretically do this to any partition (/usr/share or /bin or whatever).
Hopefully that helps. If you're looking to extend your root, I don't think that's a reasonable way to go, at least from the research I did when i was at 99% of root disk usage.
Last edited by virati (2008-10-14 02:27:23)
Offline
Not an *easy* way to actually resize it...
There's ways around it though... When this happened on my old server (2gb hdd), I still had a heap of free room on /var (like you do on /home) so I did this:
dd if=/dev/zero of=/var/usr.iso bs=1M count=1024 # 1gb
mkfs /var/usr.iso
modprobe loop
mkdir -t ext3 -o loop /var/usr.iso /mnt/new-usr
cp -a /usr/* /mnt/new-usr
rm -Rf /usr
umount /mnt/new-usr
mount /var/usr.iso /usr
Making a file system within a file on another partition. I know it's a nasty hack; but it still works Kept my server going fine for another couple of months until I got my new one (with a 500gb RAID-1
)
Find a directory in your / partition that is taking up the most space, and move it off to this file.
If you use a file system that supports resizing (eg, xfs or jfs) then in theory you could increase the size of the file later on if you need more space.
dd if=/dev/zero of=/var/bigger.iso bs=1M count=256 # 256mb
cat /usr/bigger.iso >> /var/usr.iso
mount -o remount,resize /usr
UNTESTED, JUST A THEORY.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Can't you just grow the partion using something like Gparted live CD?
Your source for video guides!
My Linux reviews.
Currently using: Intel Core 2 Quad Q9300 @ 3.5GHz, 2GB RAM, Asus P5E, nVidia Geforce 8800GTS, Arch Linux
Offline
Can't you just grow the partion using something like Gparted live CD?
Exactly. Can't you ?
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
I believe that would depend on where the partition is relative to others on the disk; i.e. if root was created first, there are most likely other partitions "after" it on the disk, so there's nowhere for the partition to grow. Obviously it's too late now, but this is one argument for using LVM2, which adds a layer of indirection between partitions and physical disks; I use LVM2 and a filesystem that can grow online, and dealing with situations like this is pretty easy. Again, a little late in this case...
-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/
Offline
I believe that would depend on where the partition is relative to others on the disk; i.e. if root was created first, there are most likely other partitions "after" it on the disk, so there's nowhere for the partition to grow. Obviously it's too late now, but this is one argument for using LVM2, which adds a layer of indirection between partitions and physical disks; I use LVM2 and a filesystem that can grow online, and dealing with situations like this is pretty easy. Again, a little late in this case...
Not quite. There can always be more shrinking and enlarging, working up to the root partition. It takes more time, but you just load up a live CD, tell it what to do and wait a few hours while doing something else. Much better than re-installing.
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
afonic wrote:Can't you just grow the partion using something like Gparted live CD?
Exactly. Can't you ?
That's exactly what I did. I first shrank my home partition (which if you use the standard partitioning scheme, will be directly after root), but made sure to empty the home partition of just about everything in it. Then I grew the root partition to fill the space left.
When you grow the root partition TOWARD the END of the drive, it doesn't touch any of the data before the end of the partition, it only "tacks on" the extra. However, when you shrink the home partition, Gparted will have to move all the data around, which is really the only place that something could go wrong.
Even though the chances of failure are unlikely, you should make a backup first (as with any action that could potentially cause data loss)
Here's the URL
http://gparted.sourceforge.net/livecd.php
Offline
O.K. so I have this stupid problem:
[rsw@myhost ~]$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda3 2542076 2320972 92988 97% / none 94784 0 94784 0% /dev/shm /dev/sda4 12041420 2406244 9028324 22% /home /dev/sda1 38888 8336 28544 23% /boot
When I set up my partitions I expected 2.5 gigs to stretch a little farther than this. is there any way to resize it without formating the drive and starting over?
Yep, your home partition is directly after the root partition, so what I suggested should work, however, give good consideration to the size of each, considering you don't have another drive (according to df) to use for storage. Personally, I only have 12GB on my home partition (after resizing) and now have 23GB on root.
Here's mine.
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb3 22864180 7438764 14503608 34% /
none 517648 548 517100 1% /dev/shm
/dev/sdb4 11897496 5947088 5470708 53% /home
/dev/sdb1 38888 22534 14346 62% /boot
/dev/sda1 155059036 37878624 109365872 26% /media/thevault
/dev/sdc1 116294120 84739460 25693748 77% /media/music
Last edited by Execute_Method (2008-10-14 12:53:41)
Offline
I've done this numerous times with that liveCD.
Shrinking and enlarging multiple partitions, some toward the beginning and some towards the end, and never had any data loss.
But it's slow as hell, though...
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
I've done this numerous times with that liveCD.
Shrinking and enlarging multiple partitions, some toward the beginning and some towards the end, and never had any data loss.
But it's slow as hell, though...
I agree, liveCD, works well, and (for me) has been a really safe bet, when in a data crunch
Offline
Thanks for the advice all. I'm sure it was really good advice (and will probably be trying it out in the future) but I solved the problem by doing pacman -Scc (or something like that). Whatever it was that I did, it cleared the cache of downloaded packages and freed about 50% of that partition, which is more along the lines of where I had expected to be in terms of disk usage right now. Thanks all!
Last edited by rsw (2008-10-16 00:53:57)
Offline