WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] can't mount vfat fs on lvm created by winxp guest

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] can't mount vfat fs on lvm created by winxp guest
From: Yann Boutin <yann.boutin@xxxxxxx>
Date: Sat, 28 Apr 2007 18:07:08 +0200
Delivery-date: Sat, 28 Apr 2007 09:05:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070427210239.GA21547@gentoo>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: xen-users@xxxxxxxxxxxxxxxxxxx
References: <20070427210239.GA21547@gentoo>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
On 23:02 Fri 27 Apr     , Yann Boutin wrote:
> Greetings, 
> I've had no success with mounting a vfat file system created by a 
> Windows XP guest on a lvm volume.
> 
> # mount -t vfat /dev/vg1/win1 /mnt/
> mount: wrong fs type, bad option, bad superblock on /dev/vg1/win1,
>        missing codepage or other error
>        In some cases useful info is found in syslog - try
>        dmesg | tail  or so
> 
> # dmesg
> FAT: invalid media value (0xb9)
> VFS: Can't find a valid FAT filesystem on dev dm-0.
> 
> # lvm version
>   LVM version:     2.02.10 (2006-09-19)
>   Library version: 1.02.10 (2006-09-19)
>   Driver version:  4.7.0
> 
> # uname -a
> Linux gentoo 2.6.18-xen #6 SMP Sun Apr 22 12:11:43 CEST 2007 i686 
> Intel(R) Core(TM)2 CPU          6300  @ 1.86GHz GenuineIntel GNU/Linux
> 
> Help  would be greatly appreciated.
> 
> Thanks!

Finally I've found a solution. Actually the real FAT32 partition starts
63 sectors ahead the first sector of the logical volume. I think that's
because Windows XP guest consider this volume as a physical disk and not as a 
partition. As a result the MediaDescriptor (15th word in boot sector) contained 
a wrong value, b9 as reported in previous error message (FAT: invalid media 
value (0xb9)). For information it appears that the MediaDescriptor should 
contain F8 see : http://averstak.tripod.com/fatdox/bootsec.htm. Well to solve 
my problem I use device-mapper to remap the logical volume 63 sectors ahead as 
follow:

printing actual map table
# dmsetup table
vg1-win2: 0 12582912 linear 8:6 14680448

we can see that it starts at 14680448. So 14680448 + 63 = 14680511 and
then we can remap it with this value:
# dmsetup create vg1-win2-p1 --table "0 12582912 linear /dev/sda6
14680511"

for further explanation of this command see
#man 8 dmsetup

and then I could mount my partition without problem
# mount /dev/mapper/vg1-win2-p1 /mnt/

I'm aware that it's not really a xen related problem but I hope that it
could help someone, one day, someone who should consider accessing
windows guest fs with lvm. Note that this problem is exactly the same with NTFS 
and is solved the same too.

  Yann.


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users