Click to See Complete Forum and Search --> : Expanding /home


mattcald
01-03-2001, 06:57 PM
Is there any way to expand the /home directory without having to reinstall everything? I thought 100MB was plenty for just me, and it is just about full. I would like to expand it just a bit.

------------------
Where do you REALLY want to go today??

FoBoT
01-03-2001, 07:05 PM
Originally posted by mattcald:
I thought 100MB was plenty for just me, and it is just about full. I would like to expand it just a bit.



you mean /home is in its own partition which is 100MB?

if so, you will have to use a program (like partition magic, but i think there might be a free linux version, anyone?) that will let you dynamically (non-destructively) change the partition size, ie make it bigger

ph34r
01-03-2001, 09:37 PM
Or, if you have enough unpartitioned space, you could make a new partition there, copy the stuff from /home to it, change/add the proper entry in /etc/fstab, and do some mounting and umounting.

milanuk
01-03-2001, 10:16 PM
The 'normal' ways of doing are either a) reinstall and get the partitioning right (not really the 'best' way, but probably the most fool-proof if you don't have a lot of time sunk into configuring your system yet), b) adding a disk and creating a filesystem and either 1) moving the whole /home over, or 2) creating symlinks like /home/user1/foo to the new drive and moving users home directories to there. Time consuming, but effective. The other option that has came about because all the other options require more down time is the Logical Volume Manager, or LVM, and tools for dynamically resizing existing partitions. Possibly a bit more that you're looking to get into just yet, but maybe not. I haven't had to get into it yet, since my /home directory is about 16G all on one hard drive. Basically, unless the system is something like a dedicated dns server or firewall, i.e. it is going to have any number of users w/ interactive logins, you need to have plenty of space under /home. Like everything you can spare http://www.linuxnewbie.org/ubb/wink.gif

Monte

posterboy
01-04-2001, 07:20 AM
LVM has indeed been my answer. If you "fix" this, it will raise it's head again. It just isn't possible to predict what size any given dir will ever need to be. LVM re-sizes up and down at will, is limited only by how many and how big the drives are, and can even export itself to another computer. The 2.4.0 series kernels support it natively, there are patches for the older ones. Look on Google for linux LVM. Ray


------------------
ray@raymondjones.net
HTTP://www.raymondjones.net

mtf8
01-04-2001, 11:15 PM
there is a tool called 'parted' on freshmeat.net which can be used to resize partitions (like Partition Magic).

funny that I came across this post tonight since I just did the same thing. I didn't end up using parted since I've had an NT partition that I wanted to delete anyway. Here's a quick rundown of what I did..

fdisk /dev/hda
delete unwanted partition
create new (remember how many blocks in new)
write changes/exit

mkfs.ext2 <device> -b <# of blocks in dev>

restart in single user mode
telinit 1

mkdir /mnt/home
mount -t ext2 /mnt/home <device>

cp -a /home/* /mnt/home
cd /mnt/home

change ownerships of directories and files here using chown

mv /home /home.old

mkdir /home

edit /etc/fstab to include mount point

umount /mnt/home
mount /home

telinit 3

---------
This is probabably pretty dirty but I just got the job done for the first time so bear with me http://www.linuxnewbie.org/ubb/smile.gif