P
P
pred8or2016-06-16 01:00:55
XenServer
pred8or, 2016-06-16 01:00:55

Connect > 2TB drive to XenServer 7.0?

There was XenServer 6.5SP1 in which a 3TB disk lived perfectly, on which VDI was created for the entire available volume (~ 2.7 TB). I don't remember exactly how I did it, it was a long time ago. Most likely, it was done in the same way as, for example, it is written here: discussions.citrix.com/topic/262258-vdi-size-limit...
In preparation for the summer, the system disk was replaced in the server, and fresh XenServer was installed there to the heap 7.0. And then a fatal mistake was made: with one command xe sr-create instead of xe sr-introduce the contents of the disk were sent to a better world. Fortunately, nothing that would be a pity to lose.
But all my attempts to create such a disk anew lead to nothing. What I do:
0. In this version of XenServer, for some reason, the /etc/lvm/lvm.confparameterglobal / metadata_read_onlyfor some reason it is set to 1. In the previous version, it was 0. Accordingly, nothing can be done with LVM without setting it to 0. Perhaps they had some reasons for this, so before any operation on LVM, I set this to 0, and then return to 1.
1. Delete everything that exists on the disk. The PBD is detached and destroyed, the SR is destroyed and forgotten, after which the SR disappears from XenServer.
2. Create an empty GPT ( gdisk /dev/sdc)
3. Find the disk id ( ll /dev/disk/by-id/ | grep sdc) and create an SR (

xe sr-create content-type=user name-label="3TB Disk 1" shared=false type=lvm device-config:device=/dev/disk/by-id/...
). SR appears in XenCenter, size - 2.7 TB, occupied by 4 MB.
4. According to the instructions on the link, create a volume of the maximum size:
# lvcreate -l 100%FREE -n "VHD-"$(uuidgen) VG_XenStorage-...
  Logical volume "VHD-..." created.

5. Again, in accordance with the same instructions, we scan the SR:
# xe sr-scan uuid=...
Error code: SR_BACKEND_FAILURE_46
Error parameters: , The VDI is not available [opterr=Error scanning VDI ...],

Sailed.
6. We delete the created volume, we create a new one, say, with a volume of 1000GB. We scan. Same error.
7. Delete this volume. We scan - everything is fine. We go to XenCenter. In the Size line we see the following:
4 MB used of 2794.5 GB total (0 B allocated)
8. In XenCenter we create a disk with a capacity of 1000 GB. The Size parameter shows the following:
1002 GB used of 2794.5 GB total (1000 GB allocated)

9. With the help lvswe find the desired volume, change its size:
# lvextend -l +100%FREE VG_XenStorage.../VHD-...
  Size of logical volume VG_XenStorage-.../VHD-... changed from 1001.96 GiB (256502 extents) to 2.73 TiB (715393 extents).
  Logical volume VHD-... successfully resized.

10. With the help lvswe make sure that this is the case. We start xe sr-scan, after which we return to XenCenter. There we see the following:
2794.5 GB used of 2794.5 GB total (1000 GB allocated)

On the Storage tab, the volume of the disk is also 1000GB, if this disk is connected to some virtual machine, then it will also show the same 1000GB.
And xe vdi-list params=allsays that:
virtual-size ( RO): 1073741824000
physical-utilisation ( RO): 3000575721472

Of course, I also tried vdi-resize:
# xe vdi-resize uuid=... disk-size=3000575721472
Error code: SR_BACKEND_FAILURE_79
Error parameters: , VDI Invalid size [opterr=VDI size cannot exceed 2093051 MB],

The same ill-fated 2 TB.
How did I manage to do this 2 years ago? What am I missing now? Or did they decide to close all the loopholes in this version?
PS I propose not to waste time discussing the topic "everyone has enough 640 Kb". I consider cutting a large disk into small volumes, and then gluing them into one large one in a virtual machine, I think it’s a stupid idea.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
krajster, 2016-06-23
@pred8or

Try this:
At this point, replace VHD
lvcreate -l 100%FREE -n "VHD-"$(uuidgen) VG_XenStorage-
with LV
lvcreate -l 100%FREE -n "LV-"$(uuidgen) VG_XenStorage-
with of. site
https://github.com/xapi-project/sm/blob/master/dri...

P
pred8or, 2016-06-23
@pred8or

By the way, not directly on the topic, but nonetheless. When a volume is created and the repository is scanned, the disk appears in XenCenter without a name. If it is immediately created at 100% volume, it cannot be renamed. Therefore, it needs to be created in some volume, scanned, renamed, then expanded to 100% and scanned again. And there will be happiness

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question