0

We have done a installation of Ubuntu server 16.10 with LVM disk cofiguration on a customer server and we need to revert our installation to ext4 old disk configuration without losing data. here is disk configuration exported by parted:

Model: VMware Virtual disk (scsi) Disk /dev/sda: 1100GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags:

Number  Start   End    Size   Type      File system  Flags
 1      1049kB  512MB  511MB  primary   ext2         boot
 2      513MB   322GB  322GB  extended
 5      513MB   322GB  322GB  logical                lvm
 3      322GB   429GB  107GB  primary
 4      429GB   644GB  215GB  primary                lvm

and here is the lsblk out put:

NAME                             MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                                8:0    0     1T  0 disk
├─sda1                             8:1    0   487M  0 part /boot
├─sda2                             8:2    0     1K  0 part
├─sda3                             8:3    0   100G  0 part
│ └─server--shahrsazi--vg-root   252:0    0 587.5G  0 lvm  /
├─sda4                             8:4    0   200G  0 part
│ └─server--shahrsazi--vg-root   252:0    0 587.5G  0 lvm  /
└─sda5                             8:5    0 299.5G  0 part
  ├─server--shahrsazi--vg-root   252:0    0 587.5G  0 lvm  /
  └─server--shahrsazi--vg-swap_1 252:1    0    12G  0 lvm  [SWAP]
sdb                                8:16   0   650G  0 disk
sdc                                8:32   0    16G  0 disk
sr0 

                          11:0    1  1024M  0 rom

we want to move all data to sdb and detach sda.

MSS
  • 200
  • 8
  • 1
    Possible off-topic question. If you just 'did' your 16.10 server installation; please note the release from 2016.October (thus 16.10) is well past EOL having upgraded to 17.04, then 17.10 (both of which are also EOL) then 18.04 LTS. It was a short-term release with only 9 months of supported life, and is thus off-topic here. I'd suggest you re-install a supported release of Ubuntu for security reasons alone (2016.10 + 9 months was a long time ago...) – guiverc Apr 18 '19 at 10:38
  • 16.10 seriously? You make a backup of the clients data and restore it. "customer server" then you should have a 2nd identical server as a fallback. Use that and merge the data from the other machine. – Rinzwind Apr 18 '19 at 10:42
  • Besides the EOL aspect, it is not really possible to "convert" from LVM volumes to plain partitions in place anyway. The only solution is to back up data to an external drive, wipe all LVM stuff, create normal partitions and restore data. – Byte Commander Apr 18 '19 at 10:43
  • 1th - we forced as we compile a peace of software in upper version. 2th - it is a government's data center and we have restricted access to it. 3th - I've done the conversations (at least a kind of it) with a spare disk (as it's a VM it's no big deal) and detach the first disk.

    If its possible I like to share the instruction since there is a lake of updated and simple solution for problem over the internet.

    – MSS Apr 18 '19 at 15:13

0 Answers0