Re: want to change /var/log partition to a directory in /var --help
Thankyou so much Ionut for the continuing help :-)
On 5/24/05, Ionut Georgescu <george@pks.mpg.de> wrote:
> Please send fdisk -l /dev/hda. Judging by your /etc/fstab, you can't do
> anything because you have /home and /tmp between /var and /var/log. The
> best you cand do is to move /tmp and /var/log to /var and extend /home
> :-)
O.K here is it
--------------------------------
# fdisk -l /dev/hda
Disk /dev/hda: 255 heads, 63 sectors, 4870 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 61 489951 83 Linux
/dev/hda2 62 365 2441880 82 Linux swap
/dev/hda3 366 3404 24410767+ 83 Linux
/dev/hda4 3405 4870 11775645 5 Extended
/dev/hda5 3405 3647 1951866 83 Linux
/dev/hda6 3648 3890 1951866 83 Linux
/dev/hda7 3891 3914 192748+ 83 Linux
/dev/hda8 3915 4870 7679038+ 83 Linux
---------------------------------------------------------------------------
meanwhile I tried your steps on a similar but got stuck here
# umount log
umount: /var/log: device is busy
>
> I will describe the next steps anyway:
>
> First: ext3 must resized offline. Second, if you modify the partition
> table while running you have to reboot anyway, because the kernel
> cannot reload the partition table while the disk is being used. You can
> combine these two into 2 steps:
>
> cp -r /var/log /home/log.bak
> adjust partition table. delete the /var/log line in /etc/fstab
>
> reboot into single user mode
>
> What happens: after reboot, /dev/hda3 will be larger, but the filesystem
> has not changed yet. Being in single user mode, no program is running
> at all so you can just
> umount /var
> ext2resize /dev/hda3
> mount /var
> done
>
> now you just need to copy log
> mount -o remount,rw /home
> rmdir /var/log
> mv /home/log.bak /var/log
> reboot
>
> Ionut
Thanks a lot Io for the detailed explanation :-)
Kind Regards
Siju
Reply to: