LV uitbreiden

Ohje, de schijf zit vol!

df -hTt ext4|grep videoRW
/dev/mapper/data-videoRW  ext4  1.2T  1.2T  3.2G 100% /home/wbk/movies

Daar past maar een paar minuten film op, laat staan een paar SD-kaartjes met videomateriaal.

Eerst kijken hoe LV videoRW op PV’s gemapt is via de VG data:

# lvs |grep videoRW
  videoRW      data   Vwi-aot---   <1.14t datatlvpool   videoRO         4.79                                   
# vgs data
  VG   #PV #LV #SN Attr   VSize VFree 
  data   7  14   0 wz--n- 7.31t <2.02t
# pvs |grep data
  /dev/sda1  data   lvm2 a--     <2.72t   18.21g
  /dev/sda2  data   lvm2 a--      1.25t    9.80g
  /dev/sda3  data   lvm2 a--   <150.00g  <60.00g
  /dev/sda9  data   lvm2 a--      1.10t <328.67g
  /dev/sdb4  data   lvm2 a--    <48.00g   <7.65g
  /dev/sdc4  data   lvm2 a--    <50.00g   <2.00g
  /dev/sdd1  data   lvm2 a--     <2.00t   <1.60t

Devicenamen kunnen veranderen, eerst stond er een /dev/sde tussen, maar die is nu weg. De WD-schijf die eerst /dev/sde was, is nu /dev/sdd:

# fdisk -l |grep Disk
Disk /dev/sdd: 5.5 TiB, 6001175126016 bytes, 11721045168 sectors
Disk model: WDC WD60EFRX-68M

Er is voldoende ruimte in VG data, dus de LV kan meteen uitgebreid worden:

# lvextend -tvr -L+100G data/videoRW /dev/sdd1
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
    Executing: /sbin/fsadm --dry-run --verbose check /dev/data/videoRW
fsadm: "ext4" filesystem found on "/dev/mapper/data-videoRW".
fsadm: Skipping filesystem check for device "/dev/mapper/data-videoRW" as the filesystem is mounted on /home/wbk/movies
    /sbin/fsadm failed: 3
    Test mode: Skipping archiving of volume group.
    Extending logical volume data/videoRW to 1.23 TiB
  WARNING: Sum of all thin volume sizes (4.28 TiB) exceeds the size of thin pool data/datatlvpool and the amount of free space in volume group (<2.02 TiB).
  Size of logical volume data/videoRW changed from <1.14 TiB (297984 extents) to 1.23 TiB (323584 extents).
    Test mode: Skipping backup of volume group.
  Logical volume data/videoRW successfully resized.
    Executing: /sbin/fsadm --dry-run --verbose resize /dev/data/videoRW 1325400064K
fsadm: "ext4" filesystem found on "/dev/mapper/data-videoRW".
fsadm: Device "/dev/mapper/data-videoRW" size is 1249835483136 bytes
fsadm: Parsing tune2fs -l "/dev/mapper/data-videoRW"
fsadm: Resizing filesystem on device "/dev/mapper/data-videoRW" to 1357209665536 bytes (305135616 -> 331350016 blocks of 4096 bytes)
fsadm: Dry execution resize2fs /dev/mapper/data-videoRW 331350016

Er zijn twee waarschuwingen:

  • Het bestandssysteem is aangekoppeld, dus fsck is niet mogelijk
  • Het totaal van de toegewezen ruimte in de thin LV’s is meer dan de beschikbare fysieke ruimte in de VG.

Er is onlangs een fsck gedaan, die sla ik nu over. De ruimte in VG data is nu nog toereikend, dat breid ik later uit. Daar gaat ‘ie:

# lvextend -vr -L+100G data/videoRW /dev/sdd1
    Executing: /sbin/fsadm --verbose check /dev/data/videoRW
