Ghost disk numbering

I do not need a solution (just sharing information)

Ghost and gdisk both use one-based indexing for disk numbers.

Diskpart and some other disk tools use zero-based indexing corresponding to the “physicaldisk” numbering Windows uses. For instance, Disk 0 in diskpart is “\.PHYSICALDISK0” (deviceID used by Windows). 

I need a way to tie the disk numbering in gdisk to diskpart programmatically. Can I simply increment the disk number used by Windows to get the Ghost/Gdisk number? Does Ghost used a different method to enumerate the HW?

Diskpart can give me the geographic location of a disk in the system (select disk #, detail disk). My system can change the number and type of disks, but they can be identical models, so the location is one of the only ways to identify a target disk. Does Ghost/gdisk provide any similar options?

Thanks!

0

Related:

Ghost not deploying image but no logs

I need a solution

I have a decent number of machiens that ghost seems to fail at but it is not creating the ghost error logs in PE.

This is the error shown in the console

ErrorMessage: Exception has occured in File Tcube_ClientImageDeploy.cpp at Line No 978. Type of exception is ClientImageDeployException. Error Description is Child Process returned an error. The exit code from process is 3. Value of Windows error code = 183 and message is Cannot create a file when that file already exists.

I have tried gdisk64 to delete partitions in case its somethign with that and that gives me the error regardless of what gdisk64 parameter I try

gdisk64 (W) fixed disk has partitions) that extend past the end of the disk

I have also tried diskpart and get errors there too.  I know we can’t all of a sudden have 100 drive failures, so any help is appreciated as they do pass the internal computer drive tests.

0

Related:

Installing Community Edition on Azure VM

Hi,
I have had good success running the QRadar Community Edition on a standard Azure CentOS VM, so I thought I would post the brief mods required that allow the installation to run here, in case anyone else finds them useful – use them at your own risk.

I am not going to explain how to create an Azure VM, hopefully you will already be up to speed on that, the VM specifics I used are –

PublisherName: OpenLogic
Offer: CentOS
Skus: 7.3
Version: Latest
Size: Standard_F2s (this is 2 cpus, 4GB RAM, premium storage)
VMOSDiskSize: 80GB

Once created the VM needs a few changes to make the QRadar install run smoothly, as follows.

Extend the /dev/sda2 partition to use the full available space

sudo fdisk /dev/sda

The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): d
Partition number (1,2, default 2): 2
Partition 2 is deleted

Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Partition number (2-4, default 2): 2
First sector (1026048-167772159, default 1026048):
Using default value 1026048
Last sector, +sectors or +size{K,M,G} (1026048-167772159, default 167772159):
Using default value 167772159
Partition 2 of type Linux and of size 79.5 GiB is set

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

Reboot to pick up the new partition table.

sudo reboot

Grow the root filesystem:

sudo xfs_growfs /

Create 8GB of swap space:

sudo dd if=/dev/zero of=/swapfile bs=1024 count=8388608

sudo chmod 0600 /swapfile

sudo mkswap /swapfile

sudo swapon /swapfile

Add the following line to /etc/fstab to mount the swap on reboot:

/swapfile swap swap defaults 0 0

Update everything and install screen:

sudo yum -y update

sudo yum install screen

Disable SELINUX, and reboot to clear it:

sudo sed -i -e ‘s/^SELINUX=.*$/SELINUX=disabled/g’ /etc/selinux/config
sudo reboot

Copy the Community Edition to a temporary directory, mount it and run the setup as per the IBM instructions (You get the standard appliance install screens, it tells you that you have insufficient memory, but continues to install an appliance type “300”.)

Eventually you get a working Qradar CE system! Don’t forget this doesn’t have all the DSMs so you may need to get rpms from fix central for additional log source support.

Regards.

Related:

Re: disk alignment warning – Unity300 and Redhat Linux

I am getting an error “alignment is offset by 512 bytes. This may result in very poor performance, (re)-partitioning suggested” when I format any LUN from UNITY300 storage on Redhat Linux. But LUN is already aligned with fdisk command.

Environment details as follows –

1. A direct attached FC Unity300 and HP DL580G9 server + Redhat (RHEL) 7.2

2. FAST cache & FASTVP is enabled

Any storage LUN irrespective of the size giving this error when try to format using mkfs.ext3.

The LUN is already aligned b fdisk/parted and verified by parted tool.

Please see below my steps and command output –

#multipath -ll

mpathd (36006016006214200f43f0f584ce28280) dm-3 DGC ,VRAID

size=300G features=’2 queue_if_no_path retain_attached_hw_handler’ hwhandler=’1 alua’ wp=rw

|-+- policy=’service-time 0′ prio=50 status=active

| `- 1:0:0:0 sdc 8:32 active ready running

`-+- policy=’service-time 0′ prio=10 status=enabled

`- 3:0:0:0 sdd 8:48 active ready running

# fdisk /dev/mapper/mpathd

Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

Device does not contain a recognized partition table

Building a new DOS disklabel with disk identifier 0xa0d6a56b.

Command (m for help): n

Partition type:

p primary (0 primary, 0 extended, 4 free)

e extended

Select (default p): p

Partition number (1-4, default 1):

First sector (65535-629145599, default 65535):

Using default value 65535

Last sector, +sectors or +size{K,M,G} (65535-629145599, default 629145599):

Using default value 629145599

Partition 1 of type Linux and of size 300 GiB is set

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.

The kernel still uses the old table. The new table will be used at

the next reboot or after you run partprobe(8) or kpartx(8)

Syncing disks.

# partprobe /dev/mapper/mpathd

# mkfs.ext3 /dev/mapper/mpathd1

mke2fs 1.42.9 (28-Dec-2013)

/dev/mapper/mpathd1 alignment is offset by 512 bytes.

This may result in very poor performance, (re)-partitioning suggested.

Discarding device blocks: done

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=2 blocks, Stripe width=8191 blocks

19660800 inodes, 78635008 blocks

3931750 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=4294967296

2400 block groups

32768 blocks per group, 32768 fragments per group

8192 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,

4096000, 7962624, 11239424, 20480000, 23887872, 71663616

Allocating group tables: done

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

Related: