IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Administration système Discussion :

Augmentation Partition Disque (LUN)


Sujet :

Administration système

  1. #1
    Membre actif
    Homme Profil pro
    Ingénieur systèmes et réseaux
    Inscrit en
    Mars 2005
    Messages
    363
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur systèmes et réseaux
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Mars 2005
    Messages : 363
    Points : 210
    Points
    210
    Par défaut Augmentation Partition Disque (LUN)
    Bonjour,

    je dispose actuellement d'un partition de 5Go qui se trouve physiquement sur une LUN (SAN). J'ai modifié ma LUN en l'agrandissant de 5Go. Je désire donc que ma partition soit aujourd'hui reconnue en tant que partition de 10Go et non plus 5Go. Comment puis-je faire svp ? (pour le PV je sais qu'un pvresize fera l'affaire mais pour la partition, puis-je m'en sortir avec fdisk ?).

    Merci d'avance

  2. #2
    Membre expert
    Avatar de vpourchet
    Homme Profil pro
    Integrateur Systemes & Virtualisation
    Inscrit en
    Avril 2008
    Messages
    1 159
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 36
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Integrateur Systemes & Virtualisation
    Secteur : Conseil

    Informations forums :
    Inscription : Avril 2008
    Messages : 1 159
    Points : 3 645
    Points
    3 645
    Par défaut
    quel OS ?

    sinon utilise la commande diskpart avec l'option extend
    Mon Site Web consacré à la Virtualisation

    VMware vExpert 2013/2012, VMware Certified Professionnal (VCP510), VMware Technical Sales Professional, VMware Sales Professionnal
    Veeam Technical Sales Professional, Veeam Sales Professional
    Citrix Certified Sales Professional
    DataCore Sales Certified Professional

  3. #3
    Membre actif
    Homme Profil pro
    Ingénieur systèmes et réseaux
    Inscrit en
    Mars 2005
    Messages
    363
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur systèmes et réseaux
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Mars 2005
    Messages : 363
    Points : 210
    Points
    210
    Par défaut
    C'est de la RHEL 4. Pour le moment nous n'avons pas trouvé la solution. On ne comprends pas comment faire comprendre à la redhat que la partition doit s'agrandir, sommes-nous condamnés à recréer la partition (mais dans ce cas là on perd nos données, non ?) ou à créer une seconde partition primaire que l'on va attacher à un PV que l'on rattachera à notre VG d'origine ?

  4. #4
    Membre actif
    Homme Profil pro
    Ingénieur systèmes et réseaux
    Inscrit en
    Mars 2005
    Messages
    363
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur systèmes et réseaux
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Mars 2005
    Messages : 363
    Points : 210
    Points
    210
    Par défaut
    Nous n'avons toujours pas trouvé (mais pas cherché beaucoup non plus ), si quelqu'un a déjà fait l'expérience de cette manipulation, je suis preneur.

  5. #5
    Membre éclairé
    Profil pro
    Inscrit en
    Août 2008
    Messages
    505
    Détails du profil
    Informations personnelles :
    Localisation : France, Puy de Dôme (Auvergne)

    Informations forums :
    Inscription : Août 2008
    Messages : 505
    Points : 712
    Points
    712
    Par défaut
    gparted ?

  6. #6
    Membre actif
    Homme Profil pro
    Ingénieur systèmes et réseaux
    Inscrit en
    Mars 2005
    Messages
    363
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur systèmes et réseaux
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Mars 2005
    Messages : 363
    Points : 210
    Points
    210
    Par défaut
    gparted m'oblige à booter sur un CD à chaque fois que je veux agrandir une partition. Ce n'est pas jouable étant donné que je ne suis pas forcément à côté du serveur et que ça arrive régulièrement. Nous avons également des machines AIX et ça ne nous pose aucun problème en ligne de commande. Je vais poursuivre mes recherches (ce serait étonnant que cette fonctionnalité n'existe pas sous redhat)

  7. #7
    Expert confirmé
    Avatar de becket
    Profil pro
    Informaticien multitâches
    Inscrit en
    Février 2005
    Messages
    2 854
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations professionnelles :
    Activité : Informaticien multitâches
    Secteur : Service public

    Informations forums :
    Inscription : Février 2005
    Messages : 2 854
    Points : 5 915
    Points
    5 915
    Par défaut
    lvm : les outils classiques : pv* , lv* , vg*
    raid : les outils classiques : mdadm
    Resize du FS => resize2fs ( pas de soucis pour un agrandissement )

  8. #8
    Membre actif
    Homme Profil pro
    Ingénieur systèmes et réseaux
    Inscrit en
    Mars 2005
    Messages
    363
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur systèmes et réseaux
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Mars 2005
    Messages : 363
    Points : 210
    Points
    210
    Par défaut
    Merci de me répondre mais il y a un truc que je ne pige pas. Je suis bien obligé de faire un fdsik /dev/mondisk pour créer une partition et ainsi faire un pvcreate sur cette partition (pvcreate /dev/mondisk1). Donc après quand je vais réaliser un pvresize sur cette même partition, il ne prend pas en compte la nouvelle taille car pour lui la partition physique n'a pas été étendue (ou pas reconnue avec la nouvelle taille), c'est ce dernier élément qui me manque en fait.

  9. #9
    Expert confirmé
    Avatar de becket
    Profil pro
    Informaticien multitâches
    Inscrit en
    Février 2005
    Messages
    2 854
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations professionnelles :
    Activité : Informaticien multitâches
    Secteur : Service public

    Informations forums :
    Inscription : Février 2005
    Messages : 2 854
    Points : 5 915
    Points
    5 915
    Par défaut
    Une fois que tu as redimensionné ton volume, tu dois lui signifier avec resize2fs

  10. #10
    Membre actif
    Homme Profil pro
    Ingénieur systèmes et réseaux
    Inscrit en
    Mars 2005
    Messages
    363
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur systèmes et réseaux
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Mars 2005
    Messages : 363
    Points : 210
    Points
    210
    Par défaut
    Mais comment redimensionné mon volume stp ?

    Tant que mon pv n'aura pas la taille voulue je ne pourrai pas faire le lvextend et le resize2fs !

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    [root@XXX bin]# pvresize /dev/emcpowerl1
      Physical volume "/dev/emcpowerl1" changed
      1 physical volume(s) resized / 0 physical volume(s) not resized
    [root@XXX bin]# pvscan
      ...
      PV /dev/emcpowerl1   VG vgisap          lvm2 [4,99 GB / 0    free]
      ...
    [root@XXX bin]# lvextend -L +2G /dev/vgisap/lvISAP
      Extending logical volume lvISAP to 6,87 GB
      Insufficient free space: 512 extents needed, but only 0 available
    Comme vous pouvez le constater, il n' y a pas de place sur le PV. suis-je obligé de créer avec fdisk une seconde partition primaire (/dev/emcpowerl2) correspondant à mon rajout ou est-ce-qu'il y a moyen d'agrandir cette première partition primaire (réalisable sous AIX avec la commande cfgmgr).

  11. #11
    Expert confirmé
    Avatar de becket
    Profil pro
    Informaticien multitâches
    Inscrit en
    Février 2005
    Messages
    2 854
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations professionnelles :
    Activité : Informaticien multitâches
    Secteur : Service public

    Informations forums :
    Inscription : Février 2005
    Messages : 2 854
    Points : 5 915
    Points
    5 915
    Par défaut
    tu peux donner le résultat de

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    pvdisplay
    lvdisplay
    vgdisplay

  12. #12
    Membre actif
    Homme Profil pro
    Ingénieur systèmes et réseaux
    Inscrit en
    Mars 2005
    Messages
    363
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur systèmes et réseaux
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Mars 2005
    Messages : 363
    Points : 210
    Points
    210
    Par défaut
    ça ne t'apportera rien de connaitre ça. Un point important il y a du powerpath dans le lot.

    Je cherche un équivalent à ce qui est indiqué ici : http://jbbarth.com/archives/2009/6/6...ue_lvm_en/#c72

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    # on rescanne le périphérique au niveau SCSI
    echo "1" > /sys/class/scsi_device/3\:0\:0\:0/device/rescan
    echo "1" > /sys/class/scsi_device/4\:0\:0\:0/device/rescan
    C'est cette étape qui n'est pas validée et qui bloque donc mon pvresize.

  13. #13
    Expert confirmé
    Avatar de becket
    Profil pro
    Informaticien multitâches
    Inscrit en
    Février 2005
    Messages
    2 854
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations professionnelles :
    Activité : Informaticien multitâches
    Secteur : Service public

    Informations forums :
    Inscription : Février 2005
    Messages : 2 854
    Points : 5 915
    Points
    5 915
    Par défaut
    Citation Envoyé par tck-lt Voir le message
    ça ne t'apportera rien de connaitre ça..

  14. #14
    Membre actif
    Homme Profil pro
    Ingénieur systèmes et réseaux
    Inscrit en
    Mars 2005
    Messages
    363
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur systèmes et réseaux
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Mars 2005
    Messages : 363
    Points : 210
    Points
    210
    Par défaut
    ben je le pense sincèrement puisque ça va lister les PV, VG et LV avec leurs ID, tailles totales, nb extents (libre/occupés) etc mais je te le mets quand même (le fond du problème vient que c'est à partir d'un SAN via des cartes QLogic Fiber Channel avec l'utilitaire Powerpath) :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
     
      --- Physical volume ---
      PV Name               /dev/emcpowerl1
      VG Name               vgisap
      PV Size               5,00 GB / not usable 3,63 MB
      Allocatable           yes (but full)
      PE Size (KByte)       4096
      Total PE              1278
      Free PE               0
      Allocated PE          1278
      PV UUID               jgoB2a-9QDc-QT5A-53gL-cHw2-I4Vd-6p0n01
     
    --- Volume group ---
      VG Name               vgisap
      System ID
      Format                lvm2
      Metadata Areas        1
      Metadata Sequence No  11
      VG Access             read/write
      VG Status             resizable
      MAX LV                0
      Cur LV                2
      Open LV               0
      Max PV                0
      Cur PV                1
      Act PV                1
      VG Size               4,99 GB
      PE Size               4,00 MB
      Total PE              1278
      Alloc PE / Size       1278 / 4,99 GB
      Free  PE / Size       0 / 0
      VG UUID               TJYh0X-5ZgB-fLWN-McZN-eybZ-rLXh-h0OWdq
     
      --- Logical volume ---
      LV Name                /dev/vgisap/lvusersisap
      VG Name                vgisap
      LV UUID                KL5LhV-j2DI-CYEn-D0ic-3O0K-R489-aWmTTx
      LV Write Access        read/write
      LV Status              available
      # open                 0
      LV Size                128,00 MB
      Current LE             32
      Segments               1
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Block device           253:22
     
      --- Logical volume ---
      LV Name                /dev/vgisap/lvISAP
      VG Name                vgisap
      LV UUID                zPpZxc-mqOW-GU6i-kWm9-mews-tEsW-IrPENw
      LV Write Access        read/write
      LV Status              available
      # open                 0
      LV Size                4,87 GB
      Current LE             1246
      Segments               1
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Block device           253:23

  15. #15
    Membre actif
    Homme Profil pro
    Ingénieur systèmes et réseaux
    Inscrit en
    Mars 2005
    Messages
    363
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur systèmes et réseaux
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Mars 2005
    Messages : 363
    Points : 210
    Points
    210
    Par défaut
    La commande blockdev m'a permis de mettre une info intéressante à jour :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    [root@XXX bin]# blockdev --getsize /dev/emcpowerl1
    10477194
    [root@XXX bin]# blockdev --getsize /dev/emcpowerl
    12582912
    On remarque que la nouvelle taille disque a bien été prise en compte au niveau partition physique. En revanche, je suis obligé du coup de créer avec fdisk une seconde partition primaire, /dev/emcpowerl2, ou puis-je étendre ma première partition /dev/emcpowerl1 ?

  16. #16
    Membre actif
    Homme Profil pro
    Ingénieur systèmes et réseaux
    Inscrit en
    Mars 2005
    Messages
    363
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur systèmes et réseaux
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Mars 2005
    Messages : 363
    Points : 210
    Points
    210
    Par défaut
    Je me suis débrouillé tout seul comme un grand (nan j'déconne, j'ai réussi à trouver de l'aide sur un autre forum).

    Solution :
    Si vous utilisez Powerpath, il faut absolument effectuer la commande :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    echo "1" > /sys/class/scsi_device/3\:0\:0\:0/device/rescan
    echo "1" > /sys/class/scsi_device/4\:0\:0\:0/device/rescan
    en adaptant au device qui va bien.

    Ensuite, il vous suffit de suivre à la lettre ce qui est indiqué à l'adresse

    Je remets dans le code, ce qu'il contient au cas où la page serait supprimée :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    # First unmount everything that uses the given volume group
    # List all the logical volumes that are in vol01
    $ lvdisplay /dev/vol01
      --- Logical volume ---
      LV Name                /dev/vol01/lv01
      VG Name                vol01
      LV UUID                q3eQP3-4V9E-7yvo-LUZR-zbXz-F2Mh-Pn5fDt
      LV Write Access        read/write
      LV Status              available
      # open                 1
      LV Size                139.70 GB
      Current LE             35762
      Segments               2
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Block device           254:0
     
      --- Logical volume ---
      LV Name                /dev/vol01/lv02
      VG Name                vol01
      LV UUID                b53h7W-VO2U-3Ok5-WvW3-GbDp-Tbvb-6bbdkw
      LV Write Access        read/write
      LV Status              available
      # open                 1
      LV Size                29.31 GB
      Current LE             7504
      Segments               1
      Allocation             inherit
      Read ahead sectors     auto
      - currently set to     256
      Block device           254:1
     
    # Now unmount all these volumes (if they are mounted)
    $ umount /dev/vol01/lv01
    $ umount /dev/vol01/lv02
    # In case you get a "device is busy" error, check out what processes use them (lsof /dev/vol01/lv01) and stop/kill them.
    # Now deactive the volume group.
    $ vgchange -a n vol01
    # Increase the size of the sda2 partition to the desired value.
    # You do this by deleting the partition and recreating it with a higher end cylinder.
    # I assume that pvresize can handle partition expansions only if the partition start remains the same and the partition end cylinder is moved to a higher value.
    $ fdisk /dev/sda
     
    The number of cylinders for this disk is set to 60801.
    There is nothing wrong with that, but this is larger than 1024,
    and could in certain setups cause problems with:
    1) software that runs at boot time (e.g., old versions of LILO)
    2) booting and partitioning software from other OSs
       (e.g., DOS FDISK, OS/2 FDISK)
     
    Command (m for help): p
     
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x000e4bad
     
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1         486     3903763+  83  Linux
    /dev/sda2             487       18722   146480670   8e  Linux LVM
     
    Command (m for help): d
    Partition number (1-4): 2
     
    Command (m for help): n
    Command action
       e   extended
       p   primary partition (1-4)
    p
    Partition number (1-4): 2
    First cylinder (487-60801, default 487):
    Using default value 487
    Last cylinder or +size or +sizeM or +sizeK (487-60801, default 60801):
    Using default value 60801
     
    Command (m for help): t
    Partition number (1-4): 2
    Hex code (type L to list codes): 8e
    Changed system type of partition 2 to 8e (Linux LVM)
     
    Command (m for help): p
     
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x000e4bad
     
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1         486     3903763+  83  Linux
    /dev/sda2             487       60801   484480237+  8e  Linux LVM
     
    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.
    Syncing disks.
     
    # Now comes the interesting part: we force the system with partprobe to re-read the partition table.
    $ pvdisplay /dev/sda2
      --- Physical volume ---
      PV Name               /dev/sda2
      VG Name               vol01
      PV Size               139.69 GB / not usable 3.53 MB
      Allocatable           yes (but full)
      PE Size (KByte)       4096
      Total PE              35761
      Free PE               0
      Allocated PE          35761
      PV UUID               S0cDcl-7mr8-2AAb-172u-HClq-J2aQ-DfC2V5
    $ partprobe
    $ pvresize /dev/sda2
    $ pvdisplay /dev/sda2
      --- Physical volume ---
      PV Name               /dev/sda2
      VG Name               vol01
      PV Size               462.04 GB / not usable 1.04 MB
      Allocatable           yes
      PE Size (KByte)       4096
      Total PE              118281
      Free PE               82520
      Allocated PE          35761
      PV UUID               S0cDcl-7mr8-2AAb-172u-HClq-J2aQ-DfC2V5
    # Voala! :-) The physical volume got increased.
    # Time to reactivate the volume group.
    $ vgchange -a y vol01
    # Now check the volume group details.
    $ vgdisplay vol01
      --- Volume group ---
      VG Name               vol01
      System ID             
      Format                lvm2
      Metadata Areas        2
      Metadata Sequence No  18
      VG Access             read/write
      VG Status             resizable
      MAX LV                0
      Cur LV                3
      Open LV               3
      Max PV                0
      Cur PV                2
      Act PV                2
      VG Size               927.79 GB
      PE Size               4.00 MB
      Total PE              237515
      Alloc PE / Size       68866 / 269.01 GB
      Free  PE / Size       168649 / 658.79 GB
      VG UUID               0eY2tg-AOny-XsDL-wfLR-d290-2jxO-TDTNnQ
    # You can now use lvextend to increase logical volumes in the volume group.
    $ lvextend -L +10G --name lv01 /dev/vol01
    # And resize2fs to extend the Ext2/3 filesystem on the logical volume.
    $ resize2fs /dev/vol01/lv01
    # And finally mount the filesystems.
    $ mount /dev/vol01/lv01
    $ mount /dev/vol01/lv02
    # You're now ready.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Augmenter espace disque
    Par Zingzing56 dans le forum 1&1
    Réponses: 0
    Dernier message: 13/03/2009, 20h15
  2. [VIRTUAL PC 2007] Augmenter taille disque
    Par sami_b dans le forum Windows XP
    Réponses: 2
    Dernier message: 11/07/2008, 09h28
  3. Partition disque dur
    Par kikou81 dans le forum Administration système
    Réponses: 15
    Dernier message: 05/06/2006, 18h33
  4. créer une partition disque à partir d'un dossier
    Par Ksual dans le forum Windows XP
    Réponses: 10
    Dernier message: 25/01/2006, 18h48
  5. Partition disque
    Par Aristote dans le forum Composants
    Réponses: 5
    Dernier message: 09/12/2005, 21h21

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo