<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://kb.costasano.club/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mngr</id>
	<title>Costa Sano KB - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://kb.costasano.club/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mngr"/>
	<link rel="alternate" type="text/html" href="https://kb.costasano.club/Special:Contributions/Mngr"/>
	<updated>2026-09-21T22:04:30Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.2</generator>
	<entry>
		<id>https://kb.costasano.club/index.php?title=Platform:Drupal/Tracing_Drupal_Storage&amp;diff=1402</id>
		<title>Platform:Drupal/Tracing Drupal Storage</title>
		<link rel="alternate" type="text/html" href="https://kb.costasano.club/index.php?title=Platform:Drupal/Tracing_Drupal_Storage&amp;diff=1402"/>
		<updated>2026-09-20T18:21:46Z</updated>

		<summary type="html">&lt;p&gt;Mngr: Created page with &amp;quot;= Tracing Drupal Storage — From File to Physical Disk =  == Purpose == This document explains how to trace a Drupal file through the different storage layers of the Costa Sano infrastructure:  &amp;lt;code&amp;gt;Drupal file      ↓  Linux filesystem      ↓  Linux block device      ↓  Hyper-V virtual disk      ↓  VHDX file      ↓  Windows storage volume      ↓  physical disk&amp;lt;/code&amp;gt; The important concept is that &amp;#039;&amp;#039;&amp;#039;each layer hides the implementation details of the layer b...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Tracing Drupal Storage — From File to Physical Disk =&lt;br /&gt;
&lt;br /&gt;
== Purpose ==&lt;br /&gt;
This document explains how to trace a Drupal file through the different storage layers of the Costa Sano infrastructure:&lt;br /&gt;
 &amp;lt;code&amp;gt;Drupal file&lt;br /&gt;
     ↓&lt;br /&gt;
 Linux filesystem&lt;br /&gt;
     ↓&lt;br /&gt;
 Linux block device&lt;br /&gt;
     ↓&lt;br /&gt;
 Hyper-V virtual disk&lt;br /&gt;
     ↓&lt;br /&gt;
 VHDX file&lt;br /&gt;
     ↓&lt;br /&gt;
 Windows storage volume&lt;br /&gt;
     ↓&lt;br /&gt;
 physical disk&amp;lt;/code&amp;gt;&lt;br /&gt;
The important concept is that &#039;&#039;&#039;each layer hides the implementation details of the layer below it&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Drupal does not need to know which physical disk contains a file.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 1. The logical view seen by Drupal =&lt;br /&gt;
Drupal works with a normal filesystem path such as:&lt;br /&gt;
 &amp;lt;code&amp;gt;/var/www/drupal/web/sites/default/files/example.pdf&amp;lt;/code&amp;gt;&lt;br /&gt;
Drupal does not refer to:&lt;br /&gt;
 &amp;lt;code&amp;gt;/dev/sda&amp;lt;/code&amp;gt;&lt;br /&gt;
and does not know that the storage is a Hyper-V VHDX.&lt;br /&gt;
&lt;br /&gt;
The Drupal application simply asks the operating system to read or write a file at the given path.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 2. Linux filesystem layer =&lt;br /&gt;
In the current Costa Sano configuration, the Drupal media directory is mounted on a separate XFS filesystem.&lt;br /&gt;
&lt;br /&gt;
The relationship is:&lt;br /&gt;
 &amp;lt;code&amp;gt;/var/www/drupal/web/sites/default/files&lt;br /&gt;
         ↓&lt;br /&gt;
 XFS filesystem&lt;br /&gt;
         ↓&lt;br /&gt;
 UUID=06d91c93-c2cb-4185-884b-13b02e47f5ac&amp;lt;/code&amp;gt;&lt;br /&gt;
The filesystem UUID is the stable Linux identity of the filesystem.&lt;br /&gt;
&lt;br /&gt;
The device name &amp;lt;code&amp;gt;/dev/sda&amp;lt;/code&amp;gt; should &#039;&#039;&#039;not&#039;&#039;&#039; be treated as the permanent identity.&lt;br /&gt;
&lt;br /&gt;
Linux device names can change.&lt;br /&gt;
&lt;br /&gt;
The UUID is what is used in &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt;.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 3. &amp;lt;code&amp;gt;stat&amp;lt;/code&amp;gt; — examine the file =&lt;br /&gt;
For an individual Drupal file:&lt;br /&gt;
 &amp;lt;code&amp;gt;stat /var/www/drupal/web/sites/default/files/example.pdf&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;stat&amp;lt;/code&amp;gt; reports information about the file itself, including:&lt;br /&gt;
&lt;br /&gt;
* size;&lt;br /&gt;
* owner;&lt;br /&gt;
* group;&lt;br /&gt;
* permissions;&lt;br /&gt;
* timestamps;&lt;br /&gt;
* inode information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;stat&amp;lt;/code&amp;gt; is therefore the starting point when investigating a particular file.&lt;br /&gt;
&lt;br /&gt;
It does not normally tell us directly which physical device hosts the file.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 4. &amp;lt;code&amp;gt;df&amp;lt;/code&amp;gt; — identify the filesystem hosting the file =&lt;br /&gt;
To determine which filesystem contains a particular file:&lt;br /&gt;
 &amp;lt;code&amp;gt;df -h /var/www/drupal/web/sites/default/files/example.pdf&amp;lt;/code&amp;gt;&lt;br /&gt;
Typical result:&lt;br /&gt;
 &amp;lt;code&amp;gt;Filesystem      Size  Used Avail Use% Mounted on&lt;br /&gt;
 /dev/sda        254G  ...  ...   ...  /var/www/drupal/web/sites/default/files&amp;lt;/code&amp;gt;&lt;br /&gt;
This tells us:&lt;br /&gt;
 &amp;lt;code&amp;gt;example.pdf&lt;br /&gt;
     ↓&lt;br /&gt;
 filesystem mounted at&lt;br /&gt;
 /var/www/drupal/web/sites/default/files&lt;br /&gt;
     ↓&lt;br /&gt;
 /dev/sda&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;df&amp;lt;/code&amp;gt; therefore answers:&amp;lt;blockquote&amp;gt;&#039;&#039;&#039;Which filesystem provides the storage for this path?&#039;&#039;&#039;&amp;lt;/blockquote&amp;gt;The same command can be used on the directory itself:&lt;br /&gt;
 &amp;lt;code&amp;gt;df -h /var/www/drupal/web/sites/default/files&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 5. &amp;lt;code&amp;gt;findmnt&amp;lt;/code&amp;gt; — show the mount relationship =&lt;br /&gt;
Use:&lt;br /&gt;
 &amp;lt;code&amp;gt;findmnt -T /var/www/drupal/web/sites/default/files/example.pdf&amp;lt;/code&amp;gt;&lt;br /&gt;
or:&lt;br /&gt;
 &amp;lt;code&amp;gt;findmnt /var/www/drupal/web/sites/default/files&amp;lt;/code&amp;gt;&lt;br /&gt;
Typical result:&lt;br /&gt;
 &amp;lt;code&amp;gt;TARGET                              SOURCE   FSTYPE&lt;br /&gt;
 /var/www/drupal/web/sites/default/files&lt;br /&gt;
                                     /dev/sda xfs&amp;lt;/code&amp;gt;&lt;br /&gt;
This makes the relationship explicit:&lt;br /&gt;
 &amp;lt;code&amp;gt;/dev/sda&lt;br /&gt;
     ↓&lt;br /&gt;
 XFS filesystem&lt;br /&gt;
     ↓&lt;br /&gt;
 /var/www/drupal/web/sites/default/files&amp;lt;/code&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;-T&amp;lt;/code&amp;gt; option is particularly useful because it asks:&amp;lt;blockquote&amp;gt;Which mounted filesystem contains this path?&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 6. &amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt; — inspect Linux block devices =&lt;br /&gt;
Use:&lt;br /&gt;
 &amp;lt;code&amp;gt;lsblk -f&amp;lt;/code&amp;gt;&lt;br /&gt;
This shows Linux block devices, filesystems, UUIDs and mount points.&lt;br /&gt;
&lt;br /&gt;
The media disk appears approximately as:&lt;br /&gt;
 &amp;lt;code&amp;gt;NAME FSTYPE UUID                                 MOUNTPOINTS&lt;br /&gt;
 sda  xfs    06d91c93-c2cb-4185-884b-13b02e47f5ac /var/www/drupal/web/sites/default/files&lt;br /&gt;
 sdb&lt;br /&gt;
 ├─...&amp;lt;/code&amp;gt;&lt;br /&gt;
