chrysocome.netChrysocome Logo

Using Virtual Volumes


The interface to Virtual Volumes is not a shell. It is a simple test harness which is developed along with the program to allow new features to be tested.

Many of the commands will be familiar to both unix and windows users. There is however no specific syntax or standard.


The term volume is used to mean a block based IO device. This means hard disks, partitions, RAID arrays, Physical Volumes, Logical Volumes etc. There is no standard method for accessing these devices in windows, which is why vv implements it's own abstractions (hence the Virtual in the name).

NT Hard Disks

Hard Disks are names \Device\Harddisk<x>\Partition0 where x is an unsigned integer. The first disk detected is assigned the number 0 and as more disks are detected, the number is incremented. It is possible for a disk to be removed so the numbers are not always sequential. Windows NT provides an estimate of the disk size (in CHS) so trial and error is used to detect the correct size. 2K an above reports the correct disk size. Vista does not list the disks in the native namespace. Reading & writing to NT Hard Disk is supported. Most of the time this is not done directly because some level of abstraction needs to be applied.

NT Partitions

The most common abstraction of a Hard Disk is a partition table. Partitions are names \Device\Harddisk<x>\Partition<y> where x is the hard disk and y is a positive integer which identifies a single partition on that disk. No partition is created for extended container partitions (they don't have any data so that is not required). The supported partitioning schemes depends on your version of windows but it is transparent to Virtual Volumes. All versions of windows can report the size of a partition. Reading & writing to NT Partitions is supported.

NT Partition Back Door

On XP SP2, Some partitions can not be read, even if they are not in use. Sometimes it is possible to work around this by accessing the disk directly at the correct offset. This is done automatically and is available from 2K up. Any unreadable partitions will be renamed to x\Device\Harddisk<x>\Partition<y>

Windows 95 Disks

Windows 95 does not provide a generic method for accessing hard disks. The recommended procedure involves using DPMI to access the BIOS level IO interrupts. This is what Virtual Volumes does. Removable disks are numbered from $00 and fixed disks are numbered from $80. The size of the disk is returned in CHS so trial and error is used to detect the correct size. The IO method for Windows 95 is not very fast or reliable.

Windows 95 Partitions

Windows 95 does not provide a generic method for accessing partitions unless they have a mounted filesystem on them. Virtual Volumes can read the DOS partition table and create partition volumes. Partitions are named $<x>/<y> where x is the disk id and y is the partition number. Reading & writing to windows 95 partitions is supported, with the exception that they rely on windows 95 disk access with is not very fast or reliable.

Viewing your volumes

show [name]

This will show all volumes or optionally all volumes which match the specified name. For each volume, the name, size if available and read/write status is show. If there is any abstraction active on the volume, an alias will normally be printed which shows the details.

[ /]$ show \Device\Harddisk0\Partition0 (80000000000b rw) \Device\Harddisk0\Partition1 (57544704b rw) \Device\Harddisk0\Partition2 (0b rw) \Device\Harddisk0\Partition3 (106928640b rw) alias FS=ext2 alias UUID=CC99B80BF044414BBA053D2A3A7E2DDA alias LABEL=/boot x\Device\Harddisk0\Partition4 (0b rw) \Device\Harddisk0\Partition4 (58860071424b rw) alias LVM2 PV ysM4CSHzloSx4lJo8fUqgZ6vgIb4UXwr


Linux LVM2 is a supported abstraction. Only linear stripes are supported (no snapshots or RAID yet). When a Physical Volume is detected, an alias of the form LVM2 PV <UUID> is added, where UUID is the unique ID of the PV. A LVM2 UUID looks like this ysM4CSHzloSx4lJo8fUqgZ6vgIb4UXwr. The PV is scanned and any Logical Volumes are added with the name they were assigned when they were created, often something like VolGroup00/LogVol00. Reading & writing to Logical Volumes is supported.

VolGroup00/LogVol00 (20971520000b rw) alias FS=ext2 alias UUID=85B78C8D66DD4D36A9C9F5CBEBA8D626 VolGroup00/LogVol01 (536870912b rw)

Linux Software RAID

Linux software RAID is a supported abstraction. Linux software RAID stores metadata at a fixed offset from the end of the device. This requires knowing the exact size of the device. An alias of the form RAID<level>/<UUID> disk <n> is added to RAID member disks, where level is the RAID level (0, 1, 5 etc), UUID is the unique ID of the RAID set and n is the disk number in the RAID set. A Linux software RAID UUID looks like this 52A56BF4:9E0AB9A6:E8DF0829:C2DE9E12. The assembled RAID set is called RAID<level>/<UUID>.

\Device\Harddisk1\Partition3 (7953845760b rw) alias RAID1/52A56BF4:9E0AB9A6:E8DF0829:C2DE9E12 disk 0 \Device\Harddisk2\Partition3 (7953845760b rw) alias RAID1/52A56BF4:9E0AB9A6:E8DF0829:C2DE9E12 disk 1 RAID1/52A56BF4:9E0AB9A6:E8DF0829:C2DE9E12 (7953776640b rw)


Linux software RAID0 (striping) is a supported abstraction. Currently only reading from RAID0 is supported. Write support might be added in the future.


Linux software RAID1 (mirroring) is a supported abstraction. Currently only reading from RAID1 is supported. Write support might be added in the future.


Linux software RAID5 is not currently supported. This will be added in the future.


Sometimes you have a file which contains a filesystem. This is common with .iso files which are CD filesystems. These can be loaded into Virtual Volumes, much like you might loop mount them under linux. It requires vfs access (see below). Once loaded they will be available as a volume. Write access depends on the access to the underlying file.

load filesystem.img show filesystem.img filesystem.img (2785017856b rw)

VMWare Loopback

VMWare disks can be loaded into Virtual Volumes, much like a complete disk image. Once loaded they will be available as a volume. Write access is not yet available.

loadvm "Red Hat Enterprise Linux v4.vmdk" show Red Hat Enterprise Linux v4 (1073741824b ro) Red Hat Enterprise Linux v4/1 (1069254144b ro) alias LVM2 PV ZqDzO9VxrKiyLxw1D2vomMIudkBckO6i

File Systems

There are two main types of filesystem in Virtual Volumes, Block Based and Others. Block Based filesystems are found on a virtual volume, and Others come from some kind of API. Currently, the only block based filesystem in EXT2/EXT3. There are plans to add ReiserFS, FAT, ISO9660 and HFS+. Almost any block based filesystem could be added. Other filesystems are currently a temporary memory based filesystem and the Win32 API.

Mounting File Systems

mount <filesystem> <path|volume> [options]

filesystem is one of win32, ext2. For win32, specify a Win32 path (ie: c:\). For ext2, specify the name or alias of a virtual volume (ie: VolGroup00/LogVol00). options is optional and the only use currently is to specify rw for write support on ext2. Win32 is always writable. The mounted filesystem overlays the current directory. If you are in the root directory then the new filesystem will be visible immediately, otherwise you will have to cd .. and then cd back into the directory to see the new filesystem.


EXT2/EXT3 is implemented by using libext2fs which is part of e2fsprogs. An IO wrapper allows libext2fs to access any virtual volume. Full read and write support is implemented. Read only access is the default and should be safe. Write access is dangerous and should not be used except on a test system. mount ext2 VolGroup00/LogVol00 mount ext2 LABEL=/boot rw


Win32 is implemented by calling the Win32 API. Any Win32 path can be used. The Win32 API is always writable. File permissions are enforced by the underlying OS.

General Commands

General commands control things like debug verbosity, testing and information.


source [win32] <filename>

source will load the file via the vfs (default) or win32 api. Once a file is loaded, each line of the file is executed. This is the way that init.vv is run at startup.


help will list all the available commands.


dump is a debug command which shows all the in use VFS nodes. Mostly this will show mountpoints and loopback devices.


exit will cause virtual volumes to terminate.


debug <facility> <level>

debug alters the verbosity of debug messages from various parts of virtual volumes. Most messages are prefixed with a facility such as [vfs]. The verbosity of each facility can be individually set to one of ERROR, NORMAL, VERBOSE, LOOP, DUMP, MAX. The default for all facilities can be set using the wildcard *

debug * NORMAL debug vv_io VERBOSE debug vfs LOOP debug vfs_ext2 MAX


scan will invoke the default virtual volume detection. This should only be used once. If you do not have an init.vv file then it will be executed automatically at starup.

VFS Commands

VFS commands interact with the Virtual File System, operation like creating and deleting files and reading and writing data.


lists directory contents.


debug cat <filename>

Show contents of filename.