Skip to content

fstab not built properly after copy #44

@nicolasmdq

Description

@nicolasmdq

Hi @DonyorM when I run weresync disk is copied successfully, but /etc/fstab is left with comments only.

Command line:

weresync -C -L grub2 -E 1 -g 2 --source-mask '{0}p{1}' /dev/nvme0n1 /dev/sda

/etc/fstab from destination disk:


# This file is generated by WereSync. All comments have been copied, but they have not been parsed.
# Any reference to identifiers during installation may be inaccurate.

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p2 during installation

/var/log/weresync/weresync.log

DEBUG - 2023-12-15 17:53:10,449 - weresync.daemon.device - Setting to finished
INFO - 2023-12-15 17:53:10,449 - weresync.daemon.device - Using plugin: grub2
DEBUG - 2023-12-15 17:53:10,848 - parse - format '/dev/nvme0n1p{0}' -> '/dev/nvme0n1p(.+?)'
WARNING - 2023-12-15 17:53:10,874 - weresync.daemon.device - Error copying fstab. Continuing anyway.
DEBUG - 2023-12-15 17:53:10,874 - weresync.daemon.device - Info:
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/weresync/daemon/device.py", line 1677, in make_bootable
    self._copy_fstab(source_mnt, target_mnt, excluded_partitions)
  File "/usr/local/lib/python3.10/dist-packages/weresync/daemon/device.py", line 1451, in _copy_fstab
    raise weresync.exception.DeviceError(
weresync.exception.DeviceError: ('/dev/sda', 'Could not find device /dev/sda2', '')

pip show weresync

Name: WereSync
Version: 1.1.5
Summary: Incrementally clones Linux drives
Home-page: https://github.com/DonyorM/weresync

When I use the same version in another machine copying from /dev/sda to /dev/sdb it works fine. Maybe using source-mask breaks /etc/fstab modification?

Thank you!

NOTE: Both source and destination disk has 2 partitions (So message "'Could not find device /dev/sda2" is strange):

sda           8:0    0 223,6G  0 disk
├─sda1        8:1    0   512M  0 part
└─sda2        8:2    0 223,1G  0 part /media/servidor/c303d4eb-944b-435c-97e8-27d448947bec
nvme0n1     259:0    0 232,9G  0 disk
├─nvme0n1p1 259:1    0   512M  0 part /boot/efi
└─nvme0n1p2 259:2    0 232,4G  0 part /

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions