Score:0

Very big device in Centos

jp flag

I have older VM (Centos7) where I have many disks. Now it is 36 vmdk (22TB). I wanted extend one virtual disk to 2400GB and create new partition for LVM (3th on disk). But after I create partion I see that operation was slowly than is normal. So I check syslog, and this is there:

    Mar 22 15:47:27 host kernel: sd 4:0:4:0: [sdai] Very big device. Trying to use READ CAPACITY(16).
    Mar 22 15:47:27 host kernel: sd 4:0:4:0: [sdai] 5033164800 512-byte logical blocks: (2.57 TB/2.34 TiB)
    Mar 22 15:47:27 host kernel: sdai: detected capacity change from 2040109465600 to 2576980377600

So I do not know if I can use this partion as is. Is it safe? Bellow is fdisk output,where is sdai3 - it is this new one. Intersting is "+" in Blocks. Why? Is it problem?

For now I do not use this part. for LVM group.

Fdisk output

WARNING: The size of this disk is 2.6 TB (2576980377600 bytes).
DOS partition table format can not be used on drives for volumes
larger than (2199023255040 bytes) for 512-byte sectors. Use parted(1) and GUID
partition table format (GPT).

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): p

Disk /dev/sdai: 2577.0 GB, 2576980377600 bytes, 5033164800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x2b21362e

    Device Boot      Start         End      Blocks   Id  System
/dev/sdai1            2048  1887436799   943717376   8e  Linux LVM
/dev/sdai2      1887436800  3984588799  1048576000   8e  Linux LVM
/dev/sdai3      3984588800  4294967294   155189247+  8e  Linux LVM
Score:1
za flag

Yes. It is safe. The Linux said it understood the situation and switched to code path that is supporting such big devices.

However, you have a DOS partition table. It supports devices up to 2 TB. You won't be able to extend the partition or create a new partition in the free space at the end of the device. You need to switch to GPT partition table, which supports larger devices. This is what the warning was about.

You can convert the current partition table to GPT (for example, gdisk has this functionality), but beware if you boot from this disk you won't be able to install a bootloader the old way. To boot Linux from the disk which uses a GPT partition table in BIOS boot mode, you need to create a small (1 MiB) partition of type 4 (BIOS Boot). Or, if you are going to switch to EFI boot, you'll need to create a ESP (which could be also the partiton holding /boot, but in any case that should be FAT32 partition).

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.