Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to affect /var to a new partition. Do I just need to add a line to fstab file and reboot??

My fstab:

/dev/md1    /   ext4    errors=remount-ro,relatime,discard  0   1
/dev/md2    /data   ext4    defaults,relatime   0   2
/dev/sda3   none    swap    defaults    0   0
/dev/sdb3   none    swap    defaults    0   0
/dev/md0    /home   ext4    defaults,relatime,discard   0   2
proc        /proc   proc    defaults        0   0
sysfs       /sys    sysfs   defaults        0   0
tmpfs       /dev/shm    tmpfs   defaults    0   0
devpts      /dev/pts    devpts  defaults    0   0

I'm not sur how to o that, if you could help me, thanks.

share|improve this question
There is the "Hard disk upgrade Mini HOWTO" that should teach you everything you need to know about moving filesystems to new disks/partitions/LVs: – Stefan Förster Sep 13 '13 at 10:37
thanks, but this link talk about a new partition on a new disk. My case is moving a dir on a new partition on the actual disk... – user189288 Sep 13 '13 at 10:41

The general procedure for moving (hot) data from one partition to another is:

  1. Create the new partition

  2. Bring the system to single-user mode

  3. Mount the old partition in its normal place ;
    Mount the new partition somewhere like /mnt

  4. Transfer the data
    (rsync, tar, whatever. Just make sure to preserve permissions and ownership)

  5. Unmount both partitions

  6. Edit /etc/fstab to reflect the new filesystem layout

  7. Reboot and verify

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.