Por que o / dev / sda3 não foi criado?

0

Eu fiz um pvresize (decréscimo) em /dev/sda2 para que eu possa ter cerca de 48 GBytes livres ... e eu queria criar uma partição nesse espaço livre, mas o dispositivo /dev/sda3 não criado .. por que? Eu preciso de um reboot para isso? (não foi reiniciado após a redução do PV ...)

[root@SERVER ~]# parted -s /dev/sda print free
Model: ATA Hitachi HTS72503 (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
    32,3kB  1049kB  1016kB           Free Space
 1      1049kB  538MB   537MB   primary  ext4         boot
 2      538MB   272GB   271GB   primary               lvm
    272GB   320GB   48,3GB           Free Space

[root@SERVER ~]#
[root@SERVER ~]#  
[root@SERVER ~]# parted /dev/sda print
Model: ATA Hitachi HTS72503 (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  538MB  537MB  primary  ext4         boot
 2      538MB   272GB  271GB  primary               lvm

[root@SERVER ~]# 
[root@SERVER ~]# 
[root@SERVER ~]# parted /dev/sda mkpart primary 272GB 320GB
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Az eszköz vagy erőforrás foglalt).  As a result, it may not reflect all of
your changes until after reboot.
[root@SERVER ~]# 
[root@SERVER ~]# 
[root@SERVER ~]# 
[root@SERVER ~]# parted /dev/sda print
Model: ATA Hitachi HTS72503 (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start   End    Size    Type     File system  Flags
 1      1049kB  538MB  537MB   primary  ext4         boot
 2      538MB   272GB  271GB   primary               lvm
 3      272GB   320GB  48,3GB  primary

[root@SERVER ~]# 
[root@SERVER ~]# parted -s /dev/sda print free
Model: ATA Hitachi HTS72503 (scsi)
Disk /dev/sda: 320GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
    32,3kB  1049kB  1016kB           Free Space
 1      1049kB  538MB   537MB   primary  ext4         boot
 2      538MB   272GB   271GB   primary               lvm
 3      272GB   320GB   48,3GB  primary
    320GB   320GB   352kB            Free Space

[root@SERVER ~]# 
[root@SERVER ~]# 
[root@SERVER ~]# 
[root@SERVER ~]# env LC_MESSAGES=EN ls -la /dev/sda*
brw-rw----. 1 root disk 8, 0 Jun 29 18:53 /dev/sda
brw-rw----. 1 root disk 8, 1 Jun 28 12:56 /dev/sda1
brw-rw----. 1 root disk 8, 2 Jun 28 12:56 /dev/sda2
[root@SERVER ~]# 
[root@SERVER ~]# 
[root@SERVER ~]# 
[root@SERVER ~]# partprobe
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Az eszköz vagy erőforrás foglalt).  As a result, it may not reflect all of your changes until after reboot.
[root@SERVER ~]#
[root@SERVER ~]#
[root@SERVER ~]# env LC_MESSAGES=EN ls -la /dev/sda*
brw-rw----. 1 root disk 8, 0 Jun 29 18:55 /dev/sda
brw-rw----. 1 root disk 8, 1 Jun 28 12:56 /dev/sda1
brw-rw----. 1 root disk 8, 2 Jun 28 12:56 /dev/sda2
[root@SERVER ~]# 
[root@SERVER ~]# env LC_MESSAGES=EN fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0007e24d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          66      524288   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              66       33039   264859648   8e  Linux LVM
/dev/sda3           33039       38914    47185920   83  Linux
[root@SERVER ~]# head -1 /etc/issue
Scientific Linux release 6.4 (Carbon)
[root@SERVER ~]# 

ATUALIZAÇÃO:

[root@SERVER ~]# kpartx -av /dev/sda
device-mapper: reload ioctl on sda1 failed: Invalid argument
create/reload failed on sda1
add map sda1 (0:0): 0 1048576 linear /dev/sda 2048
device-mapper: reload ioctl on sda2 failed: Invalid argument
create/reload failed on sda2
add map sda2 (0:0): 0 529719296 linear /dev/sda 1050624
device-mapper: reload ioctl on sda3 failed: Invalid argument
create/reload failed on sda3
add map sda3 (0:0): 0 94371840 linear /dev/sda 530769920
[root@SERVER ~]# 
[root@SERVER ~]# env LC_MESSAGES=EN ls -la /dev/sda*
brw-rw----. 1 root disk 8, 0 Jun 29 22:05 /dev/sda
brw-rw----. 1 root disk 8, 1 Jun 28 12:56 /dev/sda1
brw-rw----. 1 root disk 8, 2 Jun 28 12:56 /dev/sda2
[root@SERVER ~]# 
[root@SERVER ~]# 
[root@SERVER ~]# 
[root@SERVER ~]# sh rescan-scsi-bus.sh 
WARN: /usr/bin/sg_inq not present -- please install sg3_utils
 or rescan-scsi-bus.sh might not fully work.
Host adapter 0 (ata_piix) found.
Host adapter 1 (ata_piix) found.
Host adapter 2 (ahci) found.
Host adapter 3 (ahci) found.
Host adapter 4 (ahci) found.
Scanning SCSI subsystem for new devices
Scanning host 0 for  SCSI target IDs  0 1 2 3 4 5 6 7, all LUNs
 Scanning for device 0 0 0 0 ...           
OLD: Host: scsi0 Channel: 00 Id: 00 Lun: 00
      Vendor: MATSHITA Model: DVD/CDRW UJDA775 Rev: CB03
      Type:   CD-ROM                           ANSI SCSI revision: 05
Scanning host 1 for  SCSI target IDs  0 1 2 3 4 5 6 7, all LUNs
Scanning host 2 for  SCSI target IDs  0 1 2 3 4 5 6 7, all LUNs
 Scanning for device 2 0 0 0 ...           
OLD: Host: scsi2 Channel: 00 Id: 00 Lun: 00
      Vendor: ATA      Model: Hitachi HTS72503 Rev: GHBO
      Type:   Direct-Access                    ANSI SCSI revision: 05
Scanning host 3 for  SCSI target IDs  0 1 2 3 4 5 6 7, all LUNs
Scanning host 4 for  SCSI target IDs  0 1 2 3 4 5 6 7, all LUNs
0 new device(s) found.                     
0 device(s) removed.                 
[root@SERVER ~]# 
[root@SERVER ~]# 
[root@SERVER ~]# env LC_MESSAGES=EN ls -la /dev/sda*
brw-rw----. 1 root disk 8, 0 Jun 29 22:05 /dev/sda
brw-rw----. 1 root disk 8, 1 Jun 28 12:56 /dev/sda1
brw-rw----. 1 root disk 8, 2 Jun 28 12:56 /dev/sda2
[root@SERVER ~]# 
    
por gasko peter 29.06.2013 / 19:09

2 respostas

0

Você está executando uma versão antiga de parted , que ainda usa o ioctl BLKRRPART para fazer com que o kernel recarregue a tabela de partição, em vez do novo ioctl BLKPG. O BLKRRPART só funciona em um disco que não possui partições em uso, portanto, o erro de informar o kernel sobre as mudanças e sugerir a reinicialização.

Atualize para uma versão recente do parted e você não receberá esse erro ou apenas reinicialize para que as alterações tenham efeito, conforme a mensagem dizia. Dependendo de quantos anos o pacote util-linux está em seu sistema, você pode usar partx -a ou para versões mais recentes, partx -u para adicionar a nova partição sem reinicializar.

    
por 30.06.2013 / 05:29
2

Você não precisa reiniciar, apenas execute kpartx ( kpartx /dev/sda ) para verificar novamente a tabela de partições de sda.

    
por 29.06.2013 / 20:39