This connects:&lt;br /&gt;
 &amp;lt;code&amp;gt;/dev/sda&lt;br /&gt;
     ↓&lt;br /&gt;
 XFS&lt;br /&gt;
     ↓&lt;br /&gt;
 UUID&lt;br /&gt;
     ↓&lt;br /&gt;
 Drupal files mount point&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;lsblk&amp;lt;/code&amp;gt; is therefore primarily a &#039;&#039;&#039;block-device view&#039;&#039;&#039;, whereas &amp;lt;code&amp;gt;findmnt&amp;lt;/code&amp;gt; is primarily a &#039;&#039;&#039;mount relationship view&#039;&#039;&#039;.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 7. &amp;lt;code&amp;gt;blkid&amp;lt;/code&amp;gt; — identify the filesystem by UUID =&lt;br /&gt;
Use:&lt;br /&gt;
 &amp;lt;code&amp;gt;sudo blkid /dev/sda&amp;lt;/code&amp;gt;&lt;br /&gt;
For the Costa Sano media disk the result is:&lt;br /&gt;
 &amp;lt;code&amp;gt;/dev/sda: UUID=&amp;quot;06d91c93-c2cb-4185-884b-13b02e47f5ac&amp;quot; BLOCK_SIZE=&amp;quot;4096&amp;quot; TYPE=&amp;quot;xfs&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
The UUID is important because &amp;lt;code&amp;gt;/etc/fstab&amp;lt;/code&amp;gt; uses it to identify the filesystem.&lt;br /&gt;
&lt;br /&gt;
The permanent configuration is:&lt;br /&gt;
 &amp;lt;code&amp;gt;UUID=06d91c93-c2cb-4185-884b-13b02e47f5ac /var/www/drupal/web/sites/default/files xfs defaults 0 0&amp;lt;/code&amp;gt;&lt;br /&gt;
Therefore Linux does not depend on the disk being called &amp;lt;code&amp;gt;/dev/sda&amp;lt;/code&amp;gt; after a reboot.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 8. Complete Linux-side investigation =&lt;br /&gt;
For one particular Drupal file, the following sequence gives the complete Linux-side picture.&lt;br /&gt;
&lt;br /&gt;
=== Step 1 — file ===&lt;br /&gt;
 &amp;lt;code&amp;gt;stat /var/www/drupal/web/sites/default/files/example.pdf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 2 — filesystem ===&lt;br /&gt;
 &amp;lt;code&amp;gt;df -h /var/www/drupal/web/sites/default/files/example.pdf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 3 — mount relationship ===&lt;br /&gt;
 &amp;lt;code&amp;gt;findmnt -T /var/www/drupal/web/sites/default/files/example.pdf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 4 — block devices ===&lt;br /&gt;
 &amp;lt;code&amp;gt;lsblk -f&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 5 — filesystem identity ===&lt;br /&gt;
 &amp;lt;code&amp;gt;sudo blkid /dev/sda&amp;lt;/code&amp;gt;&lt;br /&gt;
The result is conceptually:&lt;br /&gt;
 &amp;lt;code&amp;gt;Drupal file&lt;br /&gt;
     ↓&lt;br /&gt;
 /var/www/drupal/web/sites/default/files/example.pdf&lt;br /&gt;
     ↓&lt;br /&gt;
 /dev/sda&lt;br /&gt;
     ↓&lt;br /&gt;
 XFS&lt;br /&gt;
     ↓&lt;br /&gt;
 UUID=06d91c93-c2cb-4185-884b-13b02e47f5ac&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 9. Crossing the virtualization boundary =&lt;br /&gt;
Up to this point we are inside the AlmaLinux VM.&lt;br /&gt;
&lt;br /&gt;
The Linux operating system knows:&lt;br /&gt;
 &amp;lt;code&amp;gt;/dev/sda&amp;lt;/code&amp;gt;&lt;br /&gt;
but Linux does not know that this virtual disk is physically represented by a VHDX file on the Windows Server.&lt;br /&gt;
&lt;br /&gt;
That information belongs to Hyper-V.&lt;br /&gt;
&lt;br /&gt;
The next layer is therefore:&lt;br /&gt;
 &amp;lt;code&amp;gt;Linux /dev/sda&lt;br /&gt;
         ↓&lt;br /&gt;
 Hyper-V virtual disk&lt;br /&gt;
         ↓&lt;br /&gt;
 VHDX&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 10. Hyper-V disk configuration =&lt;br /&gt;
On the Windows Server Hyper-V host, the Drupal VM has:&lt;br /&gt;
 &amp;lt;code&amp;gt;IDE Controller 0&lt;br /&gt;
 ├── Device 0 → original 127 GB VHDX&lt;br /&gt;
 └── Device 1 → new 254 GB VHDX&amp;lt;/code&amp;gt;&lt;br /&gt;
The new media disk is the second virtual disk attached to the controller.&lt;br /&gt;
&lt;br /&gt;
An important lesson from the migration is:&amp;lt;blockquote&amp;gt;Hyper-V&#039;s disk numbering and Linux&#039;s &amp;lt;code&amp;gt;/dev/sdX&amp;lt;/code&amp;gt; naming are different naming systems.&amp;lt;/blockquote&amp;gt;Therefore:&lt;br /&gt;
 &amp;lt;code&amp;gt;Hyper-V Device 1&amp;lt;/code&amp;gt;&lt;br /&gt;
does not imply:&lt;br /&gt;
 &amp;lt;code&amp;gt;/dev/sdb&amp;lt;/code&amp;gt;&lt;br /&gt;
Linux assigned &amp;lt;code&amp;gt;/dev/sda&amp;lt;/code&amp;gt; to the new 254 GB disk in this case.&lt;br /&gt;
&lt;br /&gt;
Disk identification should therefore be based on reliable properties such as:&lt;br /&gt;
&lt;br /&gt;
* size;&lt;br /&gt;
* partitions;&lt;br /&gt;
* filesystem;&lt;br /&gt;
* UUID;&lt;br /&gt;
* mount point.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 11. PowerShell — identify the VHDX attached to the VM =&lt;br /&gt;
On the Windows Server Hyper-V host, PowerShell can show the virtual disks attached to the VM:&lt;br /&gt;
 &amp;lt;code&amp;gt;Get-VMHardDiskDrive -VMName &amp;quot;YOUR-DRUPAL-VM&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
This shows information including:&lt;br /&gt;
&lt;br /&gt;
* VM name;&lt;br /&gt;
* controller type;&lt;br /&gt;
* controller number;&lt;br /&gt;
* device location;&lt;br /&gt;
* VHDX path.&lt;br /&gt;
&lt;br /&gt;
Conceptually the result is:&lt;br /&gt;
 &amp;lt;code&amp;gt;VMName     ControllerType  ControllerLocation  Path&lt;br /&gt;
 Drupal     IDE             0                  D:\...\Drupal-System.vhdx&lt;br /&gt;
 Drupal     IDE             1                  D:\...\Drupal-Media.vhdx&amp;lt;/code&amp;gt;&lt;br /&gt;
The exact path depends on the Hyper-V configuration.&lt;br /&gt;
&lt;br /&gt;
This establishes the relationship:&lt;br /&gt;
 &amp;lt;code&amp;gt;Linux /dev/sda&lt;br /&gt;
         ↓&lt;br /&gt;
 Hyper-V IDE 0 / Device 1&lt;br /&gt;
         ↓&lt;br /&gt;
 Drupal-Media.vhdx&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 12. &amp;lt;code&amp;gt;Get-VHD&amp;lt;/code&amp;gt; — inspect the VHDX =&lt;br /&gt;
PowerShell can inspect the virtual disk itself:&lt;br /&gt;
 &amp;lt;code&amp;gt;Get-VHD -Path &amp;quot;D:\...\Drupal-Media.vhdx&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
This can show information such as:&lt;br /&gt;
&lt;br /&gt;
* VHDX path;&lt;br /&gt;
* virtual disk format;&lt;br /&gt;
* disk type;&lt;br /&gt;
* virtual size;&lt;br /&gt;
* physical file size;&lt;br /&gt;
* block size.&lt;br /&gt;
&lt;br /&gt;
The important point is that Hyper-V now gives us the identity of the virtual storage object that Linux sees as its virtual disk.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 13. Identify the Windows volume containing the VHDX =&lt;br /&gt;
Suppose the VHDX is located at:&lt;br /&gt;
 &amp;lt;code&amp;gt;D:\Hyper-V\Virtual Hard Disks\Drupal-Media.vhdx&amp;lt;/code&amp;gt;&lt;br /&gt;
