mystified Posted October 25, 2007 Report Share Posted October 25, 2007 I don't have enough space on / in Debian so I wanted to create a new /usr partition from /home. I booted into Mandriva One, went to mcc and disk partitioning. Clicked on /home, unmounted it and then clicked on resize and it told me that partition was not resizable. Any ideas? Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted October 26, 2007 Report Share Posted October 26, 2007 You can try PartedMagic, a specialized livecd featuring a nice graphical partitioning tool, gparted: http://partedmagic.com/ It may not work either, but at least it's a small download. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted October 26, 2007 Report Share Posted October 26, 2007 The easier way to resize it is boot in single mode and then do it from the command line. What filesystem type is it? ext3? reiserfs? etc, etc? I just deleted home and resized /var to use the space /home was using on an install I had. For you however, it's easy, since you just need to change /home mountpoint to /usr instead. Do this: 1. Tar the contents of /home like this: tar cvjpf home.tar.bz2 those parametes will make a bzip2 file and will keep the permissions on all files for when you extract them again. It's important for any user accounts you have on your system. 2. Make a directory called /usr2 and unmount /home and mount it to /usr2 removing the contents of /home since you don't need anymore. Copy the contents of /usr to /usr2 like this: cp -dpRx /usr/* /usr2/ again, this will keep permissions on all files. Now, edit /etc/fstab and create entry for /usr. Unmount /usr2. Remove the existing contents /usr and reboot your system. Untar the home.tar.bz2 to /home. All this will have to be done from rescue cd or similar. Alternatively, if you need to keep /home, then I suggest you use the command line resize tools, but it's not as easy as you think since you then have to use fdisk to delete, and then recreate the partition smaller than it was, but big enough to accommodate what data is already there. Also, perhaps parted will do what you need, but again rescue or single user mode to do this. And remember, backup your data in case it goes wrong. Quote Link to comment Share on other sites More sharing options...
mystified Posted October 26, 2007 Author Report Share Posted October 26, 2007 Well I took pmpatrick's advise and I found out why I can't resize /home. It's showing that it's full and it's a 20GB partition with maybe 1 GB being used. Any ideas on how to fix this? I really don't want to delete /home. I just want to resize it. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted October 26, 2007 Report Share Posted October 26, 2007 What filesystem is it? ext3? reiserfs? etc, etc? You failed to mention, so I cannot tell you how to do it unless I know which one it is ;) :D Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted October 26, 2007 Report Share Posted October 26, 2007 I assume that when you boot up your Debian system, your /home partition shows only 1GB being used. Double check that by running: $ df -h Compare that with the output you get when you run that command from within one of your livecds. Quote Link to comment Share on other sites More sharing options...
mystified Posted October 26, 2007 Author Report Share Posted October 26, 2007 It's reiserfs. And when ever I run df -h it shows me the partition is full. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted October 26, 2007 Report Share Posted October 26, 2007 How do you know it's only using 1GB of space then, if df shows it's full? :unsure: I'd be considering looking at archiving whatever stuff you've got there, or deleting what you don't need to reclaim some space. I'm kind of having a hard time trying to understand how 1GB is equating to 20GB though. Unless something was being misreported somewhere. What you can do, is this: cd /home du -sh `ls` will give you summary listing by directory. If only one user, go into the user directory itself, and rerun the same command again so you can find out where all the space is going. Quote Link to comment Share on other sites More sharing options...
mystified Posted October 26, 2007 Author Report Share Posted October 26, 2007 I found out what's happening and I can't figure out why. My /home is reporting as only 283 MB when I know the partition was over 20 GBs. I'm going to back up everything on a CD. Delete the partition and create a /usr and a /home. Do I have to copy everything over from my old /usr directory to the new partition? Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted October 26, 2007 Report Share Posted October 26, 2007 Yup, since /usr will be in the / partition as it stands now. /usr holds all your programs, binaries, everything. So you definitely need to copy it over and empty the original /usr directory before mounting the new /usr. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted October 26, 2007 Report Share Posted October 26, 2007 /dev/hda7 was home of 20gb. It was deleted. /dev/hda7 became 10gb for /usr, /dev/hda8 became 10gb for /home. Copied /usr to new partition. Recreated /home/username directory from cd backup of user. Cleared old /usr directory ready for new partition to mount here. chown new user directory. Edited /etc/fstab to mount new mount points. Quick summary of how we increased space on /. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.