[opensuse] moving /var from a prefailure disc to a new one, saving a kvm installation
Hi. I have long time ago on my TW system moved /var to a separate disc. This mainly because I have my virtualised disks on it, with kvm/quemu and I needed a lot of space. I also wanted to avoid them, exactly in the current scenario were I did brake the system and reinstalled. Now the situation: I am referring to what I did to https://linuxconfig.org/how-to-move-var-directory-to-another-partition I have /dev/sda1 (for boot/efi) /dev/sda2 (2 GB swap) /dev/sda3 (root) on a ssd (sda) then /dev/sdb1 (for old var - this disc shows in smart prefailure and old age, read errors and had to be changed urgently). It was worth 500 GB data and was mounted as /var (currently it is NOT mounted as var, as the installation was not possible to a problem with the partition) I have a former /home that was already migrated on /dev/sdc1 (with 2 TB of space now) and that will be attributed to /var I have a new /dev/sd1 drive with 4 TB of data for /home (the old went straight anyway...). The system on sda and with sdd1 as /home works perfectly. Now I want to save my kvm data. I did mkdir /mnt/oldvar mkdir /mnt/newvar then mount /dev/sdb1 /mnt/oldvar mount /dev/sdc1 /mnt/newvar I then issued # rsync -aqx --progress /mnt/oldvar/* /mnt/newvar and copied all the old unused var to the new location. So at least the kvm data is now save. Now, I would like of course to mount the /mnt/newvar as regular /var and I wanted to ask: can I do this, or is it necessary to rsync the /var of now to the /mnt/newvar and if so, how can I be sure that data that is not there (my old kvm) is not erased and that my content of /var of the current system is actually taken. Or can I simply to what is in the howto and mount the old var (as logs I would only loose the successful installation... but temp system files etc? As I have not experience to migrate /var in these conditions, I would be grateful for some insight. _________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postf�cher sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 24/01/2019 18.24, stakanov wrote:
Hi. I have long time ago on my TW system moved /var to a separate disc. This mainly because I have my virtualised disks on it, with kvm/quemu and I needed a lot of space. I also wanted to avoid them, exactly in the current scenario were I did brake the system and reinstalled.
Now the situation: I am referring to what I did to https://linuxconfig.org/how-to-move-var-directory-to-another-partition I have /dev/sda1 (for boot/efi) /dev/sda2 (2 GB swap) /dev/sda3 (root) on a ssd (sda) then /dev/sdb1 (for old var - this disc shows in smart prefailure and old age, read errors and had to be changed urgently). It was worth 500 GB data and was mounted as /var (currently it is NOT mounted as var, as the installation was not possible to a problem with the partition) I have a former /home that was already migrated on /dev/sdc1 (with 2 TB of space now) and that will be attributed to /var I have a new /dev/sd1 drive with 4 TB of data for /home (the old went straight anyway...). The system on sda and with sdd1 as /home works perfectly. Now I want to save my kvm data. I did mkdir /mnt/oldvar mkdir /mnt/newvar then mount /dev/sdb1 /mnt/oldvar mount /dev/sdc1 /mnt/newvar I then issued # rsync -aqx --progress /mnt/oldvar/* /mnt/newvar and copied all the old unused var to the new location. So at least the kvm data is now save.
Now, I would like of course to mount the /mnt/newvar as regular /var and I wanted to ask: can I do this, or is it necessary to rsync the /var of now to the /mnt/newvar
yes
and if so, how can I be sure that data that is not there (my old kvm) is not erased and that my content of /var of the current system is actually taken. Or can I simply to what is in the howto and mount the old var (as logs I would only loose the successful installation... but temp system files etc?
As I have not experience to migrate /var in these conditions, I would be grateful for some insight.
Why not mount /dev/sdc1 /var/virtualmachines or whatever is the exact directory? If not, use 'mc' to graft /mnt/newvar to /var/virtualmachines, then # rsync -aqx --progress /var/* /mnt/newvar preferable on a rescue system. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
On 24/01/2019 18.24, stakanov wrote:
Hi. I have long time ago on my TW system moved /var to a separate disc. This mainly because I have my virtualised disks on it, with kvm/quemu and I needed a lot of space. I also wanted to avoid them, exactly in the current scenario were I did brake the system and reinstalled.
Now the situation: I am referring to what I did to https://linuxconfig.org/how-to-move-var-directory-to-another-partition I have /dev/sda1 (for boot/efi) /dev/sda2 (2 GB swap) /dev/sda3 (root) on a ssd (sda) then /dev/sdb1 (for old var - this disc shows in smart prefailure and old age, read errors and had to be changed urgently). It was worth 500 GB data and was mounted as /var (currently it is NOT mounted as var, as the installation was not possible to a problem with the partition) I have a former /home that was already migrated on /dev/sdc1 (with 2 TB of space now) and that will be attributed to /var I have a new /dev/sd1 drive with 4 TB of data for /home (the old went straight anyway...). The system on sda and with sdd1 as /home works perfectly. Now I want to save my kvm data. I did mkdir /mnt/oldvar mkdir /mnt/newvar then mount /dev/sdb1 /mnt/oldvar mount /dev/sdc1 /mnt/newvar I then issued # rsync -aqx --progress /mnt/oldvar/* /mnt/newvar and copied all the old unused var to the new location. So at least the kvm data is now save.
Now, I would like of course to mount the /mnt/newvar as regular /var and I wanted to ask: can I do this, or is it necessary to rsync the /var of now to the /mnt/newvar yes
and if so, how can I be sure that data that is not there (my old kvm) is not erased and that my content of /var of the current system is actually taken. Or can I simply to what is in the howto and mount the old var (as logs I would only loose the successful installation... but temp system files etc?
As I have not experience to migrate /var in these conditions, I would be grateful for some insight.
Why not
mount /dev/sdc1 /var/virtualmachines
or whatever is the exact directory?
If not, use 'mc' to graft /mnt/newvar to /var/virtualmachines, then
# rsync -aqx --progress /var/* /mnt/newvar
preferable on a rescue system. That is actually the issue. As it turned out not really transparent at the time what all from /var I had to put under a different location, I did mount
In data giovedì 24 gennaio 2019 18:56:51 CET, Carlos E. R. ha scritto: the entire /var on a different disc. This is the sdb I did migrate to sdc. Now I would like to mount the entire old var copied to sdc instead of /var in sda3 (currently /var is under root and I have not yet installed kvm/quemu, for being sure nothing is used. The question is, does the system risk some malfunction afterwards or not? As /var should have only temp stuff and journals, I would suppose no, but...I am not sure at all. _________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 24/01/2019 19.39, stakanov wrote:
In data giovedì 24 gennaio 2019 18:56:51 CET, Carlos E. R. ha scritto:
On 24/01/2019 18.24, stakanov wrote:
Why not
mount /dev/sdc1 /var/virtualmachines
or whatever is the exact directory?
If not, use 'mc' to graft /mnt/newvar to /var/virtualmachines, then
# rsync -aqx --progress /var/* /mnt/newvar
preferable on a rescue system.
That is actually the issue. As it turned out not really transparent at the time what all from /var I had to put under a different location, I did mount the entire /var on a different disc. This is the sdb I did migrate to sdc. Now I would like to mount the entire old var copied to sdc instead of /var in sda3 (currently /var is under root and I have not yet installed kvm/quemu, for being sure nothing is used. The question is, does the system risk some malfunction afterwards or not? As /var should have only temp stuff and journals, I would suppose no, but...I am not sure at all.
No, var has many other files and long term databases. For instance, the rpm database. Break that, your system is garbage. You can no longer do upgrades, add software, remove software. Reinstall. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
In data giovedì 24 gennaio 2019 19:46:13 CET, Carlos E. R. ha scritto:
On 24/01/2019 19.39, stakanov wrote:
In data giovedì 24 gennaio 2019 18:56:51 CET, Carlos E. R. ha scritto:
On 24/01/2019 18.24, stakanov wrote:
Why not
mount /dev/sdc1 /var/virtualmachines
or whatever is the exact directory?
If not, use 'mc' to graft /mnt/newvar to /var/virtualmachines, then
# rsync -aqx --progress /var/* /mnt/newvar
preferable on a rescue system.
That is actually the issue. As it turned out not really transparent at the time what all from /var I had to put under a different location, I did mount the entire /var on a different disc. This is the sdb I did migrate to sdc. Now I would like to mount the entire old var copied to sdc instead of /var in sda3 (currently /var is under root and I have not yet installed kvm/quemu, for being sure nothing is used. The question is, does the system risk some malfunction afterwards or not? As /var should have only temp stuff and journals, I would suppose no, but...I am not sure at all.
No, var has many other files and long term databases. For instance, the rpm database. Break that, your system is garbage. You can no longer do upgrades, add software, remove software. Reinstall. I DID a reinstall. So what part of the directories of the former /var contain ALL necessary files for the virtualization with kvm and quemu? I know were the virtual HDD are, but this will not be all? The rest I could manually eliminate and then copy the /var and then mount it instead.
_________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hi, Am 24.01.19 um 19:56 schrieb stakanov: ..snip..
I DID a reinstall. So what part of the directories of the former /var contain ALL necessary files for the virtualization with kvm and quemu? I know were the virtual HDD are, but this will not be all? The rest I could manually eliminate and then copy the /var and then mount it instead.
are you sure there are files neccesarry for qemu/kvm inside var? how do you start your virtual machines? with commandline something like this: qemu-system-x86_64 -enable-kvm -hda /home/myhome/kvm/images/myimagfile.img -no-reboot -usb -usbdevice tablet -localtim......... there are no additional config files needed (as far as i know) (only some manual system wide config needed to get access to all needed from kvm if started as user) or with virtmanager? if you use libvirt / virtmanager, there are files in /etc/libvirt/qemu/ (the xml configuration files which point to the image files and set the config for starting qemu) i do not think you need more, of course your image files. .. i personally never used the yast modules for kvm/qemu. if you use them, maybe there will be more config files.... simoN -- becherer.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 24/01/2019 19.56, stakanov wrote:
In data giovedì 24 gennaio 2019 19:46:13 CET, Carlos E. R. ha scritto:
On 24/01/2019 19.39, stakanov wrote:
In data giovedì 24 gennaio 2019 18:56:51 CET, Carlos E. R. ha scritto:
On 24/01/2019 18.24, stakanov wrote:
...
The question is, does the system risk some malfunction afterwards or not? As /var should have only temp stuff and journals, I would suppose no, but...I am not sure at all.
No, var has many other files and long term databases. For instance, the rpm database. Break that, your system is garbage. You can no longer do upgrades, add software, remove software. Reinstall. I DID a reinstall. So what part of the directories of the former /var contain ALL necessary files for the virtualization with kvm and quemu? I know were the virtual HDD are, but this will not be all? The rest I could manually eliminate and then copy the /var and then mount it instead.
In that case, I would keep the entire current (new) /var, and only replace (or add) the old virtualisation directory, which is what I originally suggested, by mounting that disk as a subdirectory of /var, not as /var. I'm not familiar with kvm/quemu to know if there are more files and where they are, sorry. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
In data giovedì 24 gennaio 2019 20:34:34 CET, Carlos E. R. ha scritto:
On 24/01/2019 19.56, stakanov wrote:
In data giovedì 24 gennaio 2019 19:46:13 CET, Carlos E. R. ha scritto:
On 24/01/2019 19.39, stakanov wrote:
In data giovedì 24 gennaio 2019 18:56:51 CET, Carlos E. R. ha scritto:
On 24/01/2019 18.24, stakanov wrote: ...
The question is, does the system risk some malfunction afterwards or not? As /var should have only temp stuff and journals, I would suppose no, but...I am not sure at all.
No, var has many other files and long term databases. For instance, the rpm database. Break that, your system is garbage. You can no longer do upgrades, add software, remove software. Reinstall.
I DID a reinstall. So what part of the directories of the former /var contain ALL necessary files for the virtualization with kvm and quemu? I know were the virtual HDD are, but this will not be all? The rest I could manually eliminate and then copy the /var and then mount it instead.
In that case, I would keep the entire current (new) /var, and only replace (or add) the old virtualisation directory, which is what I originally suggested, by mounting that disk as a subdirectory of /var, not as /var.
I'm not familiar with kvm/quemu to know if there are more files and where they are, sorry.
Sorry Carlito! NOW I am coming just from understanding what you are talking about, sorry! I will try to do that and will than give you some feedback, might interest also other user. Matthew 20:16 KJV - So the last shall be first Although as agnostic that is not even, to some extend, an intellectually valid reference, I am afraid that there would be no hope for me as well, not even as believer. After all he does not speak about people being retarded... _________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 24/01/2019 23.22, stakanov wrote:
In data giovedì 24 gennaio 2019 20:34:34 CET, Carlos E. R. ha scritto:
On 24/01/2019 19.56, stakanov wrote:
Sorry Carlito! NOW I am coming just from understanding what you are talking about, sorry! I will try to do that and will than give you some feedback, might interest also other user.
Ok! :-)) -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
In data giovedì 24 gennaio 2019 23:28:15 CET, Carlos E. R. ha scritto:
On 24/01/2019 23.22, stakanov wrote:
In data giovedì 24 gennaio 2019 20:34:34 CET, Carlos E. R. ha scritto:
On 24/01/2019 19.56, stakanov wrote: Sorry Carlito! NOW I am coming just from understanding what you are talking about, sorry! I will try to do that and will than give you some feedback, might interest also other user.
Ok! :-)) That was fairly easier than I thought. You can define everything via yast and via the kvm manager. The only folder you have to hold in the new location that I mounted as kvmstorage is:
/var/lib/libvirt/images from the former /var So I copied just images standalone (with rsync -aqx --progress) to the new location /dev/sdc1 mounted as /kvmstorage. You then have to open the kvm manager and you connect the quemu/kvm (in a new installation you have to activate in services first libvirtd daemon. You then go to details and you stop the default pool. You erase the default pool. You join a new pool as "from filesystem" and browse to the saved location. You then choose the existing discs and give them corresponding names and OS settings. Done. Now everything runs on new discs, normally I should have at least 2 years of peace.... maybe more, this time WD blue 5400 so normally they last a bit more than the fast and hot ones with 7200 rotations. BTW I found the reason why the RAID disc I did write before about did break. It was the internal sata controller of the disc. You were able to make it work with setting it as IDE mode in BIOS. But as soon as he had high data load he dropped again or gave errors. The surface itself passed the SMART (as long as you were in IDE). And yes, tried on 2 different PCs with different controllers and cables. Another disk did bite the dust. Probably the reason why they stopped the model (or they did sheet and did sell secretly a "refurbished" one as new (just applying a label). _________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Carlos E. R.
-
Simon Becherer
-
stakanov