The VHDX is therefore stored on the Windows &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt; volume.&lt;br /&gt;
&lt;br /&gt;
PowerShell:&lt;br /&gt;
 &amp;lt;code&amp;gt;Get-Volume -DriveLetter D&amp;lt;/code&amp;gt;&lt;br /&gt;
This identifies the Windows volume.&lt;br /&gt;
&lt;br /&gt;
Conceptually:&lt;br /&gt;
 &amp;lt;code&amp;gt;Drupal-Media.vhdx&lt;br /&gt;
         ↓&lt;br /&gt;
 D:&lt;br /&gt;
         ↓&lt;br /&gt;
 Windows NTFS volume&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 14. Identify the physical disk behind the Windows volume =&lt;br /&gt;
To identify the partition containing &amp;lt;code&amp;gt;D:&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;lt;code&amp;gt;Get-Partition -DriveLetter D&amp;lt;/code&amp;gt;&lt;br /&gt;
This provides the Windows disk number.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
 &amp;lt;code&amp;gt;DiskNumber       : 2&lt;br /&gt;
 PartitionNumber  : 1&lt;br /&gt;
 DriveLetter      : D&amp;lt;/code&amp;gt;&lt;br /&gt;
Then inspect that disk:&lt;br /&gt;
 &amp;lt;code&amp;gt;Get-Disk -Number 2&amp;lt;/code&amp;gt;&lt;br /&gt;
This gives information about the physical disk, including:&lt;br /&gt;
&lt;br /&gt;
* disk number;&lt;br /&gt;
* model;&lt;br /&gt;
* size;&lt;br /&gt;
* bus type;&lt;br /&gt;
* operational status;&lt;br /&gt;
* health.&lt;br /&gt;
&lt;br /&gt;
The physical storage devices can also be listed with:&lt;br /&gt;
 &amp;lt;code&amp;gt;Get-PhysicalDisk&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 15. Complete storage chain =&lt;br /&gt;
The complete Costa Sano media storage chain is therefore:&lt;br /&gt;
 &amp;lt;code&amp;gt;┌─────────────────────────────────────────────┐&lt;br /&gt;
 │ Drupal                                      │&lt;br /&gt;
 │                                             │&lt;br /&gt;
 │ /sites/default/files/example.pdf            │&lt;br /&gt;
 └──────────────────────┬──────────────────────┘&lt;br /&gt;
                        │&lt;br /&gt;
                        ▼&lt;br /&gt;
 ┌─────────────────────────────────────────────┐&lt;br /&gt;
 │ AlmaLinux 10.2                              │&lt;br /&gt;
 │                                             │&lt;br /&gt;
 │ XFS filesystem                              │&lt;br /&gt;
 │ UUID=06d91c93-c2cb-4185-884b-13b02e47f5ac   │&lt;br /&gt;
 │                                             │&lt;br /&gt;
 │ /dev/sda                                    │&lt;br /&gt;
 └──────────────────────┬──────────────────────┘&lt;br /&gt;
                        │&lt;br /&gt;
                        ▼&lt;br /&gt;
 ┌─────────────────────────────────────────────┐&lt;br /&gt;
 │ Hyper-V                                     │&lt;br /&gt;
 │                                             │&lt;br /&gt;
 │ IDE Controller 0 / Device 1                 │&lt;br /&gt;
 │                                             │&lt;br /&gt;
 │ 254 GB Drupal-Media.vhdx                    │&lt;br /&gt;
 └──────────────────────┬──────────────────────┘&lt;br /&gt;
                        │&lt;br /&gt;
                        ▼&lt;br /&gt;
 ┌─────────────────────────────────────────────┐&lt;br /&gt;
 │ Windows Server 2019                         │&lt;br /&gt;
 │                                             │&lt;br /&gt;
 │ D:\Hyper-V\...\Drupal-Media.vhdx            │&lt;br /&gt;
 │                                             │&lt;br /&gt;
 │ NTFS volume                                 │&lt;br /&gt;
 └──────────────────────┬──────────────────────┘&lt;br /&gt;
                        │&lt;br /&gt;
                        ▼&lt;br /&gt;
 ┌─────────────────────────────────────────────┐&lt;br /&gt;
 │ Physical storage                            │&lt;br /&gt;
 │                                             │&lt;br /&gt;
 │ SSD / HDD / storage device                  │&lt;br /&gt;
 └─────────────────────────────────────────────┘&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 16. The abstraction principle =&lt;br /&gt;
The important architectural lesson is that &#039;&#039;&#039;each layer provides a stable logical interface to the layer above it&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Drupal sees:&lt;br /&gt;
 &amp;lt;code&amp;gt;/var/www/drupal/web/sites/default/files&amp;lt;/code&amp;gt;&lt;br /&gt;
Linux sees:&lt;br /&gt;
 &amp;lt;code&amp;gt;XFS filesystem&lt;br /&gt;
 UUID=06d91c93...&amp;lt;/code&amp;gt;&lt;br /&gt;
Linux&#039;s block layer sees:&lt;br /&gt;
 &amp;lt;code&amp;gt;/dev/sda&amp;lt;/code&amp;gt;&lt;br /&gt;
Hyper-V sees:&lt;br /&gt;
 &amp;lt;code&amp;gt;254 GB VHDX&amp;lt;/code&amp;gt;&lt;br /&gt;
Windows sees:&lt;br /&gt;
 &amp;lt;code&amp;gt;D:\...\Drupal-Media.vhdx&amp;lt;/code&amp;gt;&lt;br /&gt;
The physical storage subsystem sees:&lt;br /&gt;
 &amp;lt;code&amp;gt;physical disk&amp;lt;/code&amp;gt;&lt;br /&gt;
Drupal does not need to know any of the details below its filesystem path.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 17. Why the migration worked without changing Drupal =&lt;br /&gt;
Before the migration:&lt;br /&gt;
 &amp;lt;code&amp;gt;Drupal&lt;br /&gt;
    ↓&lt;br /&gt;
 /var/www/drupal/web/sites/default/files&lt;br /&gt;
    ↓&lt;br /&gt;
 original filesystem&amp;lt;/code&amp;gt;&lt;br /&gt;
After the migration:&lt;br /&gt;
 &amp;lt;code&amp;gt;Drupal&lt;br /&gt;
    ↓&lt;br /&gt;
 /var/www/drupal/web/sites/default/files&lt;br /&gt;
    ↓&lt;br /&gt;
 new XFS filesystem&lt;br /&gt;
    ↓&lt;br /&gt;
 254 GB VHDX&amp;lt;/code&amp;gt;&lt;br /&gt;
The Drupal path remained unchanged.&lt;br /&gt;
&lt;br /&gt;
Therefore no Drupal configuration needed to be changed.&lt;br /&gt;
&lt;br /&gt;
Only the filesystem underneath the path changed.&lt;br /&gt;
&lt;br /&gt;
This is the reason a separate media VHDX can be introduced without making Drupal aware of the storage implementation.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 18. Linux versus Windows storage abstraction =&lt;br /&gt;
Windows commonly exposes storage to users through drive letters:&lt;br /&gt;
 &amp;lt;code&amp;gt;C:\&lt;br /&gt;
 D:\&lt;br /&gt;
 E:\&amp;lt;/code&amp;gt;&lt;br /&gt;
Linux instead presents a unified filesystem namespace:&lt;br /&gt;
 &amp;lt;code&amp;gt;/&lt;br /&gt;
 ├── boot&lt;br /&gt;
 ├── home&lt;br /&gt;
 ├── var&lt;br /&gt;
 │   └── www&lt;br /&gt;
 │       └── drupal&lt;br /&gt;
 │           └── web&lt;br /&gt;
 │               └── sites&lt;br /&gt;
 │                   └── default&lt;br /&gt;
 │                       ├── files&lt;br /&gt;
 │                       └── files.old&amp;lt;/code&amp;gt;&lt;br /&gt;
Different filesystems can be mounted at different points in this single hierarchy.&lt;br /&gt;
&lt;br /&gt;
Therefore these two directories can appear next to each other:&lt;br /&gt;
 &amp;lt;code&amp;gt;files/&lt;br /&gt;
 files.old/&amp;lt;/code&amp;gt;&lt;br /&gt;
