You are not logged in.
Hello forum,
I am in the situation where my /var partition is on an old HDD that is to be removed and as a result I need to move /var somewhere else. There is enough room on the SSD that is holding /, so I would like to move my /var there.
So far I have just copied all data from /var (on the old HDD) to a new folder /var_new (on the SSD) via
sudo rsync -aAXv /var/* /var_new
which seems to have worked. (any way to verify that every single file is there?)
The next step would probably be to adjust /etc/fstab, but I'm not sure if it suffices to simply remove the entry for /var in fstab and then rename /var_new to /var. Do I need to rebuild the initramfs? Do I need to change something in the syslinux config? Anything I missed?
Note: I ran the rsync command while the system was online, but the only programs running are a webbrowser and a window manager, do I need to worry about data loss from other processes such as systemd?
Last edited by lamarpavel (2015-10-19 18:50:46)
Offline
Should work. Not sure about open files/implication of doing it from the live system and not from a live cd.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Should work. Not sure about open files/implication of doing it from the live system and not from a live cd.
Alright. I don't feel too good about doing it on a live system either, so I'll just re-do the copying from a chroot before moving on. Thanks.
Last edited by lamarpavel (2015-10-19 18:09:18)
Offline
You can verify if every single file is there(and has been copied correctly) with the following steps:
move to /var:
cd /var
list all the files in var and its space in a file:
tree --du * > ~/var.txt
move to /var_new
cd /var_new
list all the files in var_new and its space in a file:
tree --du * > ~/var_new.txt
check the difference between files:
diff ~/var.txt ~/var_new.txt
If the command does not print anything then both directories are equals, if not then print the files that are different.
Offline
Worked without a hitch, thanks for the help graysky and marioloko.
Offline