Koozali.org: home of the SME Server

Update dimensione HDD su VM

Offline Fumetto

  • *
  • 874
  • +1/-0
Update dimensione HDD su VM
« on: February 25, 2019, 06:11:24 PM »
Buondì a tutti. Devo "allargare" il disco di un'installazione residente su ESXi.

Code: [Select]
[root@server ~]# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sda1[0]
      255936 blocks super 1.0 [2/1] [U_]

unused devices: <none>
[root@server ~]#
E' più conveninte seguire la guida per fare l'upgrade del disco, usare Affa (quindi installazione nuovo server con disco più grande, sincro e poi spegnimento vecchio e accensione nuovo server), oppure c'è un sistema più veloce e/o performante?

SME 9.2 full updated con solo sme9admin e contrib per la coda di qmail installati.

Grazie a tutti.

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Update dimensione HDD su VM
« Reply #1 on: February 27, 2019, 02:21:54 AM »
On a VM use "noraid nolvm" on installation.

You can then easily resize your disk. Just boot the vm with a gparted boot disk.

You may want to backup/restore and start again using those settings.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Fumetto

  • *
  • 874
  • +1/-0
Re: Update dimensione HDD su VM
« Reply #2 on: February 28, 2019, 12:48:14 AM »
se non ricordo male quando l'ho installato ho specificato tutto ciò selezionando l'apposita opzione  durante l'installazione, giusto?

If I remember correctly when installed it I specified everything by selecting the appropriate option during installation, right?

Code: [Select]
[root@server ~]# fdisk -l

Disco /dev/sda: 107.4 GB, 107374182400 byte

255 testine, 63 settori/tracce, 13054 cilindri
Unità = cilindri di 16065 * 512 = 8225280 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0x00061766

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          32      256000   fd  Autorilevamento raid di                                 Linux
La partizione 1 non termina al limite del cilindro.
/dev/sda2              32         547     4128768   82  Linux swap / Solaris
La partizione 2 non termina al limite del cilindro.
/dev/sda3             547       13055   100471808   83  Linux

Disco /dev/md0: 262 MB, 262078464 byte
2 testine, 4 settori/tracce, 63984 cilindri
Unità = cilindri di 8 * 512 = 4096 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0x00000000

[root@server ~]# cat /etc/fstab
#------------------------------------------------------------
# BE CAREFUL WHEN MODIFYING THIS FILE! It is updated automatically
# by the SME server software. A few entries are updated during
# the template processing of the file and white space is removed,
# but otherwise changes to the file are preserved.
# For more information, see http://www.e-smith.org/custom/ and
# the template fragments in /etc/e-smith/templates/etc/fstab/.
#
# copyright (C) 2002 Mitel Networks Corporation
#------------------------------------------------------------
#
# /etc/fstab
# Created by anaconda on Thu Sep  1 12:16:09 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=111363ce-b5f6-4f9f-be97-18910b64f528 /                       ext4    usrquo                                ta,grpquota        1 1
UUID=c977b7df-160b-4b3c-bcf9-c8135e1d870e /boot                   ext4    defaul                                ts        1 2
UUID=12274f02-cb84-4127-aa0f-ed77ada9afa8 swap                    swap    defaul                                ts        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
[root@server ~]#

Ma il raid è attivo (mi pare)...

But the raid is active (I think) ...

 :-?
« Last Edit: February 28, 2019, 12:49:49 AM by Fumetto »

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Update dimensione HDD su VM
« Reply #3 on: February 28, 2019, 01:37:59 AM »
With SME you always get RAID on the boot partition regardless of boot options.

You should be able to boot with gparted live, resize sda3, and reboot with a bigger partition.

Just make sure you have a good backup !!

Regards... from Barbuda :-)
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Fumetto

  • *
  • 874
  • +1/-0
Re: Update dimensione HDD su VM
« Reply #4 on: June 18, 2019, 08:59:50 PM »
Dopo ben 4 mesi mi hanno dato l'ok per effettuare la "migrazione" da "server con 100GB" a "server con 500GB".  Rimane un mistero il fatto di ostinarsi a mandare (e mantenere!) foto via email, io avrei anche dato un'alternativa valida... ma questa è un'altra storia... :-D

