Installing Nethserver on previously used hard drives

installprocedure
v7

(Kenneth Burgess) #1

I am new to Nethserver and recently installed it (7.4) on a lab PC that has two 5TB drives. The installation went fine and I explored some of the various applications and configuration options. I had selected the local LDAP accounts provider and ultimately decided that I wanted to configure the AD accounts provider. Based on what I read in the documentation this would require starting over with a ‘fresh’ install. When I attempted to perform a ‘fresh’ install I was confronted with ‘not enough disk space’. I attempted to reclaim the space but it appeared to fail (partitions were deleted but sda/sdb always showed ‘preserve’). I tried interactive and unattended installation modes but always ended up with ‘not enough disk space’. I understood from the documentation the the installation procedure would ‘wipe’ existing data from the hard drives but this does not seem to be the case. It appears that if the hard drives have previously existing LVM/RAID metadata the automated installation procedure will not remove it. After many hours of searching the documentation, the forums, trying to removes the metadata, etc. I am at a loss. Can anybody explain or point me to the proper procedure that will allow a ‘fresh’ Nethserver installation on drives that had a previous Nethserver installation. Thanks!


Replacing Win Server 2016 with Nethserver?
(Jeroen Visser) #2

Aside from the fact that it should be possible to delete this info, I usualy do not care for automatic partitioning schemes removing existing info, this should help you out: https://gparted.org/livecd.php


(Kenneth Burgess) #3

Thanks for the reply Jeroen. Actually gparted didn’t work, I had previously booted a Linux Mint live cd and used gparted to remove the partition data from both hard drives, tried the interactive and unattended Nethserver installation and ended up with the same results (‘not enough disk space’). I also used fdisk from the live cd to remove the partition data, retried the installation and it still reported ‘not enough space’. Another thing I tried was to use dd to zero the first 200 MB and last 200MB of each drive, still could not get either of the automated installations to work. What is baffling me is the documentation indicates this shouldn’t be happening.


(Michael Träumner) #4

Have you labled it as gpt? MBR is not working with harddrives bigger than 2 TB.
If not, you should have a look here:
https://www.tecmint.com/add-disk-larger-than-2tb-to-an-existing-linux/

PS: Did you try a CentOS installation and install nethserver at this installation?


(Kenneth Burgess) #5

Michael, yes both of the hard drives have gpt labels. I had previously installed Nethserver using the unattended procedure and had worked with the installation for a couple of days before I decided I wanted to start over with a ‘fresh’ installation. When I followed the same unattended installation procedure it halted on the Centos 7 screen that indicated there was insufficient space on the hard drives. I then tried the interactive installation and the other steps I outlined above with no success. What I am trying to understand is why the Nethserver installation scripts do not remove all data from the targeted hard drives as the documentation states and if this is a known ‘bug’ with a workaround procedure. I also had the same experience when I used a different pair (320GB) of hard drives that I first installed using the unattended installation procedure and then tried to perform a ‘fresh’ install on the same. I will update with more information from the failed installer screen…


(Michael Träumner) #6

Thanks for your explanation,
I didn’t tried your scenario.
You could try to boot with the live CD and remove the lvm with lvmremove like here:
https://www.linuxquestions.org/questions/linux-hardware-18/remove-lvm2-metadat-from-disk-917503/

Perhaps the dev team has an explanation. @dev_team


(Stéphane de Labrusse) #7

I recall some fails like this when a raid/lvm flag is used on former disk, you should erase the mbr by ‘dd’ on all disks by using a live distro

dd if=/dev/zero of=/dev/sdX

Do not wait the end, interrupt by ctrl+c when you feel it and do not make a mistake on the drives to erase


(Saito Benkei) #8

Other commands that could be useful:

dmraid -r -E /dev/sdX

dd if=/dev/zero of=/dev/sdX bs=1k count=1; dd if=/dev/zero of=/dev/sdX bs=1k seek=$((fdisk -s /dev/sdX - 2))