Partition exchange
root]# df -lah
Filesystem Size Used Avail Use% Mounted on /dev/hda1 289M 266M 8.0M 98% / none 0 0 0 - /proc usbdevfs 0 0 0 - /proc/bus/usb /dev/hda3 19G 720M 17G 4% /data1 /dev/hda2 19G 192M 18G 2% /data2 none 0 0 0 - /dev/pts /dev/hda5 4.8G 220M 4.3G 5% /home none 440M 0 440M 0% /dev/shm /dev/hda6 4.8G 33M 4.5G 1% /tmp /dev/hda9 15G 4.1G 10G 28% /usr /dev/hda7 4.8G 335M 4.2G 8% /var none 0 0 0 - /proc/sys/fs/binfmt_misc What are the command steps to exchange my root partition for my tmp to gain more root space? Thanks |
-- Please disregard ---
|
This could get a bit tricky, so use caution!!
Backup your /etc/fstab as fstab.bak or similar. Instead of detaching /tmp from /dev/hda6 _live_, I would suggest removing the line that mounts /tmp from /etc/fstab. And reboot. ( If you are really brave, you can try umount /tmp rightaway ) Either way, now is the time to copy the contents of your root partition to your would-be root partition. I would choose to do it one MEG of data ( 1024*1024 bytes ) at a time. dd if=/dev/hda1 of=/dev/hda6 bs=1048576 After mirroring, you can mount /dev/hda6 under a test directory and see if the contents are intact. Now edit your / mountpoint on /etc/fstab and replace your root device with /dev/hda6. mount -a -o remount to remount all filesystems. If you use the RH mount version, you may have to use -O instead of -o, I cant remember. Now, if everything works fine, you can mke2fs /dev/hda1 before placing it under /tmp in fstab. Good Luck. |
All times are GMT -5. The time now is 02:11 AM. |