Ricordando di aver effettuato la (più o meno) stessa operazione con una versione 7.x di SME tra due server fisici con Affa mi sono andato a cercare se fosse possibile fare la stessa cosa su SME9 con Affa3. La guida che ho trovato non menziona note riguardo alal migrazione di VM. Pregate per me e, se avete consigli (tipo "On a VM use "noraid nolvm" on installation"), essi sono bene accetti!

---

After 4 months, they gave me the go ahead to "migrate" from "server with 100GB" to "server with 500GB". It remains a mystery to insist on sending (and keeping!) Photos via email, I would also have given a valid alternative ... but this is another story ...  :-D

Remembering to have performed the (more or less) same operation with a 7.x version of SME between two physical servers with Affa I went to look for if it was possible to do the same thing on SME9 with Affa3. The guide I found does not mention notes about VM migration. Pray for me and, if you have advice (like "On a VM use" noraid nolvm "on installation"), they are welcome!

Regards from Mondello (...that now it's not raining and I can go to sea... no... have to work!!!  :-x )

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Update dimensione HDD su VM
« Reply #5 on: June 18, 2019, 10:05:57 PM »
Photos.... :-(

On a VM... No raid. No lvm. :-)

If your earlier details are still valid I think you can:

Take a good backup (and VM snapshot)

Increase the VM disk size

Reboot with gparted

Resize sda3

Reboot.

You can use affa but I would try resizing the drive first.

Sorry I normally try and translate but can't right now.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Fumetto

  • *
  • 874
  • +1/-0
Re: Update dimensione HDD su VM
« Reply #6 on: June 19, 2019, 12:22:42 AM »
Devo ottimizzare il downtime, purtroppo ci sono servizi web che necessitano di invio e ricezione email su questo server, per questo la soluzione "Affa" mi sembra più ottimale. Sono circa 86GB di dati... tra due VM sullo stesso server ma con i dischi su due volumi raid differenti... dovrebbe andare "a manetta"... spero... :-D
100GB in meno di 3 anni... porcozio!!!

---

I have to optimize the downtime, unfortunately there are web services that need to send and receive emails on this server, so the "Affa" solution seems more optimal to me. There are about 86GB of data ... between two VMs on the same server but with disks on two different raid volumes ... it should go "throttle" ... I hope ... :-D
100GB in less than 3 years ... f@k!!!
« Last Edit: June 19, 2019, 12:25:03 AM by Fumetto »

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Update dimensione HDD su VM
« Reply #7 on: June 19, 2019, 12:33:35 AM »
I love Affa but....

In this instance a disk resize will probably be at least as fast... if planned (duplicate the VM to test your method)

Nothing will change apart from the disk size.

Affa runs some potential risks... missing rpms, customisations etc. It IS very fast, but personally in *this* scenario I'd try the resize (I have done it a few times now)

Again, test, test, and test again :-)

Bon suerte y ciao :-)
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Fumetto

  • *
  • 874
  • +1/-0
Re: Update dimensione HDD su VM
« Reply #8 on: June 22, 2019, 12:26:23 AM »


~ 5,5 MB/s... speravo meglio... domani, dopo aver completato la sincronizzazione ed essermi assicurato che tutto funziona, stacco l'attuale server e testo... testo se potevo risparmiare tempo... per la prossima volta :-D

---

~ 5.5 MB / s ... I was hoping better ... tomorrow, after completing the synchronization and making sure that everything works, I remove the current server and test ... test if I could save time ... for the next time :-D

Offline ReetP

  • *
  • 3,722
  • +5/-0
Re: Update dimensione HDD su VM
« Reply #9 on: June 22, 2019, 01:17:14 AM »
Sync,sync,sync,backup,sync,pray.

 :)

Disk resize would have been faster  :D
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Fumetto

  • *
  • 874
  • +1/-0
Re: Update dimensione HDD su VM
« Reply #10 on: June 22, 2019, 05:55:44 AM »
...e dopo cinque ore di sync pare che tutto sia andato bene e io posso finalmente a andare a nanna... :-D

---

... and after five hours of sync it seems that everything went well and I can finally go to bed... :-D