Running out of Room for Linux
I have nearly run out of room on my main Linux partition. There is another partition /dev/hda7 that I have created and formatted in Ext2. I would like to move some of my files over to that partition. I am using Suse 8.2 and tried to do it through Yast but it didn't take. Do I manually need to edit the fstab file? But then how do I, for example, move all the files in /usr to hda7 without screwing up all the settings that depend on these files being where they are now, which is /hda8?
All advice is greatly appreciated. Lawrence |
Have you mounted the new partition to a new directory. If you haven't, you'll need to edit fstab.
So I would go to /etc/fstab and open it up in your favorite text editor. Then append the following to the last line: /dev/hda7 /your new directory here/ ext2 defaults 0 0 I'm not an expert on fstab, but I think that should work. I would then reboot to make sure it mounts on boot up. Then to copy the files I would go into your favorite console (shell) and type cp /usr/* /your new directory/ cp = copy * is a wildcard for all file in that directory. If you want to only copy .txt files I would: cp /usr/*.txt /your new directory/ |
Slight variation to eastsuse's aproach :}
init 1 Make a temporary mountpoint for hda7 cp -dpR /usr /<new_mountpoint> edit fstab, add /dev/hda7 /usr ext2 defaults 1 1 Cheers, Tink |
Here is a very good guide, imho, i wrote it myself:
http://linux.pharm.uic.edu/forums/viewtopic.php?t=11 |
Thanks to the excellent advise I got on this site I just successfully created a /dev/hda7 and mounted it at /usr. Thanks.
I do have a question just for my own edification though. In doing this, I first mounted /dev/hda7 at /mnt and then copied all the files in /usr to /mnt. I did NOT though erase the files already in /usr. When I then mounted /dev/hda7 at /usr, I thought I was going to have two copies of all the files in /usr, but apparently I did not. Did I wipe out the original versions of the files? I can't think I have two copies of all these files lying around because I have indeed freed up a lot of disk space on hda8, which is where the /usr files were originally. So maybe someone could just tell me what happened? Thanks. |
All times are GMT -5. The time now is 06:07 PM. |