Tag: add

  • ZFS: Adding a new mirror to an existing ZFS pool

     

    Mirrored vdevs are great for performance and it is quite straight-forward to add a mirrored vdev to an existing pool (presumably one with one or more similar vdevs already):

     

    zpool add [poolname] mirror [device01] [device02] [device03]

     

    If it’s a two-way mirror you will only have two devices in the above. An example for ZFS on Ubuntu with a pool named seleucus and two SSDs could look like:

     

    zpool add seleucus mirror ata-SAMSUNG_SSD_830_Series_S0XYNEAC705640 ata-M4-CT128M4SSD2_000000001221090B7BF9

     

    As always, it’s good practice to use the device name found in /dev/disk/by-id/ rather than the sda, sdb, sdc etc. names as the latter can change – the former do not.

  • Ubuntu: How to add or append a file to an existing tape backup

     

    Sometimes you may with to add files to an existing backup; if you issue a command like:

     

    tar -cvf /dev/st0 backupfiles

     

    …and the tape is not already set to the end of the previous archive you will over-write any data from the position on the tape. Use the “eom” command to move the tape to the end of the alread-recorded files like so:

     

    mt -f /dev/[path-to-tape] eom

     

    e.g.:

     

    mt -f /dev/st0 eom

     

    Now you can use tar to add a file to the tape without over-writing the existing data.

  • Ubuntu: How to add a existing user to an existing group

     

    To add an existing user to a second group, use the following command:

     

    sudo usermod -a -G [group] [user]

     

    e.g.:

     

    sudo usermod -a -G geeks bob

     

    This will add the user bob to the group geeks.