Results 1 to 5 of 5

Thread: How to perform xfs_repair on encrypted partition

  1. #1

    Exclamation How to perform xfs_repair on encrypted partition

    Hi,
    I got problems with xfs partition, I would perform an xfs_repair on that partition. According documentation of xfs_repair the partition should not be mounted and some post suggest to boot on usb key and then perform the repair. My problem is the partition is encrypted and I have no idea how to open an encrypted partition.

    My question is: How to perform an xfs_repair when the partition is encrypted ?

    Notes:
    1) I can boot on the computer because the corrupted system is /home but after the boot the /home is mounted and xfs_repair couldn't be perform
    2) I can boot using an usb key but I don't know how open the partition

    Thanks for your help or advice's.


    Information's about partition
    :
    Périphérique : /dev/sdb1
    Taille : 0.91 TiB
    Chiffrement : Oui
    Chemin d'accès au périphérique : pci-0000:00:17.0-ata-3-part1
    ID du périphérique 1 : ata-TOSHIBA_MQ01ABD100_66KNT23WT-part1
    ID du périphérique 2 : scsi-0ATA_TOSHIBA_MQ01ABD1_66KNT23WT-part1
    ID du périphérique 3 : scsi-1ATA_TOSHIBA_MQ01ABD100_66KNT23WT-part1
    ID du périphérique 4 : scsi-35000039711b092c7-part1
    ID du périphérique 5 : scsi-SATA_TOSHIBA_MQ01ABD1_66KNT23WT-part1
    ID du périphérique 6 : wwn-0x5000039711b092c7-part1
    ID de partition : Linux natif
    Système de fichiers :
    Système de fichiers : XFS
    Point de montage : /home

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,345
    Blog Entries
    3

    Default Re: How to perform xfs_repair on encrypted partition

    I've avoided "xfs", so I am mainly commenting on the encryption aspect.

    Boot to rescue media. Make sure that the rescue media has the tools for "xfs" file systems. Booting the DVD installer or the NET installer to the rescue system should work.

    Decrypt the partitiion. For that, use a command something like:

    Code:
    cryptsetup luksOpen /dev/sdXY cr_mypartition
    Change "/dev/sdXY" to the actual partition device name (perhaps something like "/dev/sda3".

    Then use
    Code:
    ls /dev/mapper
    That should give you the device name. If you used the command above as I suggested it, then you should find "/dev/mapper/cf_mypartition".

    That's the unmounted device on which you need to use the "xfs" repair tools.
    openSUSE Leap 15.1; KDE Plasma 5;

  3. #3
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,345
    Blog Entries
    3

    Default Re: How to perform xfs_repair on encrypted partition

    I answered too quickly. I see you actually provided more details.

    Use the command
    Code:
    cryptsetup luksOpen /dev/sdb1 cr_mypartition
    and then use "xfs" repair tools on "/dev/mapper/cr_mypartition".
    openSUSE Leap 15.1; KDE Plasma 5;

  4. #4

    Thumbs up Re: How to perform xfs_repair on encrypted partition

    Thanks for your answers.
    I use an alternative way which is :
    1) comment in fstab the partition I need to check
    2) Boot
    3) check with xfs_repair the partition /dev/mapper/cr_dataxxxx instead of /dev/sdbx

    The third point was the missing point for me.

    Concerning XFS I had a really strange behaviour, the Documents directory disappears. I don't find any command in my history that I delete the repo. or documents in the basket or if I move it by mistake somewhere. The repair doesn't find any problems and I tried to recover deleted file I don't find any fragment of my data ... It's so strange I reinstall the laptop from scratch and I use btrfs for data instead of xfs.

    Regards

  5. #5
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,345
    Blog Entries
    3

    Default Re: How to perform xfs_repair on encrypted partition

    I'm glad you have things working.

    I have been staying with "ext4", though I have not run into problems with "xfs" when I have used it.
    openSUSE Leap 15.1; KDE Plasma 5;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •