#60 Issue closed: Swap partition as label is not labeled in recovered machine (its not included in disklayout.conf)

Labels: bug

Shabahang opened issue at 2012-04-11 06:05:

if there are some swap partitions with labels(refered in fstab by label), they are not labled and automatically used.
we should run manual "mkswap -L <Label_name> <Dev_name> (eg. mkswap -L SWAP-sda9 /dev/sda9).
The disk layout file on src machine is as follow :

[root@drvl034 ~]# cat /var/lib/rear/layout/disklayout.conf

disk /dev/hdc 4294965248

disk /dev/sda 322122547200 msdos
part /dev/sda 205599744 32256 primary boot /dev/sda1
part /dev/sda 17182609920 205632000 primary none /dev/sda2
part /dev/sda 304730173440 17388241920 primary lvm /dev/sda3
lvmdev /dev/VG00 /dev/sda3 0JUczF-kVQI-65B4-THjo-bjuI-GDMn-fcND3T 595176120
lvmgrp /dev/VG00 32768 9081 297566208
lvmvol /dev/VG00 lvroot 480 31457280
lvmvol /dev/VG00 lvtmp 160 10485760
lvmvol /dev/VG00 lvvar 160 10485760
lvmvol /dev/VG00 lvhome 3200 209715200
lvmvol /dev/VG00 lvlog 1920 125829120
fs /dev/mapper/VG00-lvroot / ext3 uuid=1704198f-19c2-494f-82fa-da3a2a51771f label= blocksize=4096 reserved_blocks=196608 max_mounts=-1 check_interval=0d options=rw
fs /dev/mapper/VG00-lvtmp /tmp ext3 uuid=bac3ac97-1f33-424f-b861-61b07228e234 label= blocksize=4096 reserved_blocks=65536 max_mounts=-1 check_interval=0d options=rw
fs /dev/mapper/VG00-lvvar /var ext3 uuid=6c96835e-934f-4496-a1f7-394bee6ef8b8 label= blocksize=4096 reserved_blocks=65536 max_mounts=-1 check_interval=0d options=rw
fs /dev/mapper/VG00-lvhome /home ext3 uuid=05f4dc41-1a06-42f9-9d7d-0ef9f4788463 label= blocksize=4096 reserved_blocks=1310720 max_mounts=-1 check_interval=0d options=rw
fs /dev/sda1 /boot ext3 uuid=74267e50-0b97-4ea1-a9f5-19bb2a2d9ed2 label=/boot blocksize=1024 reserved_blocks=10039 max_mounts=-1 check_interval=0d options=rw
fs /dev/mapper/VG00-lvlog /log ext3 uuid=7483bfb3-24f2-4f4c-aadc-b47a4ddc135c label= blocksize=4096 reserved_blocks=786432 max_mounts=30 check_interval=180d options=rw
swap /dev/sda2 uuid= label=
[root@drvl034 ~]# less /var/lib/rear/layout/disklayout.conf
[root@drvl034 ~]# swapon -s
Filename Type Size Used Priority
/dev/sda2 partition 16779884 88 -1
[root@drvl034 ~]# grep swap /etc/fstab
LABEL=SWAP-sda2 swap swap defaults 0 0
[root@drvl034 ~]#

Rear is 1.12.0

dagwieers commented at 2012-04-11 07:50:

This issue duplicates #46

schlomo commented at 2012-04-11 20:55:

Maybe the swap labelling code is missing from layout? In dr it was there
(and part of my "big" test case).


[Export of Github issue for rear/rear.]