[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

partition changing



hello my guru friends :)

On a web hosting server we have silly partitioning like this:

[anze yokohama ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             6.7G  4.4G  2.0G  69% /
/dev/sda2   	  150G  1G  149G  1% /home
/dev/sda4   	    18G  17G   1G  97% /var

(don't ask, I wasn't designing this :)

So, I would like to swap partition /home with /var, because /var
partition (where all the web hosting files are saved) are running out of
disk space. The partition system id on both partitions is Linux. In
theory this is no problem. But I'm not sure if this is safe to do while
in runlevel 3 (the server is in another country and i don't have a
chance to go there to boot into single mode for maintaining).

So, the only way would be:

- stop the Internet/database services (at least this can be done) on the
server
- backup /var and /home partitions in *.tar file (to keep permissions)
- unmount the /var and /home partitions
- edit the /etc/fstab file to correct mount point
- mount the new /var partition and extract the backup tar file there
- mount the /home partition and extract the backup tar file there
- cross my fingers and hope not to get burned :-/

Of course I would clean the two partitions before restoring backup files
on them. Is this method acceptable? 
Thank you,

-- 
Anze Vidmar <anzevi gmail com>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]