repartitioning /home
i partitioned my linux installation (RHEL) to /home, /var, /tmp, /, /boot, swap
recently my /home usage is getting higher. is it possible to repartition them and move "more space" from /var to /home? Its on the same harddisk. Thanks! |
I at first thought you could put the big files on another partition then symlink to it from your home dir, but my friend say the best idea would be to
usermod -d /export/home/tgo tgo and change your home directory completely. Either way should work. |
hmm but i have no other harddisk space.. and i have over-partitioned / actually (22GB!)
So not possible to just move space to /home? |
What's the actual layout (df -m), how much space would you like to shift?
Cheers, Tink |
Filesystem Size Used Avail Use% Mounted on
/dev/sda7 22G 1.6G 19G 8% / /dev/sda1 99M 11M 83M 12% /boot none 506M 0 506M 0% /dev/shm /dev/sda2 29G 27G 450M 99% /home /dev/sda5 2.0G 105M 1.8G 6% /tmp /dev/sda3 20G 487M 18G 3% /var I'm looking to move 10GB from / and maybe another 5GB from /var possible? |
Oh boy :) ... what filesystem are you using?
With a little luck you may be able to use a live-CD with qparted to resize them; if that doesn't work, I'd go and use a live CD, backup the smaller partitions to one of the bigger ones, remove & recreate that backed-up partition on the fly, mkfs, and untar stuff back into it (always being aware of potential changes to fstab!) In fact, it the qparted doesn't work I'd the following. (I hope you have some means of backup ;}) back-up /var and /tmp to / delete /var and /tmp delete /home recreate /home with the same starting sector run resize2fs (resizefs.reiserfs) & pray check whether that all went well remove the fstab entries for /var and /tmp mount /home from the live cd, copy the tar-balls for var & tmp from /; ... You get the idea ;} Cheers, Tink |
This partitioning scheme is way too complicated for my tastes.
The easy way to add more space would be to install another HD and mount it at /home The gparted live CD---for one--will resize partitions. Backup everything before doing anything else. |
Code:
Filesystem Size Used Avail Use% Mounted on Consider: Do you really need to partition? Or could you get by with one big / partition that holds everything? If you determine you need to partition, consider why you might have left /usr out of your partitioning scheme above. Was its omission purposeful or accidental? Given you've pulled /tmp, /var, and /boot out to seperate partitions I would have expected to see /usr on a seperate partition as well (that's fairly standard). Also /opt, but that one is of less importance on many systems. Also consider the use of LVM if you decide you need to partition, but really don't know how big each partition should be on your system. Resizing hard partitions when they contain data is just ... yeuch! You won't want to do it very often (preferrably never). The potential of screwing things up and losing data should not be taken lightly. |
hmmm i'm really quite a noob when it comes to this.. but i am all ears to learn more new things :)
I have been given that recommendation for partitioning since i started working... its mainly for web servers. All our files are put in /home (thus the size requirement) /var holds our logs and dB we dont' use /usr thus not there... what is it for...? Actually though I have been given this set of partitioning values, I have been thinking.. despite partitioning, its all in the same harddisk. Does it matter or have any benefits at all? i actually am ready to reinstall the OS (RHEL) and re-parition.. but thought i ask you guys first and I am using ext3 |
Quote:
Partitioning can add security, robustness, flexibility, and performance to name a few. But at the cost of complexity. Example 1: You have a server with many users. A not-so-bright user writes a program that goes into an endless loop and keeps appending to a gigantic file it creates in /tmp. If everything is on one big / partition, your server will probably come crashing down when the dumb user's program consumes all available disk space. However, if /tmp was on a seperate partition it would still fill up, but ONLY /tmp, and your server would stay up and running (maybe hobbled ... but running). This improves robustness. Example 2: /usr shouldn't change except when you install certain new programs. So put it on a seperate partition and mount it readonly during normal times. You won't accidently modify /usr, and a malicious cracker will have a harder time doing so. This improves security and robustness. Example 3: You have lots of personal stuff under /home. You want to change distros from SuSE to Debian. If /home is a seperate partition you can easily install the new distro and then mount your old /home ... unaffected by the distro switch. This increases flexibility. Example 4: You want to use Reiser for your OS filesystems, but XFS for your filesystem that holds huge video files (for performance reasons). You can't do this if everything is on one big / partition. This increases flexibility and performance. There are many more examples of how partitioning helps, but you get the idea. But with the added benefits comes the added complexity of setting up and mounting different partitions. These benefits may be of minor importance on a home system, and the complexity of administration unwarranted. For a server, I can't imagine NOT partitioning, and using LVM on top of that. Even my home system is partitioned and LVM-ed out the ying-yang, but for me the maintenance does not represent added complexity. It's just second nature and I don't think twice about it. |
wow... but what's the recommended partition then?
I'm running on hardware RAID, still a need to use LVM? |
lvm doesn't give you redundancy or performance, it gives you
just flexibility. Basically I think that it's still a good idea to e.g. separate /home, /var and /tmp onto distinct partitions, just because it makes it harder to harm the machine by filling up disk as a normal user. What lvm does is it gives you the flexibility to change "partition" sizes on the fly. Cheers, Tink |
Quote:
I can still use LVM, and it will aloow me to change partition...?? |
LVM has nothing to do with RAID. LVM stands for "Logical Volume Management". Here's a symopisis of what it can do for you: http://tldp.org/HOWTO/LVM-HOWTO/benefitsoflvmsmall.html
And here's the entire "LVM HowTo" (the above link is part of this document): http://tldp.org/HOWTO/LVM-HOWTO/ [edit] Ok, I was just rereading this thread and I just HAVE to fix my above typo. "symopisis"? What kind of word is that?! Yes, I know how to spell "synopsis". I just can't TYPE it! :p [/edit] |
try the gparted live cd. It let's you allowcate space from one partition to another. very much like partitionmagick for windows.
|
All times are GMT -5. The time now is 02:24 AM. |