Linux/Unix
The operating system will be queried for the device serial number of the PostgreSQL volume(s) and then matched to a block storage device on FlashArray.
This example will use the default layout for a PostgreSQL cluster thus only one volume needs to be identified. The process is the same for any additional volumes used in a different layout.
Using the "df" command we query the mount point/directory on which the volume is mounted.
df -h | grep /var/lib/pgsql
[root@DB-04 data]# df -h | grep /var/lib/pgsql
/dev/mapper/3624a9370668f1ab9b15f4bc400014275 1.0T 47G 977G 5% /var/lib/pgsql
Using the device name (/dev/mapper/<volume identifier>) udev is queried for the DM_SERIAL property.
udevadm info --query=all --name=<device name> | grep DM_SERIAL
[root@DB-04 data]# udevadm info --query=all --name /dev/mapper/3624a9370668f1ab9b15f4bc400014275 | grep DM_SERIAL
E: DM_SERIAL=3624a9370668f1ab9b15f4bc400014275
Using the serial number returned for the device, it is possible to match it up to the block storage volume on a FlashArray. Note that the block volume serial number will be all of the characters after “3624a9370”.
Microsoft Windows
Execute the following command in PowerShell or Command Prompt to query all devices for the Name , SerialNumber and Size:
wmic diskdrive get name,size,SerialNumber
PS C:\Users\DBTest> wmic diskdrive get name,size,SerialNumber
Name SerialNumber Size
\\.\PHYSICALDRIVE2 6000c2994e8572da6bfb90202edbed11 824633671680
\\.\PHYSICALDRIVE1 6000c29047b4551b50408c9b57e99e5a 824633671680
The \\.\PHYSICALDRIVE<Number> corresponds to the Volume number.
Once the serial numbers have been identified
To see all of the volumes and their serial numbers using the FlashArray CLI execute the following:
purevol list
pureuser@flasharray> purevol list
Name Size Source Created Serial
postgres-database01 2T - 2021-09-06 09:36:57 PDT 668F1AB9B15F4BC400014273
postgres-database02 2T - 2021-09-06 09:36:57 PDT 668F1AB9B15F4BC400014274
postgres-database03 2T - 2021-09-06 09:36:57 PDT 668F1AB9B15F4BC400014271
postgres-database04 2T - 2021-09-06 09:36:57 PDT 668F1AB9B15F4BC400014272
postgres-pgdata 1T - 2021-09-06 09:40:38 PDT 668F1AB9B15F4BC400014275
Once the volume(s) have been identified then a storage snapshot can be created for it.