My partition on /var/www is 20gig: ext3 /dev/sda2 I want to move all websites to a new disk 80gig: ext3 /dev/sdb1 ext3 /dev/sdb1 is now mounted as /backup - I have in fstab: LABEL=/backup /backup ext3 suid,dev,exec 0 2 LABEL=/var /var ext3 grpquota,suid,dev,usrquota,exec 0 2 - and mtab: /dev/sda2 /var ext3 rw,grpquota,usrquota 0 0 - ext3 /dev/sdb1 must be /var/www Can i simple edit mtab and fstab and reboot? What i have to do?
what I did is the following: mv the www folder to something else: mv /var/www /var/www2 Then create the new www folder mkdir /var/www and then mount the new harddrive in the /var/www folder and finally copy all the data back to the new location cp -pR /var/www2/* /var/www/
Was not ok.. My labels are wrong, i had to change LABEL=/backup to LABEL=/dev/sda2 etc.. After that i moved with success. Thanks, Herbert
Hello sjau, First make a map /old then cp -pR /var/* /old umount /backup umount /var when /var is busy then force umount. After that edit /etc/fstab - #old line (/backup is /dev/sdb2 and /var is /sda2) #LABEL=/backup /backup ext3 suid,dev,exec 0 2 #LABEL=/var /var ext3 grpquota,suid,dev,usrquota,exec 0 2 - #new line (/backup is /dev/sda2 and /var is /sdb2) LABEL=/dev/sda1 /backup ext3 suid,dev,exec 0 2 LABEL=/dev/sdb1 /var ext3 grpquota,suid,dev,usrquota,exec 0 2 - mount /backup mount /var cp -pR /old/* /var rm /old reboot, the PID files in /var killed and some service stopped. After reboot all service is running.