[arch-general] Migrating /var to a different partition

Jeff Daniel Rollin-Jones jeff.rollin at gmail.com
Thu Sep 4 07:44:49 EDT 2014


I'd say copy everything in /var to /mnt. 

cp -a /var/* /mnt

or

cp -dpR /var/* /mnt

That way you don't lose anything if there's a power cut at an inconvenient time, and you can change ftstab, reboot, and then check everything's working before you hose your original /var (which if you do it this way you really only need to do if (a) "/" is full and (b) original /var is big enough to be worth the trouble reclaiming the space (but remember to go into rescue mode and unmount your new /var first, if you do this!)

Jeff

Sent from my iPhone

> On 4 Sep 2014, at 12:36, Damjan Georgievski <gdamjan at gmail.com> wrote:
> 
> make a filesystem on the extra partition (mkfs.ext4)
> enter resuce or emergency mode (systemctl rescue) so that the least services run
> 
> mount the new partition to /mnt
> move everything from /var to /mnt
> unmount /mnt
> edit the /etc/fstab
> 
> reboot
> 
> 
> 
>> On 4 September 2014 13:13, Sri Krishna <kitchi.srikrishna at gmail.com> wrote:
>> Hi,
>> 
>> I'm doing a clean install of Arch on a new computer, and during the install
>> I'd already set aside 2GiB for the /var partition.
>> 
>> Except I forgot to add it to fstab before I exited chroot, and booted into
>> Arch and installed a DE etc. Now two days later I realize that Arch has
>> already created a /var directory on the / partition. How do I migrate /var
>> into the partition I'd originally created for it?
>> 
>> Is it as simple as adding a line to fstab and rebooting?
>> 
>> Thanks,
>> Krishna
> 
> 
> 
> -- 
> damjan


More information about the arch-general mailing list