Increasing Raid1 filesystem size

    • OMV 3.x
    • Resolved
    • Increasing Raid1 filesystem size

      So I had an asymmetrical Raid1 as a basic file server. One drive was .5Tb and the other was 2Tb. I just replaced the .5 with another 2Tb, and I'm trying to resize the filesystem to match the new size.

      My issue is functionally identical to the one in this thread, so I followed the same instructions, ie forcing mdadm to resync to the max capacity. However now that it's completed, the webclient still is showing the former size, and the thread essentially stops after running this command. What do I need to do to get it the right size? My guess was to ssh into the system and run parted, but I figured there's a better way to do this.

      EDIT: After looking around on the forum, it looks like doing a Raid1 was a bad idea from the get-go (or at least should have been migrated at some point over the past couple of years). Since I have the old drive and no new data had been added, could I create a btrfs pool with the 2Tb drives, plug the old drive into my desktop, and copy everything over?

      The post was edited 1 time, last by trey.merkley ().

    • trey.merkley wrote:

      the webclient still is showing the former size,
      For the array or the filesystem? If the array is now 2tb, you need to resize the filesystem.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • trey.merkley wrote:

      For the filesystem, and thanks for the reply. I just tried that, but when I click on the resize button, it shows the warning, refreshes the list of filesystems a couple of times, and nothing changes.
      Assuming it is ext4, you could try resize2fs from the command line.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Yeah, it is ext4, and here's the output:
      $ sudo umount /dev/dm-0 [sudo] password for laptop: $ fsck -f /dev/dm-0 -dash: 6: fsck: not found $ resize2fs /dev/dm-0 -dash: 7: resize2fs: not found $ sudo resize2fs /dev/dm-0 resize2fs 1.43.3 (04-Sep-2016) Please run 'e2fsck -f /dev/dm-0' first. $ sudo e2fsck -f /dev/dm-0 e2fsck 1.43.3 (04-Sep-2016) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information Clementine: 222434/30523392 files (0.8% non-contiguous), 119426708/122063360 blocks $ sudo resize2fs /dev/dm-0 resize2fs 1.43.3 (04-Sep-2016) The filesystem is already 122063360 (4k) blocks long. Nothing to do!
    • Source Code

      1. $ sudo fdisk -l /dev/dm-0
      2. [sudo] password for laptop:
      3. Disk /dev/dm-0: 1.8 TiB, 2000262619136 bytes, 3906762928 sectors
      4. Units: sectors of 1 * 512 = 512 bytes
      5. Sector size (logical/physical): 512 bytes / 4096 bytes
      6. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
      7. $ sudo lsblk /dev/dm-0
      8. NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
      9. md0-crypt 253:0 0 1.8T 0 crypt /srv/dev-disk-by-label-C
      Display All
    • I should have noticed you were working with a devicemapper device and that is was either encrypted or using LVM. You have resized the array and device but now need to resize the luks container with cryptsetup resize. Then you can resize the filesystem.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • trey.merkley wrote:

      As for the other question about converting to a btrfs system, should I post in a new thread?
      You don't have to. It would be easy to convert the filesystem to btrfs but actually use btrfs for pooling (replacing mdadm), I am pretty sure you would have to wipe the drives.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • trey.merkley wrote:

      I haven't added anything new to the drives, so the old drive should have all of my data. Can I just copy from it?

      Sure. And 4GB is sufficient to serve hundreds of users regardless of the filesystem chosen (RAM in fileservers usually is used for filesystem buffers and caches which will speed up operation in some environments but usually not at home). You only need to care about memory constraints once you want to use deduplication (which is something I would not do with btrfs and OMV3 anyway since all the btrfs code lives inside the kernel and you most probably run with an outdated kernel then).
    • trey.merkley wrote:

      Is there any configuration I'd need to do for the bulk of the data preservation benefits?

      I would do the following

      • if you stay at OMV3 (why not upgrading to OMV4?) then at least install backports kernel if you're still on kernel 3.x (btrfs code lives inside the kernel --> the higher the kernel version the better)
      • I would then transfer data after creating the btrfs mirror simply using rsync -a
      • Since you have plenty of free disk space then and most probably do only normal things (NAS use case) you don't need to care about anything else (with full filesystems and adding tons of small files in very short time you can run into the ugly situation that btrfs can not allocate more metadata space -- something I ran into recently when doing performance tests. In case you want to fill your filesystem completely or do constantly snapshots without deleting older ones better read this already now)
    • tkaiser wrote:


      • why not upgrading to OMV4?

      I haven't needed to until now, and while I know dist-upgrade is pretty stable, I've had bad experiences with it in the past and I wanted to make sure I deleted everything I needed to to upgrade. I most likely will upgrade after moving everything around.

      Otherwise, thanks for all of the info. I'll poke around and try to get this set up when I have a spare minute.