Migrate Directory to Separate Disk Partition
I am running Red Hat Linux Enterprise v4.0.
When I do a df -h to check for disk space, I have this configuration: Filesystem Size Used Avail Use% Mounted on /dev/sda9 2.0G 260M 1.7G 14% / /dev/sda3 190M 12M 170M 7% /boot none 1007M 0 1007M 0% /dev/shm /dev/sda8 1012M 33M 928M 4% /tmp /dev/sda5 9.7G 2.5G 6.7G 27% /usr /dev/sda6 9.7G 126M 9.0G 2% /var /dev/sda2 2.5G 1.3G 1.1G 54% /home 192.168.1.100:/home/software 66G 3.5G 59G 6% /mnt/software 192.168.1.101:/home/software 2.5G 1.9G 498M 80% /mnt/software ---------------------------------------------- I'm unsure how to interpret all this. So, my questions are: 1) sda9 is mounted on '/'. But /tmp, /usr, /var, and /home, are directories under '/'. How can those directories be bigger than '/'? 2) How do I know how much un-partitioned space is available? 3) I have one mounted partition that is taking up 66G of space. How do I reduce the size of this partition and use the space to create a new partition? How do I reduce the size of the 66G partition and use the space to add to an existing partition? Will I lose any existing data? I guess that's all for now. Thanks in advance for your assistance. |
1) The /tmp /home and other directories are on separate partitions, each having a certain amount of space allocated to use. The / or /tmp just refers to a mount point and is meant to keep some sort of logical hierarchy. So even though your root partition is a separate partition in its own right, you have a /tmp partition that logically resides under the root partition, but in reality is an entirely separate storage area. Files that get put into /tmp aren't being stored in the root partition, just like files that are stored in the root directory wouldn't be stored in /tmp (unless explicitly put there).
2) You can use a command line utility such as fdisk, cfdisk, or parted, or if you want a graphical utility you could try out gparted, qtparted, or kparted. 3) I'd try using parted/gparted/kparted/qtparted. If you've ever used partition magic, they're quite similar to that program. As to whether or not you'll lose data, you shouldn't, but as always when changing hard drive disc configurations, make a backup of anything that you can't afford to lose. Hope that helps! :cool: |
All times are GMT -5. The time now is 02:54 AM. |