Adding DigitalOcean Volumne in zpool (ZFS)

1. Check zpool Status

root@server:~# zpool status
  pool: nfs
 state: ONLINE
  scan: scrub repaired 0 in 1h6m with 0 errors on Sun Feb 11 01:30:22 2018
config:

  NAME                              STATE     READ WRITE 
  nfs                               ONLINE       0     0     0
    sda                             ONLINE       0     0     0
    scsi-0DO_Volume_volume-ger-04   ONLINE       0     0     0

errors: No known data errors

2. We may encounter below error while adding volume in DigitalOcean. This is because disk label is not properly set by DigitalOcean.

root@server:~# zpool add images /dev/disk/by-id/scsi-0DO_Volume_volume-ger-05
invalid vdev specification
use '-f' to override the following errors:
/dev/disk/by-id/scsi-0DO_Volume_volume-ger-05 does not contain an EFI label but it may contain partition
information in the MBR.

3. We use below process to fix disk label as GPT

root@server:~# parted /dev/disk/by-id/scsi-0DO_Volume_volume-ger-05
GNU Parted 3.2
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel GPT                                                      
(parted) quit                                                             
Information: You may need to update /etc/fstab.

4. Adding Volume in zpool ie: “images” in our case

root@server:~# zpool add nfs /dev/disk/by-id/scsi-0DO_Volume_volume-ger-05

5. Now check zpool list

root@server:~# zfs list
NAME     USED  AVAIL  REFER  MOUNTPOINT
images   275G   110G   275G  /nfs
root@server:~# zpool status
  pool: nfs
 state: ONLINE
  scan: scrub repaired 0 in 1h6m with 0 errors on Sun Feb 11 01:30:22 2018
config:

  NAME                              STATE     READ WRITE CKSUM
  images                            ONLINE       0     0     0
    sda                             ONLINE       0     0     0
    scsi-0DO_Volume_volume-ger-04   ONLINE       0     0     0
    scsi-0DO_Volume_volume-ger-05   ONLINE       0     0     0

errors: No known data errors

 

Leave a Reply

Your email address will not be published.


*