Hi,
I have a mailgw running Centos where trendmicro(IMSS) is installed. it works perfectly. Now, the problem is it is running out of Harddisk.
pls see below and pay attention to / file system (/dev/sda6), where only 1.3 gb is available. these are not Logical volums (LVM)
[root@gateway 17141]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda6 9.7G 7.9G 1.3G 87% / /dev/sda1 99M 9.2M 85M 10% /boot /dev/sda5 15G 11G 3.5G 75% /opt none 627M 0 627M 0% /dev/shm
I checkd with du -h. then, I saw /var has 7.1 gb. So, Now I want to know, If I plug a new harddisk and partion with fdisk and then format that harddisk, will I able to mount /var directory to it ?
Your Ideas?
For sure you will be able to mount /var on your new disk....
but not before you boot single user and copy all the contents across manually and then modify /etc/fstab to reflect the new location of /var.
In my experience it is nigh-on impossible to *move* /var when a system is running.
Hint : next time use LVM *even* if you only have 1 physical disk to start with. It makes this sort of situation an non-event.
Cheers.
----- "Indunil Jayasooriya" indunil75@gmail.com wrote:
Hi,
I have a mailgw running Centos where trendmicro(IMSS) is installed. it works perfectly. Now, the problem is it is running out of Harddisk.
pls see below and pay attention to / file system (/dev/sda6), where only 1.3 gb is available. these are not Logical volums (LVM)
[root@gateway 17141]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda6 9.7G 7.9G 1.3G 87% / /dev/sda1 99M 9.2M 85M 10% /boot /dev/sda5 15G 11G 3.5G 75% /opt none 627M 0 627M 0% /dev/shm
I checkd with du -h. then, I saw /var has 7.1 gb. So, Now I want to know, If I plug a new harddisk and partion with fdisk and then format that harddisk, will I able to mount /var directory to it ?
Your Ideas?
-- Thank you Indunil Jayasooriya _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
----- redhat@mckerrs.net wrote:
For sure you will be able to mount /var on your new disk....
but not before you boot single user and copy all the contents across manually and then modify /etc/fstab to reflect the new location of /var.
In my experience it is nigh-on impossible to *move* /var when a system is running.
Hint : next time use LVM *even* if you only have 1 physical disk to start with. It makes this sort of situation an non-event.
Cheers.
----- "Indunil Jayasooriya" indunil75@gmail.com wrote:
Hi,
I have a mailgw running Centos where trendmicro(IMSS) is installed. it works perfectly. Now, the problem is it is running out of Harddisk.
pls see below and pay attention to / file system (/dev/sda6),
where
only 1.3 gb is available. these are not Logical volums (LVM)
[root@gateway 17141]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda6 9.7G 7.9G 1.3G 87% / /dev/sda1 99M 9.2M 85M 10% /boot /dev/sda5 15G 11G 3.5G 75% /opt none 627M 0 627M 0% /dev/shm
I checkd with du -h. then, I saw /var has 7.1 gb. So, Now I want to know, If I plug a new harddisk and partion with fdisk and then
format
that harddisk, will I able to mount /var directory to it ?
Your Ideas?
-- Thank you Indunil Jayasooriya _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Sorry for the top post !!!!
On Jan 18, 2008 9:08 AM, redhat@mckerrs.net redhat@mckerrs.net wrote:
For sure you will be able to mount /var on your new disk....
Thank you very much for it.
but not before you boot single user and copy all the contents across manually and then modify /etc/fstab to reflect the new location of /var.
If I boot from single user mode and copy /var directory to new hardiisk, What will happent to permissions?
Then, What should I do to /var directory on OLD HardDisk. Should I leave it alone or Should I rename it or Should I delete it?
Remember, Curently / and /opt and /boot and /swap are MOUNTED. i.e /var is under / partition.
here is my /etc/fstab
[root@gateway root]# cat /etc/fstab LABEL=/ / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 LABEL=/opt /opt ext3 defaults 1 2 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/sda2 swap swap defaults 0 0 /dev/sda3 swap swap defaults 0 0 /dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
In my experience it is nigh-on impossible to *move* /var when a system is running.
Noted.
Hint : next time use LVM *even* if you only have 1 physical disk to start with. It makes this sort of situation an non-event.
Yes , I aggree with you.
but not before you boot single user and copy all the contents across manually and then modify /etc/fstab to reflect the new location of /var.
If I boot from single user mode and copy /var directory to new hardiisk, What will happent to permissions?
use rsync to copy the data over - this will preserve all perms etc very nicely - yes tar will also but i prefer rsync
Indunil Jayasooriya wrote:
On Jan 18, 2008 9:08 AM, redhat@mckerrs.net redhat@mckerrs.net wrote:
For sure you will be able to mount /var on your new disk....
Thank you very much for it.
but not before you boot single user and copy all the contents across manually and then modify /etc/fstab to reflect the new location of /var.
If I boot from single user mode and copy /var directory to new hardiisk, What will happent to permissions?
you need to copy everything with the same permissions. rsync, tar cpf, ... should do, as already suggested.
Then, What should I do to /var directory on OLD HardDisk. Should I leave it alone or Should I rename it or Should I delete it?
you will need /var to mount the partition of the second hard drive. so the contents of the "old" one should be moved out of the way (mv or whatever).
It is possible to move to the new var without rebooting. you must stop all services that use /var (lsof |grep /var ... etc) to be able to unmount it. if the box is near you, rebooting is a lot simpler though.
Remember, Curently / and /opt and /boot and /swap are MOUNTED. i.e /var is under / partition.
here is my /etc/fstab
[root@gateway root]# cat /etc/fstab LABEL=/ / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 LABEL=/opt /opt ext3 defaults 1 2 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/sda2 swap swap defaults 0 0 /dev/sda3 swap swap defaults 0 0 /dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
In my experience it is nigh-on impossible to *move* /var when a system is running.
Noted.
Hint : next time use LVM *even* if you only have 1 physical disk to start with. It makes this sort of situation an non-event.
Yes , I aggree with you.