Move the /var directory to Softraid array

Hello altogether,

I have an installation of Nethserver 8… how can I move the /var directory to a new Softraid array of disks?

The thing I’ve tried:

  • copy the original content of /var to a temp subdirectory
  • mount /var via /etc/fstab to a temporary mount point
  • copy the content of the the temp subdirectory to the temporaray mount point
  • then reboot to get the RAID array mounted as new /var directory

The server boots without problem, but I can not move older emails to the newly mounted server.

Where is my error in the way I do this? Can anybody help?

Thanks in advance and best regards,

Frank

How do you move the mails, via a mail client or in the filesystem? What’s the error?

Here moving /var worked like this:

Create a temporary mount dir /mnt/temp

Mount the destination disk to /mnt/temp

Copy var content to the destination. In this case we preserve the file attributes:

cp -apx /var/* /mnt/temp

Backup source var: (delete later when everything works)

mv /var /var.old

Create var dir:

mkdir /var

Edit /etc/fstab to add something like:

UUID=525810a6-2492-4989-9b19-34943f73ac2c /var xfs defaults 0 0

Reboot.

(Source)

Hello Markus,

thank you very much… my mistake was, that I combined two activities… I had a /var directory of a former NS8 installation and thought, that I could use this as a basis… which did not work.

Now I took only the newly installed /var directory onto the Softraid volume, mounted it newly and moved the older emails with Thunderbird from a backup to the new /var directory.

thank you very much for that hint, best regards,

Frank

1 Like