while actually residing on different filesystems.&lt;br /&gt;
&lt;br /&gt;
In the current Costa Sano migration:&lt;br /&gt;
 &amp;lt;code&amp;gt;files/&lt;br /&gt;
     ↓&lt;br /&gt;
 254 GB VHDX&lt;br /&gt;
 &lt;br /&gt;
 files.old/&lt;br /&gt;
     ↓&lt;br /&gt;
 original Drupal/system filesystem&amp;lt;/code&amp;gt;&lt;br /&gt;
The user sees one directory tree.&lt;br /&gt;
&lt;br /&gt;
Linux manages the storage boundaries underneath it.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 19. Practical investigation recipe =&lt;br /&gt;
When asking:&amp;lt;blockquote&amp;gt;&#039;&#039;&#039;&amp;quot;Where is this Drupal file actually stored?&amp;quot;&#039;&#039;&#039;&amp;lt;/blockquote&amp;gt;start with the file:&lt;br /&gt;
 &amp;lt;code&amp;gt;stat /path/to/file&amp;lt;/code&amp;gt;&lt;br /&gt;
Then:&lt;br /&gt;
 &amp;lt;code&amp;gt;df -h /path/to/file&amp;lt;/code&amp;gt;&lt;br /&gt;
Then:&lt;br /&gt;
 &amp;lt;code&amp;gt;findmnt -T /path/to/file&amp;lt;/code&amp;gt;&lt;br /&gt;
Then:&lt;br /&gt;
 &amp;lt;code&amp;gt;lsblk -f&amp;lt;/code&amp;gt;&lt;br /&gt;
Then identify the filesystem UUID:&lt;br /&gt;
 &amp;lt;code&amp;gt;sudo blkid /dev/sda&amp;lt;/code&amp;gt;&lt;br /&gt;
On the Hyper-V host, continue with:&lt;br /&gt;
 &amp;lt;code&amp;gt;Get-VMHardDiskDrive -VMName &amp;quot;YOUR-DRUPAL-VM&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
then:&lt;br /&gt;
 &amp;lt;code&amp;gt;Get-VHD -Path &amp;quot;path-to-the-vhdx&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
then identify the Windows volume:&lt;br /&gt;
 &amp;lt;code&amp;gt;Get-Volume -DriveLetter D&amp;lt;/code&amp;gt;&lt;br /&gt;
then the physical disk:&lt;br /&gt;
 &amp;lt;code&amp;gt;Get-Partition -DriveLetter D&lt;br /&gt;
 Get-Disk -Number &amp;lt;disk-number&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
This allows the complete path to be traced from:&lt;br /&gt;
 &amp;lt;code&amp;gt;Drupal file&lt;br /&gt;
     ↓&lt;br /&gt;
 Linux filesystem&lt;br /&gt;
     ↓&lt;br /&gt;
 Linux block device&lt;br /&gt;
     ↓&lt;br /&gt;
 Hyper-V virtual disk&lt;br /&gt;
     ↓&lt;br /&gt;
 VHDX file&lt;br /&gt;
     ↓&lt;br /&gt;
 Windows volume&lt;br /&gt;
     ↓&lt;br /&gt;
 physical disk&amp;lt;/code&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
= 20. Mental model =&lt;br /&gt;
A useful way to remember the whole mechanism is:&amp;lt;blockquote&amp;gt;&#039;&#039;&#039;The application sees a pathname.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Linux maps the pathname to a filesystem.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The filesystem is identified by a UUID.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Linux connects that filesystem to a block device.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Hyper-V presents that block device as a virtual disk.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The virtual disk is implemented by a VHDX.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Windows stores that VHDX on physical storage.&#039;&#039;&#039;&amp;lt;/blockquote&amp;gt;Each layer can change internally while preserving the interface presented to the layer above.&lt;br /&gt;
&lt;br /&gt;
That abstraction is what allowed the Costa Sano media storage to move from the original Drupal filesystem to a separate 254 GB VHDX &#039;&#039;&#039;without changing Drupal&#039;s file paths or configuration&#039;&#039;&#039;.&lt;/div&gt;</summary>
		<author><name>Mngr</name></author>
	</entry>
</feed>