I have recently run rather short on my root partition and decided to expand. I added a second hard disk to the computer a while ago and it has sit mostly unused because a good portion of the material I added went into /var/www/html/photos instead of /mnt/hdb1 where I had mounted the second drive.
Now as the space is becoming more necessary I would like to move the website and whatever else to the /var partition. I have only moved some windows programs on a Samba share to the new hard disk so far (path: /mnt/hdb1/content), and that would go fine in /var, so I want to move the entire /var directory to the second hard disk, and remount it as /var
Is there anything special I should do, aside from just copying the whole contents of /var/ to /mnt/hdb1/, updating fstab, and remounting /dev/hdb1? How do I preserve permissions and timestamps when copying the files? What about the server that is currently running?
I'm guessing that I would need to switch Apache off, but I don't know what else might be running and what I should disable before doing that.
Process List:
Code:
PID TTY TIME CMD
1 ? 00:00:04 init
2 ? 00:00:09 keventd
3 ? 00:00:04 kapmd
4 ? 00:00:39 ksoftirqd_CPU0
5 ? 00:01:29 kswapd
6 ? 00:00:02 bdflush
7 ? 00:00:03 kupdated
8 ? 00:00:00 mdrecoveryd
12 ? 00:08:03 kjournald
68 ? 00:00:00 khubd
163 ? 00:00:00 kjournald
164 ? 00:00:03 kjournald
165 ? 00:00:02 kjournald
465 ? 00:00:03 syslogd
469 ? 00:00:00 klogd
578 ? 00:00:11 sshd
592 ? 00:00:00 xinetd
605 ? 00:00:02 lpd
616 ? 00:00:01 gpm
627 ? 00:00:33 httpd
636 ? 00:00:00 crond
643 ? 00:00:00 mysqld_safe
684 ? 00:21:44 mysqld
710 ? 00:00:19 xfs
723 ? 00:00:02 smbd
735 ? 00:02:22 nmbd
737 ? 00:00:00 nmbd
754 ? 00:00:00 atd
771 ? 00:00:36 Xvnc
788 ? 00:00:00 mwm
790 ? 00:00:00 Xvnc
797 ? 00:00:00 xstartup
802 ? 00:00:00 xterm
803 ? 00:00:00 mwm
804 ? 00:00:01 gedit
826 pts/1 00:00:00 bash
894 ? 00:00:04 noip2
896 ? 00:00:00 login
897 tty2 00:00:00 mingetty
898 tty3 00:00:00 mingetty
899 tty4 00:00:00 mingetty
900 tty5 00:00:00 mingetty
901 tty6 00:00:00 mingetty
998 ? 00:00:01 gnome_segv2
15015 tty1 00:00:00 bash
15246 ? 00:00:36 artsd
15267 ? 00:27:39 autorun
22897 ? 00:00:00 nessusd
27988 ? 00:00:00 xterm
27990 pts/0 00:00:00 bash
6122 ? 00:00:18 httpd
6123 ? 00:00:16 httpd
6124 ? 00:00:19 httpd
6125 ? 00:00:16 httpd
6126 ? 00:00:22 httpd
6127 ? 00:00:21 httpd
6128 ? 00:00:24 httpd
6129 ? 00:00:17 httpd
6537 ? 00:00:00 kdm
6549 ? 00:08:22 X
6550 ? 00:00:00 kdm
6555 ? 00:00:00 startkde
6598 ? 00:00:00 ssh-agent
6645 ? 00:00:00 kdeinit
6649 ? 00:00:00 kdeinit
6652 ? 00:00:00 kdeinit
6654 ? 00:02:34 kdeinit
6663 ? 00:00:13 artsd
6669 ? 00:00:02 kdeinit
6670 ? 00:00:00 kwrapper
6672 ? 00:00:01 kdeinit
6673 ? 00:00:50 kdeinit
6675 ? 00:00:15 kdeinit
6677 ? 00:01:46 kdeinit
6686 ? 00:00:02 kdeinit
6687 ? 00:01:03 kdeinit
6689 ? 00:00:47 kdeinit
6690 ? 00:00:01 pam-panel-icon
6691 ? 00:00:00 gpilotd
6693 ? 00:00:05 kdeinit
6695 ? 00:00:02 kalarmd
6697 ? 00:00:00 pam_timestamp_c
6699 ? 00:00:00 gnome-name-serv
6706 pts/4 00:00:00 bash
6794 ? 00:04:48 xmms
6934 ? 11:44:39 kdf
6943 ? 00:00:03 kdeinit
6997 ? 00:00:02 kdesktop_lock
7323 ? 00:00:15 httpd
7396 ? 00:00:06 httpd
7397 ? 00:00:14 httpd
7398 ? 00:00:12 httpd
7403 ? 00:00:09 httpd
7404 ? 00:00:12 httpd
7405 ? 00:00:08 httpd
7406 ? 00:00:06 httpd
7407 ? 00:00:10 httpd
7408 ? 00:00:10 httpd
7409 ? 00:00:12 httpd
7410 ? 00:00:12 httpd
9018 ? 00:00:46 smbd
9071 ? 00:00:00 smbd
9113 pts/0 00:00:26 kdf
9115 ? 00:00:00 kdeinit
9118 ? 00:00:00 kdeinit
9121 ? 00:00:00 kdeinit
9123 ? 00:00:14 kdeinit
9371 ? 00:00:00 sshd
9374 pts/5 00:00:00 bash
9662 pts/5 00:00:00 ps
Is it possible/likely that any of those processes are using files in /var?
Am I forgetting anything?