ubuntu + lvm + swap = failed

SirTux
Beiträge: 558
Registriert: 05 Feb 2011, 18:37

ubuntu + lvm + swap = failed

Beitrag von SirTux »

Hi,

beim Nebootprodukt Ubuntu kommt es im LVM-Modus zu folgendem Fehler:

Code: Alles auswählen

(6217)    [5] [Mai 04 14:13:36] Creating fstab .... (ubuntu.py|173)
(6218)    [2] [Mai 04 14:13:37] Traceback: (Logger.py|798)
(6219)    [2] [Mai 04 14:13:37]   File "/usr/local/bin/master.py", line 1641, in <module>
(6220)        execfile(actionScript)
(6221)     (Logger.py|798)
(6222)    [2] [Mai 04 14:13:37]   File "/tmp/ubuntu.py", line 183, in <module>
(6223)        print >> f, "%s     none            swap         sw                          0        0" % (swapPartitionDevicePathUUID)
(6224)     (Logger.py|798)
(6225)    [2] [Mai 04 14:13:37]      ==>>> name 'swapPartitionDevicePathUUID' is not defined (master.py|1693)
Viele Grüße,
SirTux
SirTux
Beiträge: 558
Registriert: 05 Feb 2011, 18:37

Re: ubuntu + lvm + swap = failed

Beitrag von SirTux »

Als Workarround habe ich Swap deaktiviert.

Anscheinend gibt es aber weitere Bugs: Das System-LV wird mit 100% statt 30 GB erzeugt, ein Daten-LV gibt es dementsprechend nicht!
Benutzeravatar
SisterOfMercy
Beiträge: 1522
Registriert: 22 Jun 2012, 19:18

Re: ubuntu + lvm + swap = failed

Beitrag von SisterOfMercy »

SirTux hat geschrieben:Als Workarround habe ich Swap deaktiviert.
As workaround, have you tried using ubuntu1804, or the netboot package with your version?
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
SirTux
Beiträge: 558
Registriert: 05 Feb 2011, 18:37

Re: ubuntu + lvm + swap = failed

Beitrag von SirTux »

Nein ich hab bis jetzt immer das Paket "ubuntu" genommen. Es hat eindeutig Vorteile, da man dann z.B. nicht die Properties neu anpassen muß, wenn die Ubuntu-Version sich ändert.

@uib Wie ist denn da eigentlich die längerfristige Strategie?
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1517
Registriert: 10 Jun 2015, 12:19

Re: ubuntu + lvm + swap = failed

Beitrag von m.radtke »

Hi

ich habe gerade eine VM am Laufen um den Fehler zu reproduzieren und zu fixen.

Die Lanfristtige Strategie ist das es ubunut und ubuntuVERSION geben wird.
Ubuntu ist an sich ein Relikt, da es irgendwann möglich war den Distributionsinstaller zu verwenden.
Leider gibt es bei Ubuntu/Debian Installationen mit Distri Installer immer wieder ein Problem wenn das kexec aufgerufen wird.
Unter UEFI wird das in Zukunft gefixt sein, da wir einen zusätzlichen Reboot eingebaut haben. Für BIOS/MBR leider nicht. da es da deutlich komplexer wird. Wenigstens irgendetwas worin UEFI einfacher ist.

Gruß
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1517
Registriert: 10 Jun 2015, 12:19

Re: ubuntu + lvm + swap = failed

Beitrag von m.radtke »

Hi SirTux,

im experimental Bereich gibt es nun ein aktualisiertes debian und ubuntu Paket, die das Problem mit dem swap fixen.

Gruß
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
SirTux
Beiträge: 558
Registriert: 05 Feb 2011, 18:37

Re: ubuntu + lvm + swap = failed

Beitrag von SirTux »

Hi Mathias,

vielen Dank. Ich konnte es noch nicht testen, aber mit der alten Version scheint es noch ein Problem zu sein (Nicht-LVM, UEFI):

Code: Alles auswählen

Command '/sbin/mkfs.vfat /dev/vdap1' failed (1):  
mkfs.fat 4.1 (2017-01-24)
mkfs.vfat: unable to open /dev/vdap1: No such file or directory  
Sollte es nicht /dev/vda1 heißen?

Viele Grüße,
SirTux
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1517
Registriert: 10 Jun 2015, 12:19

Re: ubuntu + lvm + swap = failed

Beitrag von m.radtke »

Ich schaue Mal das ich eine VM mit VDA Platten kriege und es nachstellen.

Gruß
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
SirTux
Beiträge: 558
Registriert: 05 Feb 2011, 18:37

Re: ubuntu + lvm + swap = failed

Beitrag von SirTux »

Hi Mathias,

vielen Dank für die schnelle ANtwort. Ich nehme an, daß hier irgendwo der NVME-Codepfad zuschlägt. Aber ich habe den Code noch nicht ausrecihend verstanden.

Viele Grüße,
Stefan
SirTux
Beiträge: 558
Registriert: 05 Feb 2011, 18:37

Re: ubuntu + lvm + swap = failed

Beitrag von SirTux »

Die Funktion muß denke ich angepaßt werden:

Code: Alles auswählen

