FAQ
Using CentOS 5.4 Xen Virtualization "stock install"

Added rpmforge NTFS extension for mount command.

Scenario: Have mirror dd'd off to "backup" unmounted LV contained
Windows machine. Within the LVM volume are two NTFS partitions formatted
by Win2k8.

Issue: How can I mount this? I need to verify file existence and run
batch of file compare checks.

If I try to mount the LV:

~~~~~~~~~~~~~
[root at vm1 ~]# mount -t ntfs /dev/thisvg00/thisw2kwe-b4change /mnt/ntfs
NTFS signature is missing.
Failed to mount '/dev/mapper/serv1vg00-w2kwe--b4cert': Invalid argument
The device '/dev/mapper/serv1vg00-w2kwe--b4cert' doesn't seem to have a
valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
~~~~~~~~~~~~~

Would I have had an easier situation if I just had made one big C:
partition instead of two (1 for OS and progs, other for data and
applications)?

Search Discussions

  • Christopher G. Stach II at Feb 20, 2010 at 9:04 pm

    ----- "Ben M." wrote:

    If I try to mount the LV:

    ~~~~~~~~~~~~~
    [root at vm1 ~]# mount -t ntfs /dev/thisvg00/thisw2kwe-b4change
    /mnt/ntfs
    NTFS signature is missing.
    Failed to mount '/dev/mapper/serv1vg00-w2kwe--b4cert': Invalid
    argument
    The device '/dev/mapper/serv1vg00-w2kwe--b4cert' doesn't seem to have
    a
    valid NTFS.
    Maybe the wrong device is used? Or the whole disk instead of a
    partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
    Did you dd the disk or the partition? If you did the whole disk (verify with fdisk or something), you can use kpartx to add the LV as a disk and then mount the partitions that are created.

    --
    Christopher G. Stach II
    http://ldsys.net/~cgs/
  • Ben M. at Feb 20, 2010 at 9:27 pm
    I dd'd the LV from a snapshot to an empty LV on a different VG with
    identical extents like this:

    dd if=/dev/vgsnapshotsource/win2k8-snapshot of=/dev/vgtarget/win2k8-target

    I'm a little confused by what you mean by "partition" and disk in this
    context. There is the LV container created, a partition, but also a
    volume and presented as a "disk" to the Windows vm.

    Then inside that LV, W2k8 is installed, and that partitioned inside that
    LV two logical drives which were then formatted NTFS by the W2k8
    installation.

    So, I dd'd the LV "partition" but wasn't I also dd'd Window's
    "perception" of its disk?







    Christopher G. Stach II wrote:
    ----- "Ben M." wrote:
    If I try to mount the LV:

    ~~~~~~~~~~~~~
    [root at vm1 ~]# mount -t ntfs /dev/thisvg00/thisw2kwe-b4change
    /mnt/ntfs
    NTFS signature is missing.
    Failed to mount '/dev/mapper/serv1vg00-w2kwe--b4cert': Invalid
    argument
    The device '/dev/mapper/serv1vg00-w2kwe--b4cert' doesn't seem to have
    a
    valid NTFS.
    Maybe the wrong device is used? Or the whole disk instead of a
    partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
    Did you dd the disk or the partition? If you did the whole disk (verify with fdisk or something), you can use kpartx to add the LV as a disk and then mount the partitions that are created.
  • Christopher G. Stach II at Feb 24, 2010 at 7:45 pm

    ----- "Ben M." wrote:

    I dd'd the LV from a snapshot to an empty LV on a different VG with
    identical extents like this:

    dd if=/dev/vgsnapshotsource/win2k8-snapshot
    of=/dev/vgtarget/win2k8-target

    I'm a little confused by what you mean by "partition" and disk in this
    context. There is the LV container created, a partition, but also a
    volume and presented as a "disk" to the Windows vm.
    I meant from the perspective of Linux. It is unclear to me how many layers are involved and whether or not you already did the kpartx bit, but if in case you didn't... If Windows is using the LV as an entire disk and partitions it, you have to use that partition table, too.

    --
    Christopher G. Stach II
    http://ldsys.net/~cgs/
  • Ed Heron at Feb 25, 2010 at 4:57 pm
    From: "Christopher G. Stach II", Wednesday, February 24, 2010 12:45 PM
    ...
    I meant from the perspective of Linux. It is unclear to me how many layers
    are involved and whether or not you already did the kpartx bit, but if in
    case you didn't... If Windows is using the LV as an entire disk and
    partitions it, you have to use that partition table, too.
    ...
    If Ben did, what I think is, a standard install, he created a LV and gave
    it to virt-install with the CD for install. Windows would treat that LV as
    a disk and create a partition table and then create an NTFS filesystem
    inside that new partition. (from your responses, Chris, I'm guessing you
    know this. I'm just prefacing my guesses to put my suggestions in context.)

    In order to access the NTFS partition, you have to get Linux to read the
    partition table from the LV and create new devices. (I'm guessing you know
    this too, Chris, from your responses, but I think Ben might not be
    understanding what really is going on).

    Recently, I was required to expand a virtual drive/NTFS for a virtual
    Windows XP machine. I documented my process, which includes using kpartx to
    create a new device so the ntfs tools can see the nested partitions, at
    http://wiki.centos.org/EdHeron/DomU_LVM_NTFS_resize. After posting it in
    the doc list, a simpler suggestion was made that I have yet to test.
    However, there are pieces there that might help Ben understand what is going
    on.

    Ben, if this doc helps, let me know. Since it explains a little about
    virtual machine nested filesystems and how to access them, I may change it
    with that in mind.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcentos-virt @
categoriescentos
postedFeb 20, '10 at 6:02p
activeFeb 25, '10 at 4:57p
posts5
users3
websitecentos.org
irc#centos

People

Translate

site design / logo © 2022 Grokbase