[ntfs] <unknown> label is assigned after recovering

Post here if you found a bug or something really not expected in the program
Post Reply
robertchen
Posts: 10
Joined: Thu Oct 08, 2009 9:01 am

[ntfs] <unknown> label is assigned after recovering

Post by robertchen » Wed Feb 24, 2010 10:45 am

Version: fsarchiver 0.6.6
Issue: Use fsarchiver to savefs then restfs a windows NTFS partition. Before restoring, the partition is not labeled (partition with empty label will be show "Local Disk" in Windows). After recovering, the partition is labeled "<unknown>". This is strange.

Earlier verisions (my experience: 0.5.8 to 0.6.2) of fsarchiver have no this problem.

admin
Site Admin
Posts: 550
Joined: Sat Feb 21, 2004 12:12 pm

Re: [ntfs] <unknown> label is assigned after recovering

Post by admin » Wed Feb 24, 2010 2:52 pm

New fsarchiver versions (>= 0.6.4) are using libblkid to read labels from ntfs filesystems. It replaces some code which was in fs_ntfs.c before, and then it's less maintenance.

I suspect that libblkid returns "<unknown>" for empty disk labels during the savefs. And then fsarchiver literally saves this string as a label. You can check that by running "blkid" on a system which has an ntfs partition with no label.

But is that a real problem ?

robertchen
Posts: 10
Joined: Thu Oct 08, 2009 9:01 am

Re: [ntfs] <unknown> label is assigned after recovering

Post by robertchen » Thu Feb 25, 2010 2:55 am

Is it because the default label string becomes "<unknown>" in newer versions ?

In get_devinfo () in devinfo.c (v0.6.6), we have the following modification:

Code: Select all

    snprintf(outdev->label, sizeof(outdev->label), "");
    snprintf(outdev->uuid, sizeof(outdev->uuid), "");
    snprintf(outdev->fsname, sizeof(outdev->fsname), "");
    //snprintf(outdev->label, sizeof(outdev->label), "<unknown>");
    //snprintf(outdev->uuid, sizeof(outdev->uuid), "<unknown>");
    //snprintf(outdev->fsname, sizeof(outdev->fsname), "<unknown>");
I've used the modified version to savefs then restfs, it works fine for my NTFS partition.

admin
Site Admin
Posts: 550
Joined: Sat Feb 21, 2004 12:12 pm

Re: [ntfs] <unknown> label is assigned after recovering

Post by admin » Thu Feb 25, 2010 12:22 pm

You are right, it must be due to that modification. Thanks

Dukers
Posts: 19
Joined: Fri Jul 09, 2010 1:31 pm

Re: [ntfs] <unknown> label is assigned after recovering

Post by Dukers » Thu Sep 02, 2010 5:07 pm

FSArchiver 0.6.10 still put "<unknown>" into non labeled NTFS partitions after restfs.

Dukers
Posts: 19
Joined: Fri Jul 09, 2010 1:31 pm

Re: [ntfs] <unknown> label is assigned after recovering

Post by Dukers » Fri Jun 15, 2012 2:17 am

admin, this bug is still preset in fsarchvier 0.6.15. Can't the change posted by robertchen be applied?

Ah, BTW, is that workaround for blkid < 1.41 necessary these days? libblkid 1.41 shipped four years ago and the first util-linux release containing it (2.15), more than three years ago.

Post Reply