fsadm: "ext4" filesystem found on "/dev/mapper/data-videoRW".
fsadm: Skipping filesystem check for device "/dev/mapper/data-videoRW" as the filesystem is mounted on /home/wbk/movies
    /sbin/fsadm failed: 3
    Archiving volume group "data" metadata (seqno 60).
    Extending logical volume data/videoRW to 1.23 TiB
  WARNING: Sum of all thin volume sizes (4.28 TiB) exceeds the size of thin pool data/datatlvpool and the amount of free space in volume group (<2.02 TiB).
  Size of logical volume data/videoRW changed from <1.14 TiB (297984 extents) to 1.23 TiB (323584 extents).
    Loading table for data-datatlvpool_tdata (254:54).
    Suppressed data-datatlvpool_tdata (254:54) identical table reload.
    Loading table for data-datatlvpool_tmeta (254:53).
    Suppressed data-datatlvpool_tmeta (254:53) identical table reload.
    Loading table for data-datatlvpool-tpool (254:55).
    Suppressed data-datatlvpool-tpool (254:55) identical table reload.
    Loading table for data-videoRO-real (254:46).
    Suppressed data-videoRO-real (254:46) identical table reload.
    Loading table for data-videoRW (254:60).
    Loading table for data-videoRO-real (254:46).
    Suppressed data-videoRO-real (254:46) identical table reload.
    Loading table for data-videoRO (254:47).
    Suppressed data-videoRO (254:47) identical table reload.
    Not monitoring data/datatlvpool with libdevmapper-event-lvm2thin.so
    Unmonitored LVM-OHMt6RDBp5VnJD9hQdjwYm5yfUSKWCDPezYY3rnhKDVAyfaQI76PcSbAdHdkZYu0-tpool for events
    Suspending data-videoRW (254:60)
    Suspending data-datatlvpool-tpool (254:55)
    Suspending data-videoRO-real (254:46)
    Suspending data-datatlvpool_tdata (254:54)
    Suspending data-datatlvpool_tmeta (254:53)
    Loading table for data-datatlvpool_tdata (254:54).
    Suppressed data-datatlvpool_tdata (254:54) identical table reload.
    Loading table for data-datatlvpool_tmeta (254:53).
    Suppressed data-datatlvpool_tmeta (254:53) identical table reload.
    Loading table for data-datatlvpool-tpool (254:55).
    Suppressed data-datatlvpool-tpool (254:55) identical table reload.
    Loading table for data-videoRO-real (254:46).
    Suppressed data-videoRO-real (254:46) identical table reload.
    Resuming data-datatlvpool_tdata (254:54).
    Resuming data-datatlvpool_tmeta (254:53).
    Resuming data-datatlvpool-tpool (254:55).
    Resuming data-videoRO-real (254:46).
    Resuming data-videoRW (254:60).
    Monitored LVM-OHMt6RDBp5VnJD9hQdjwYm5yfUSKWCDPezYY3rnhKDVAyfaQI76PcSbAdHdkZYu0-tpool for events
    Creating volume group backup "/etc/lvm/backup/data" (seqno 61).
  Logical volume data/videoRW successfully resized.
    Executing: /sbin/fsadm --verbose resize /dev/data/videoRW 1325400064K
fsadm: "ext4" filesystem found on "/dev/mapper/data-videoRW".
fsadm: Device "/dev/mapper/data-videoRW" size is 1357209665536 bytes
fsadm: Parsing tune2fs -l "/dev/mapper/data-videoRW"
fsadm: Resizing filesystem on device "/dev/mapper/data-videoRW" to 1357209665536 bytes (305135616 -> 331350016 blocks of 4096 bytes)
fsadm: Executing resize2fs /dev/mapper/data-videoRW 331350016
resize2fs 1.44.5 (15-Dec-2018)
Filesystem at /dev/mapper/data-videoRW is mounted on /home/wbk/movies; on-line resizing required
old_desc_blocks = 73, new_desc_blocks = 79
The filesystem on /dev/mapper/data-videoRW is now 331350016 (4k) blocks long.

root@fractal:~# 

De ruimte zou nu tot de zomer uit moeten komen:

# df -hTt ext4|grep videoRW
/dev/mapper/data-videoRW  ext4  1.3T  1.2T  102G  92% /home/wbk/movies

Print this entry

Geef een antwoord

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *