linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RAID 1 | Extending Logical Volume
@ 2025-01-12 19:02 Stefanie Leisestreichler
  2025-01-12 19:38 ` Johannes Truschnigg
  0 siblings, 1 reply; 3+ messages in thread
From: Stefanie Leisestreichler @ 2025-01-12 19:02 UTC (permalink / raw)
  To: linux-raid

Hi.
I have the system layout shown below.
Can I safely use

lvextend -L +50GB /dev/mapper/vg_raid1-root
and after that
resize2fs /dev/mapper/vg_raid1-root

Thanks,
Steffi

├scsi 0:0:0:0 ATA      WDC WD10EFRX-68F {WD-WCC4J3ADUUY8}
│└sda 931.51g [8:0] Partitioned (dos)
│ └sda1 931.51g [8:1] MD raid1 (0/2) (w/ sdb1) in_sync 'speernix15:0' 
{68c0c9ad-82ed-e879-2110-f4279f31c140}
│  └md0 931.39g [9:0] MD v1.2 raid1 (2) clean 
{68c0c9ad:82ede879:2110f427:9f31c140}
│   │                 PV LVM2_member 326,70g used, <604,68g free 
{hHvrtB-7XOz-L6j6-AnXd-Q3Wh-uHqw-bQ3RQS}
│   └VG vg_raid1 931,38g <604,68g free 
{mopUew-B2i4-9fmo-mlXP-Z8C3-nPYO-XM56AY}
│    ├dm-3 224.26g [253:3] LV home ext4 
{8ee8d203-f306-4846-93fe-225b018f2965}
│    │└Mounted as /dev/mapper/vg_raid1-home @ /home
│    ├dm-1 93.13g [253:1] LV root ext4 
{9f9568cf-d48a-4690-97a8-14576d724daf}
│    │└Mounted as /dev/mapper/vg_raid1-root @ /
│    └dm-2 9.31g [253:2] LV swap swap {9fbbac0f-0d49-47b0-a50b-d293f19f23ef}
├scsi 1:0:0:0 ATA      ST1000NM000A-2J3 {WJB01MEZ}
│└sdb 931.51g [8:16] Partitioned (dos)
│ └sdb1 931.51g [8:17] MD raid1 (1/2) (w/ sda1) in_sync 'speernix15:0' 
{68c0c9ad-82ed-e879-2110-f4279f31c140}
│  └md0 931.39g [9:0] MD v1.2 raid1 (2) clean 
{68c0c9ad:82ede879:2110f427:9f31c140}
│                     PV LVM2_member 326,70g used, <604,68g free 
{hHvrtB-7XOz-L6j6-AnXd-Q3Wh-uHqw-bQ3RQS}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RAID 1 | Extending Logical Volume
  2025-01-12 19:02 RAID 1 | Extending Logical Volume Stefanie Leisestreichler
@ 2025-01-12 19:38 ` Johannes Truschnigg
  0 siblings, 0 replies; 3+ messages in thread
From: Johannes Truschnigg @ 2025-01-12 19:38 UTC (permalink / raw)
  To: Stefanie Leisestreichler; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 1113 bytes --]

Hi Steffi,

On Sun, Jan 12, 2025 at 08:02:19PM +0100, Stefanie Leisestreichler wrote:
> Hi.
> I have the system layout shown below.
> Can I safely use
> 
> lvextend -L +50GB /dev/mapper/vg_raid1-root
> and after that
> resize2fs /dev/mapper/vg_raid1-root

The snipped output below seems to suggest that there's two SATA disks that are
partitioned with one partition each. These partitions across devices form a
2-leg RAID1 array via md/mdadm.

That RAID1 array itself is in use as a Physival Volume for LVM2, and it hosts
a Volume Group with a Logical Volume at /dev/mapper/vg_raid1-root that you
want to resize.

> [...]

With these assumptions verified, the operation you are about to execute seems
perfectly safe to me. You can even make `lvresize` perform the fs resizing for
you, and shorten the whole ordeal to just

  # lvresize --size +50GB --resizefs /dev/mapper/vg_raid1-root

Godspeed, and remember to always keep working backups handy regardless! ;)

-- 
with best regards:
- Johannes Truschnigg ( johannes@truschnigg.info )

www:   https://johannes.truschnigg.info/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RAID 1 | Extending Logical Volume
@ 2025-09-03 11:53 Stefanie Leisestreichler (Febas)
  0 siblings, 0 replies; 3+ messages in thread
From: Stefanie Leisestreichler (Febas) @ 2025-09-03 11:53 UTC (permalink / raw)
  To: linux-raid

Hi.
I have the system layout shown below.

To avoid data loss, I want to change HDs which have about 46508 hours of 
up time.

I thought, instead of degrading, formatting, rebuilding and so on, I could
- shutdown the computer
- take i.e. /dev/sda and do
- dd bs=98304 conv=sync,noerror if=/dev/sda of=/dev/sdX (X standig for 
device name of new disk)

Is it save to do it this way, presuming the array is in AA-State?

Thanks,
Steffi

/dev/sda1:
           Magic : a92b4efc
         Version : 1.2
     Feature Map : 0x0
      Array UUID : 68c0c9ad:82ede879:2110f427:9f31c140
            Name : speernix15:0  (local to host speernix15)
   Creation Time : Sun Nov 30 19:15:35 2014
      Raid Level : raid1
    Raid Devices : 2

  Avail Dev Size : 1953260976 (931.39 GiB 1000.07 GB)
      Array Size : 976629568 (931.39 GiB 1000.07 GB)
   Used Dev Size : 1953259136 (931.39 GiB 1000.07 GB)
     Data Offset : 262144 sectors
    Super Offset : 8 sectors
    Unused Space : before=261864 sectors, after=1840 sectors
           State : active
     Device UUID : 5871292c:7fcfbd82:b0a28f1b:df7774f9

     Update Time : Thu Aug 28 01:00:03 2025
   Bad Block Log : 512 entries available at offset 264 sectors
        Checksum : b198f5d1 - correct
          Events : 38185

    Device Role : Active device 0
    Array State : AA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdb1:
           Magic : a92b4efc
         Version : 1.2
     Feature Map : 0x0
      Array UUID : 68c0c9ad:82ede879:2110f427:9f31c140
            Name : speernix15:0  (local to host speernix15)
   Creation Time : Sun Nov 30 19:15:35 2014
      Raid Level : raid1
    Raid Devices : 2

  Avail Dev Size : 1953260976 (931.39 GiB 1000.07 GB)
      Array Size : 976629568 (931.39 GiB 1000.07 GB)
   Used Dev Size : 1953259136 (931.39 GiB 1000.07 GB)
     Data Offset : 262144 sectors
    Super Offset : 8 sectors
    Unused Space : before=261864 sectors, after=1840 sectors
           State : active
     Device UUID : 4bbfbe7a:457829a5:dd9d2e3c:15818bca

     Update Time : Thu Aug 28 01:00:03 2025
   Bad Block Log : 512 entries available at offset 264 sectors
        Checksum : 144ff0ef - correct
          Events : 38185



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-03 12:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-12 19:02 RAID 1 | Extending Logical Volume Stefanie Leisestreichler
2025-01-12 19:38 ` Johannes Truschnigg
  -- strict thread matches above, loose matches on Subject: below --
2025-09-03 11:53 Stefanie Leisestreichler (Febas)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).