def getPartitionDevicePath(diskDevice = "", partitionNumber = ""):
        # determine if disk.device file is like /dev/cciss/c0d0
        # if this device filename is detected, the partition numbers
        # has to extend with a p: /dev/cciss/c0d0p1
        partitionDevicePath = ''
        unixDevicePath = re.compile("c\dd\d").search(diskDevice)
        #logger.notice(u"unixDevicePath = %s" % bool(unixDevicePath))
        raidDevicePath = re.compile("md\d").search(diskDevice)
        #logger.notice(u"raidDevicePath = %s" % bool(unixDevicePath))
        nvmeDevicePath = re.compile("nvme\dn\d").search(diskDevice)
        mmcDevicePath = re.compile("mmcblk\d").search(diskDevice)

        if unixDevicePath:
                # extending PartitionNumber with a starting p
                partitionDevicePath = "%sp%s" % (diskDevice, partitionNumber)
        elif raidDevicePath:
                # extending PartitionNumber with a starting p
                partitionDevicePath = "%sp%s" % (diskDevice, partitionNumber)
        elif nvmeDevicePath:
                # extending PartitionNumber with a starting p
                partitionDevicePath = "%sp%s" % (diskDevice, partitionNumber)
        elif mmcDevicePath:
                # extending PartitionNumber with a starting p
                partitionDevicePath = "%sp%s" % (diskDevice, partitionNumber)
        else:
                partitionDevicePath = "%s%s" % (diskDevice, partitionNumber)
        #logger.notice(u"partitionDevicePath = %s" % partitionDevicePath)
        return partitionDevicePath
EDIT: Hier ist noch das richtige Log:

Code: Alles auswählen

(3341)    [6] [Mai 11 09:13:35] Executing: /usr/sbin/sgdisk -p /dev/vda (Posix.py|926)
(3342)    [6] [Mai 11 09:13:35] Using encoding 'ANSI_X3.4-1968' (Posix.py|959)
(3343)    [7] [Mai 11 09:13:35] >>> Disk /dev/vda: 146800640 sectors, 70.0 GiB (Posix.py|1003)
(3344)    [7] [Mai 11 09:13:35] >>> Sector size (logical/physical): 512/512 bytes (Posix.py|1003)
(3345)    [7] [Mai 11 09:13:35] >>> Disk identifier (GUID): B3700AD2-24F6-4B12-BB73-1455ACD8BBA4 (Posix.py|1003)
(3346)    [7] [Mai 11 09:13:35] >>> Partition table holds up to 128 entries (Posix.py|1003)
(3347)    [7] [Mai 11 09:13:35] >>> Main partition table begins at sector 2 and ends at sector 33 (Posix.py|1003)
(3348)    [7] [Mai 11 09:13:35] >>> First usable sector is 34, last usable sector is 146800606 (Posix.py|1003)
(3349)    [7] [Mai 11 09:13:35] >>> Partitions will be aligned on 2048-sector boundaries (Posix.py|1003)
(3350)    [7] [Mai 11 09:13:35] >>> Total free space is 146597820 sectors (69.9 GiB) (Posix.py|1003)
(3351)    [7] [Mai 11 09:13:35] >>>  (Posix.py|1003)
(3352)    [7] [Mai 11 09:13:35] >>> Number  Start (sector)    End (sector)  Size       Code  Name (Posix.py|1003)
(3353)    [7] [Mai 11 09:13:35] >>>    1            2048          204800   99.0 MiB    EF00  EFI system partition (Posix.py|1003)
(3354)    [7] [Mai 11 09:13:35] Exit code: 0 (Posix.py|1010)
(3355)    [5] [Mai 11 09:13:35] Make file system on EFI system partition on /dev/vda1 (opsipreparelib.py|373)
(3356)    [6] [Mai 11 09:13:35] Executing: /sbin/mkfs.vfat /dev/vdap1 (Posix.py|926)
(3357)    [6] [Mai 11 09:13:35] Using encoding 'ANSI_X3.4-1968' (Posix.py|959)
(3358)    [7] [Mai 11 09:13:35] >>> mkfs.fat 4.1 (2017-01-24) (Posix.py|1003)
(3359)    [7] [Mai 11 09:13:35] >>> mkfs.vfat: unable to open /dev/vdap1: No such file or directory (Posix.py|1003)
(3360)    [7] [Mai 11 09:13:35] Exit code: 1 (Posix.py|1010)
(3361)    [2] [Mai 11 09:13:36] Traceback: (Logger.py|798)
(3362)    [2] [Mai 11 09:13:36]   File "/usr/local/bin/master.py", line 1641, in <module>
(3363)        execfile(actionScript)
(3364)     (Logger.py|798)
(3365)    [2] [Mai 11 09:13:36]   File "/tmp/ubuntu.py", line 72, in <module>
(3366)        prepareDisk()
(3367)     (Logger.py|798)
(3368)    [2] [Mai 11 09:13:36]   File "/tmp/opsipreparelib.py", line 377, in prepareDisk
(3369)        execute('/sbin/mkfs.vfat %sp1' % (disk.device))
(3370)     (Logger.py|798)
(3371)    [2] [Mai 11 09:13:36]   File "/usr/lib/python2.7/dist-packages/OPSI/System/Posix.py", line 1017, in execute
(3372)        raise RuntimeError(u"Command '%s' failed (%s):\n%s" % (cmd, exitCode, u'\n'.join(result)))
(3373)     (Logger.py|798)
(3374)    [2] [Mai 11 09:13:36]      ==>>> Command '/sbin/mkfs.vfat /dev/vdap1' failed (1):
(3375)    mkfs.fat 4.1 (2017-01-24)
(3376)    mkfs.vfat: unable to open /dev/vdap1: No such file or directory (master.py|1693)
Antworten