Yann Boutin
2007-Apr-27 21:02 UTC
[Xen-users] can''t mount vfat fs on lvm created by winxp guest
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! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tim Post
2007-Apr-28 05:10 UTC
Re: [Xen-users] can''t mount vfat fs on lvm created by winxp guest
On Fri, 2007-04-27 at 23:02 +0200, 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/This is also a common problem when sharing pen drives and similar between Windows and GNU/Linux (or any other odd fat bd) try mount -t vfat -o umask=000 /dev/vg1/win1 /mnt If you go to the mount man page, it explains some things that can ''break'' vfat, such as everything by default being mounted with the umask of the current process. see man 8 mount and look for "Mount options for fat" You may need to play with this a bit. The above gets my pen drive mounted correctly, may work for you. This is really a GNU/Linux admin issue, not so much Xen but I figured I''d chirp in anyway since it is kinda cryptic. Best, --Tim _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Yann Boutin
2007-Apr-28 09:49 UTC
Re: [Xen-users] can''t mount vfat fs on lvm created by winxp guest
On 13:10 Sat 28 Apr , Tim Post wrote:> On Fri, 2007-04-27 at 23:02 +0200, 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/ > > This is also a common problem when sharing pen drives and similar > between Windows and GNU/Linux (or any other odd fat bd) > > try mount -t vfat -o umask=000 /dev/vg1/win1 /mnt > > If you go to the mount man page, it explains some things that can > ''break'' vfat, such as everything by default being mounted with the umask > of the current process. > > see man 8 mount and look for "Mount options for fat" > > You may need to play with this a bit. The above gets my pen drive > mounted correctly, may work for you. > > This is really a GNU/Linux admin issue, not so much Xen but I figured > I''d chirp in anyway since it is kinda cryptic.Ok I''ve tryed all things working for usb pen problems with no effect. So I investigate further: creating a new volume # lvcreate -n win3 -L6G vg1 making a vfat fs on it # mkfs.vfat /dev/vg1/win3 mounting it (successfully) # mount -v -t vfat /dev/vg1/win3 /mnt/ /dev/mapper/vg1-win3 on /mnt type vfat (rw) launching Windows XP guest installation # xm create /etc/xen/winxp3.hvm At this point Windows Xp installer can''t detect the partition type and report it as ''unknown'' So Ok, let Windows installer (re)format it with fat32 fs and go ahead to finish installation. When installation ended I stop Windows Guest properly and try again to mount the guest vfat fs and, the same error appends ... # mount -t vfat /dev/vg1/win3 /mnt/ mount: wrong fs type, bad option, bad superblock on /dev/vg1/win3, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so Don''t you thing the problem comes from the manner Windows XP guest handles lvm volumes rather than from any missing codepage or file mode option when mounting ? Anyone can report succes with mounting ''on lvm'' vfat guest filesystem ? Thanks ! Yann. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nico Kadel-Garcia
2007-Apr-28 10:34 UTC
Re: [Xen-users] can''t mount vfat fs on lvm created by winxp guest
Yann Boutin wrote:> On 13:10 Sat 28 Apr , Tim Post wrote: > >> On Fri, 2007-04-27 at 23:02 +0200, 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/ >>> >> This is also a common problem when sharing pen drives and similar >> between Windows and GNU/Linux (or any other odd fat bd) >> >> try mount -t vfat -o umask=000 /dev/vg1/win1 /mnt >> >> If you go to the mount man page, it explains some things that can >> ''break'' vfat, such as everything by default being mounted with the umask >> of the current process. >> >> see man 8 mount and look for "Mount options for fat" >> >> You may need to play with this a bit. The above gets my pen drive >> mounted correctly, may work for you. >> >> This is really a GNU/Linux admin issue, not so much Xen but I figured >> I''d chirp in anyway since it is kinda cryptic. >> > > Ok I''ve tryed all things working for usb pen problems with no effect. So > I investigate further: > > creating a new volume > # lvcreate -n win3 -L6G vg1 > > making a vfat fs on it > # mkfs.vfat /dev/vg1/win3 > > mounting it (successfully) > # mount -v -t vfat /dev/vg1/win3 /mnt/ > /dev/mapper/vg1-win3 on /mnt type vfat (rw) > > launching Windows XP guest installation > # xm create /etc/xen/winxp3.hvm > > At this point Windows Xp installer can''t detect the partition type and > report it as ''unknown'' > > So Ok, let Windows installer (re)format it with fat32 fs and go ahead > to finish installation. When installation ended I stop Windows > Guest properly and try again to mount the guest vfat fs and, the same error appends ... > > # mount -t vfat /dev/vg1/win3 /mnt/ > mount: wrong fs type, bad option, bad superblock on /dev/vg1/win3, > missing codepage or other error > In some cases useful info is found in syslog - try > dmesg | tail or so > > > Don''t you thing the problem comes from the manner Windows XP guest handles lvm volumes rather than from any missing codepage or file mode option when mounting ? > > Anyone can report succes with mounting ''on lvm'' vfat guest filesystem ? > > Thanks ! > > Yann. >Windows XP created it? Are you *sure* it''s a FAT32 or vfat compatible partition type, and not NTFS? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Yann Boutin
2007-Apr-28 10:45 UTC
Re: [Xen-users] can''t mount vfat fs on lvm created by winxp guest
On 11:34 Sat 28 Apr , Nico Kadel-Garcia wrote:> Yann Boutin wrote: > >On 13:10 Sat 28 Apr , Tim Post wrote: > > > >>On Fri, 2007-04-27 at 23:02 +0200, 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/ > >>> > >>This is also a common problem when sharing pen drives and similar > >>between Windows and GNU/Linux (or any other odd fat bd) > >> > >>try mount -t vfat -o umask=000 /dev/vg1/win1 /mnt > >> > >>If you go to the mount man page, it explains some things that can > >>''break'' vfat, such as everything by default being mounted with the umask > >>of the current process. > >> > >>see man 8 mount and look for "Mount options for fat" > >> > >>You may need to play with this a bit. The above gets my pen drive > >>mounted correctly, may work for you. > >> > >>This is really a GNU/Linux admin issue, not so much Xen but I figured > >>I''d chirp in anyway since it is kinda cryptic. > >> > > > >Ok I''ve tryed all things working for usb pen problems with no effect. So > >I investigate further: > > > >creating a new volume > ># lvcreate -n win3 -L6G vg1 > > > >making a vfat fs on it > ># mkfs.vfat /dev/vg1/win3 > > > >mounting it (successfully) > ># mount -v -t vfat /dev/vg1/win3 /mnt/ > >/dev/mapper/vg1-win3 on /mnt type vfat (rw) > > > >launching Windows XP guest installation > ># xm create /etc/xen/winxp3.hvm > > > >At this point Windows Xp installer can''t detect the partition type and > >report it as ''unknown'' > > > >So Ok, let Windows installer (re)format it with fat32 fs and go ahead > >to finish installation. When installation ended I stop Windows > >Guest properly and try again to mount the guest vfat fs and, the same > >error appends ... > > > ># mount -t vfat /dev/vg1/win3 /mnt/ > >mount: wrong fs type, bad option, bad superblock on /dev/vg1/win3, > > missing codepage or other error > > In some cases useful info is found in syslog - try > > dmesg | tail or so > > > > > >Don''t you thing the problem comes from the manner Windows XP guest handles > >lvm volumes rather than from any missing codepage or file mode option when > >mounting ? > > > >Anyone can report succes with mounting ''on lvm'' vfat guest filesystem ? > > > >Thanks ! > > > > Yann. > > > Windows XP created it? Are you *sure* it''s a FAT32 or vfat compatible > partition type, and not NTFS?Yes I''m sure it''s a fat32 fs. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Yann Boutin
2007-Apr-28 11:01 UTC
Re: [Xen-users] can''t mount vfat fs on lvm created by winxp guest
On 12:45 Sat 28 Apr , Yann Boutin wrote:> On 11:34 Sat 28 Apr , Nico Kadel-Garcia wrote: > > Yann Boutin wrote: > > >On 13:10 Sat 28 Apr , Tim Post wrote: > > > > > >>On Fri, 2007-04-27 at 23:02 +0200, 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/ > > >>> > > >>This is also a common problem when sharing pen drives and similar > > >>between Windows and GNU/Linux (or any other odd fat bd) > > >> > > >>try mount -t vfat -o umask=000 /dev/vg1/win1 /mnt > > >> > > >>If you go to the mount man page, it explains some things that can > > >>''break'' vfat, such as everything by default being mounted with the umask > > >>of the current process. > > >> > > >>see man 8 mount and look for "Mount options for fat" > > >> > > >>You may need to play with this a bit. The above gets my pen drive > > >>mounted correctly, may work for you. > > >> > > >>This is really a GNU/Linux admin issue, not so much Xen but I figured > > >>I''d chirp in anyway since it is kinda cryptic. > > >> > > > > > >Ok I''ve tryed all things working for usb pen problems with no effect. So > > >I investigate further: > > > > > >creating a new volume > > ># lvcreate -n win3 -L6G vg1 > > > > > >making a vfat fs on it > > ># mkfs.vfat /dev/vg1/win3 > > > > > >mounting it (successfully) > > ># mount -v -t vfat /dev/vg1/win3 /mnt/ > > >/dev/mapper/vg1-win3 on /mnt type vfat (rw) > > > > > >launching Windows XP guest installation > > ># xm create /etc/xen/winxp3.hvm > > > > > >At this point Windows Xp installer can''t detect the partition type and > > >report it as ''unknown'' > > > > > >So Ok, let Windows installer (re)format it with fat32 fs and go ahead > > >to finish installation. When installation ended I stop Windows > > >Guest properly and try again to mount the guest vfat fs and, the same > > >error appends ... > > > > > ># mount -t vfat /dev/vg1/win3 /mnt/ > > >mount: wrong fs type, bad option, bad superblock on /dev/vg1/win3, > > > missing codepage or other error > > > In some cases useful info is found in syslog - try > > > dmesg | tail or so > > > > > > > > >Don''t you thing the problem comes from the manner Windows XP guest handles > > >lvm volumes rather than from any missing codepage or file mode option when > > >mounting ? > > > > > >Anyone can report succes with mounting ''on lvm'' vfat guest filesystem ? > > > > > >Thanks ! > > > > > > Yann. > > > > > Windows XP created it? Are you *sure* it''s a FAT32 or vfat compatible > > partition type, and not NTFS? > > Yes I''m sure it''s a fat32 fs.And yes it''s a FAT32 partition type :) # fdisk -l /dev/vg1/win3 Device Boot Start End Blocks Id System /dev/vg1/win3p1 * 1 782 6281383+ b W95 FAT32 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nico Kadel-Garcia
2007-Apr-28 11:36 UTC
Re: [Xen-users] can''t mount vfat fs on lvm created by winxp guest
Yann Boutin wrote:> > And yes it''s a FAT32 partition type :) > > # fdisk -l /dev/vg1/win3 > > Device Boot Start End Blocks Id System > /dev/vg1/win3p1 * 1 782 6281383+ b W95 FAT32 > >You *are* aware that the patition type reported by fdisk is merely a delicate suggestion, and not actually proof that the filesystem is that type? Not that Windows XP lied to you, but but it''s not conclusive. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Yann Boutin
2007-Apr-28 16:07 UTC
Re: [Xen-users] can''t mount vfat fs on lvm created by winxp guest
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@lists.xensource.com http://lists.xensource.com/xen-users
Nico Kadel-Garcia
2007-Apr-28 16:19 UTC
Re: [Xen-users] can''t mount vfat fs on lvm created by winxp guest
Yann Boutin wrote:> 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. >Ahh. I think I see what''s going on. The logical volume you''re using is being seen by Windows as a whole *disk*, not a single partition. In the Linux world, you''d use "kpartx" to get that set up. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Yann Boutin
2007-Apr-28 17:52 UTC
Re: [Xen-users] can''t mount vfat fs on lvm created by winxp guest
> Ahh. I think I see what''s going on. The logical volume you''re using is > being seen by Windows as a whole *disk*, not a single partition. In the > Linux world, you''d use "kpartx" to get that set up.Thank you. For info the same answer here too : https://www.redhat.com/archives/linux-lvm/2007-April/msg00057.html Have a nice day Yann _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users