File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes Altering Disk Partitions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Altering Disk Partitions" Watch "Altering Disk Partitions" New topic
Author

Altering Disk Partitions

Matt Holloway
Ranch Hand

Joined: Oct 16, 2003
Posts: 53
being a linux newbie... I goofed. I have two HDDs in my PC, one is XP (I'm trying to get away from), the other (40 GB is Fedora). Here's my problem:
When installing Fedora, I setup two partitions, a 5GB (for OS) and a 35GB (for everything else)... unfortunately, I ended up with /usr in the 35 GB partition (fine), but the /home in the 5GB partition... my 5GB is running out of space, how can I move the /home to the other partition?
Thanks.
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
It's easy. First step is to create a new partition where you want your new /home to sit in. Second step, copy your old home dir to the new partition. Third, umount your old /home partition, and remount to the new onw. If everything works fine, the next step just to modify your /etc/fstab file and reboot.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

If your /home is a whole partition, it will be mentioned in /etc/fstab, the FileSystemTABle.
But if the other partition is /usr, what is your root-partition?

Did you mean 'root' when typing 'home'?
[ May 02, 2004: Message edited by: Stefan Wagner ]

http://home.arcor.de/hirnstrom/bewerbung
Matt Holloway
Ranch Hand

Joined: Oct 16, 2003
Posts: 53
Actually, I should clarify... /usr is a partition (35 GB), everything else is on my 5GB partition (root).
So, how can I move /home to an existing partition? Do I have to shrink the 35GB partition that /usr is using, or can I reallocate some of that space for /home?
It would be some work, but I can do a fresh install on Linux (I'd rather not though, and this would be a good learning exercise for me).

[ May 03, 2004: Message edited by: Matt Holloway ]
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
Ok, so you want to move home out of your root partition and into a new one? You can not move your /home into your /usr partition. I don't know if there are any steps that can shrink a partition, besides re-partition.
Matt Holloway
Ranch Hand

Joined: Oct 16, 2003
Posts: 53
I think my best bet may be to backup my data, and reinstall.... or add another HDD (I have an XP one in there that I'm still trying to wean myself from, maybe soon I can reclaim it from the forces of evil).
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
Yes, this would be the easiest. Another helpful hint I learned over the years, NEVER FULLY ALLOCATE YOUR HARDDRIVE. Nowadays, a 160GB harddrive is common, unless you are a MP3/movies fiend, it's gonna be hard to use all up.
In your case, you should read up more on partition schemes. My personal preference always has been seperate partitions. Like /, /root, /home, /etc, /usr.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

you could move the /home folder to /usr/home, and then create a sym-link to /usr/home after deleting /home.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Altering Disk Partitions
 
Similar Threads
Linux Installation
libc-2.3 on Linux 7.2
Windows 7 with Ubuntu dual Boot
Sharing drives between Linux and Windows
Dual Boot / Partition