1

here's my current ZFS status :

t@tsu:~$ zpool status
  pool: bpool
 state: ONLINE
  scan: none requested
config:

    NAME                                    STATE     READ WRITE CKSUM
    bpool                                   ONLINE       0     0     0
      73ea4055-b5ea-894b-a861-907bb222d9ea  ONLINE       0     0     0

errors: No known data errors

  pool: rpool
 state: ONLINE
  scan: none requested
config:

    NAME                                    STATE     READ WRITE CKSUM
    rpool                                   ONLINE       0     0     0
      7905bb43-ac9f-a843-b1bb-8809744d9025  ONLINE       0     0     0

errors: No known data errors

I want to add the following drive to my pool (for space) :

disks

This is the current disk with the OS (ubuntu 20.04) under ZFS :

disks

t@tsu:~$ sudo lshw -class disk
[sudo] password for t: 
  *-disk:0                  
       description: ATA Disk
       product: Samsung SSD 850
       physical id: 0
       bus info: scsi@2:0.0.0
       logical name: /dev/sda
       version: 2B6Q
       serial: S2RBNX0J524197X
       size: 465GiB (500GB)
       capabilities: gpt-1.00 partitioned partitioned:gpt
       configuration: ansiversion=5 guid=32f4df93-2b50-4a68-a888-f0570adac413 logicalsectorsize=512 sectorsize=512
  *-disk:1
       description: ATA Disk
       product: Crucial_CT525MX3
       physical id: 1
       bus info: scsi@4:0.0.0
       logical name: /dev/sdb
       version: R040
       serial: 172918010661
       size: 489GiB (525GB)
       capabilities: gpt-1.00 partitioned partitioned:gpt
       configuration: ansiversion=5 guid=d3e2b4ab-2c44-4da8-ac0c-fdb8053d35da logicalsectorsize=512 sectorsize=512

I can't work out the syntax, I'm pretty sure I'm not supposed to do :

zpool create addonpool /dev/sdb
zpool add addonpool mirror /dev/sda4 /dev/sdb

probably more something like this:

zpool add rpool mirror /dev/sda4 /dev/sdb

(because rpool is 4th partition and in the case of the unpartitioned disk, I'm adding the whole disk.)

but yeah I don't know.

Also would logging out and into a tty suffice to perform this or will I have to resort to doing this from a liveUSB?

1 Answer 1

3

You were close with your last syntax but you don't need to list the existing partition. This will add the complete new drive as a single disk vdev to your rpool. ZFS will begin striping new data across it once added:

zpool add rpool /dev/sdb

Note that this does not provide redundancy, only additional storage space in your rpool.

3
  • do I need to do this from tty? or a live usb? I assumed in logged in session that's a big no-no since I'm bootted and using that partition
    – tatsu
    Commented Jul 8, 2020 at 20:59
  • I did it in a tty, it returned without error in about a second, I rebooted and now I have tons and tons of extra space, thanks you're a hero! come claim some points on askubuntu: askubuntu.com/questions/1256078/…
    – tatsu
    Commented Jul 8, 2020 at 21:43
  • update on this, this actually works on a regular terminal. you don't have to be logged out.
    – tatsu
    Commented Mar 8, 2021 at 17:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .