LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   moving unallocated disk space into reiserfs partition. (https://www.linuxquestions.org/questions/linux-general-1/moving-unallocated-disk-space-into-reiserfs-partition-433108/)

GUIPenguin 04-08-2006 02:35 PM

moving unallocated disk space into reiserfs partition.
 
I have setup many gentoo installations before, and have never had to do this. I was rushing today getting gentoo installed on my laptop. I was meaning to set my swap (/dev/sda3) as +1024M but now it seems after the installation and everything that I set this partiton some how to around 8GB LOL.

and of course I used the rest of the space for my linux root file system / which is mounted at (/dev/sda4) and this is 6.9GB it should be a lot bigger had I not made that mistake. It is formated and using reiserfs 3.6

is there any possible way to reduce the side of my swap partition and safely merge the remaining free space for my linux file system.

I booted with PQMagic bootable cd, and I could resize my swap partition back to 1024mb, but I cant merge the remaining space into my /dev/sda4 partition. What should i do? (if worse comes to worse I would have to use fdisk to make a temp partition with the free space left over from re-sizing the swap with pqmagic and dd or rsync everything onto a new temp file system, and then delete /dev/sda4 and re-create it some how. Any thoughts? Thanks.

d0odman 04-08-2006 02:44 PM

You could make a stub, and mount the extra space on it.

LVM would be easier, if you used that at first. You just add the unused extents to the LV in question and do a resize_reiserfs. You wouldn't even need to boot in to PQMagic, and could do it live. That's a bit advanced, though.

GUIPenguin 04-08-2006 02:47 PM

I have never done that before... know of any docs or toturals out there that may be of use to me?

d0odman 04-08-2006 03:07 PM

For the first (and easier) part? I can tell you how to do that now. Make a directory, say 'morespace' in /. Edit fstab to mount it at boot. fstab should be in /etc. Add the following line to it:

Code:

/dev/hd? /morespace reiserfs defaults 1 2
where hd? is the newly formatted recovered space from your resized swap partition.

After you edit fstab, you can mount the new space without rebooting. Just issue a 'mount /morespace' as root, and the space will show up. The only problem with this solution, is making the space available to all your users, and REMEMBERING there is space there. But, it's a quick and dirty fix.

LVM is another beast entirely. Check out (I'm really disliking suggesting this) the howtos on 'logical volume management'. This requires a lot of forethought on your part, and pre-setup, in order to get going. You'll also have to probably install a new kernel, in some cases. Don't get me started on maintenance if something goes wrong. Once it's up and running, it's pretty handy to be able to resize your partitions on the fly.


All times are GMT -5. The time now is 06:52 PM.