Recently, I noticed that one of my mount points (the one with all my recorded TV and movies) was starting to fill up.  I scanned the web for cheap WD Red drives and finally settled on a nice shiny new 4TB drive.  After I received the new drive, I thought for a few days on how I could transfer the data and perhaps even pool the storage to maximize my new space.  So after much reading, I finally eschewed the idea of using BtrFS (too unstable) and ZFS (not-native) and just decided to use LVM (built into Ubuntu Server 14.04.2).

Configuration notes:

  • Existing Drive (old) @ /dev/sdb
  • New Drive @ /dev/sdc
  • Mount Point Name: ‘dionysus’ (this could be whatever you want)

 

Without further adieu, after installing the new hardware and booting up here is what I did:

First find the drive:

sudo lshw -C disk

Partition the drive (use gdisk for large disks over 2TB – I had to install it manually):

sudo apt-get install gdisk

sudo gdisk /dev/sdc

At the prompts, type n to create a new partition, 1 to assign it partition number 1, Enter to accept the default starting cylinder, and Enter to set the size. Then type t to set the partition type. LVM partitions are type 8e00, so enter it at the prompt. Finally, type w to write the new partition table to the disk.

You can check your work with:

sudo gdisk -l

Create Physical Volume in LVM:

sudo pvcreate /dev/sdc1

Double-check with:

sudo pvdisplay

Create Volume Group named ‘dionysus’ (I append vg or lv to the front of volume groups or logical volumes so I can keep the naming straight):

sudo vgcreate vg_dionysus /dev/sdc1

Double-check with:

sudo vgdisplay

sudo pvdisplay

Create LV Group

sudo lvcreate --name lv_dionysus --size 100%FREE vg_dionysus

Double-check with:

sudo lvdisplay

Format the Logical Volume

sudo mkfs -t ext4 /dev/vg_dionysus/lv_dionysus

Make a temporary mount point

sudo mkdir /mnt/temp_dionysus
sudo mount -t ext4 /dev/vg_dionysus/lv_dionysus /mnt/temp_dionysus

Copy files from old drive to new:

sudo rsync -avrtP /mnt/dionysus/ /mnt/temp_dionysus/


Unmount the old drive (may just need to remove from fstab and reboot):

sudo umount /mnt/dionysus

Partition the old drive:

sudo gdisk /dev/sdb

At the prompts, type d to delete a partition (type p to see partitions).  Enter 1 to delete partition one(/sdb1).  type n to create a new partition, p to make it primary, 1 to assign it partition number 1, Enter to accept the default starting cylinder, and Enter to set the size. Then type t to set the partition type. LVM partitions are type 8e, so enter it at the prompt. Finally, type w to write the new partition table to the disk.

You can check your work with:

sudo gdisk -l

Create Physical Volume in LVM:

sudo pvcreate /dev/sdb1

Double-check with:

sudo pvdisplay

Add the old drive to the volume group with the extend command:

sudo vgextend vg_dionysus /dev/sdb1

Double-check with:

sudo vgdisplay

Resize the logical volume:

sudo lvextend -l +100%FREE /dev/vg_dionysus/lv_dionysus

Resize the filesystem to expand to the full size of the logical volume

sudo resize2fs /dev/vg_dionysus/lv_dionysus

Open fstab:

sudo nano /etc/fstab

Then append [use nomenclature (/dev/mapper/vgname-lvname)]:

/dev/mapper/vg_dionysus-lv_dionysus /mnt/dionysus ext4 defaults 0 0

Save and exit.

Test by mounting all:

sudo mount -a

There you go, back in business with a big, new drive with all your old stuff on it.  I hope this helps someone trying to do the same.

Was this post helpful?
  • Thanks 
  • Sort-of 
  • Not Helpful 

Finally… I got around to researching a little issue that had been bothering me ever since I installed Ubuntu 12.04 back in April.  Watching videos, flash or otherwise would suffer from frequent skipping (or stuttering) of both the audio and video.  Previously I searched for a solution by searching for “video” stuttering, found some interesting articles that pointed to the nVidia graphics drivers.  But after a few hours of fiddling, nothing seemed to work.

Then, today, I finally got fed up enough to do another search.  This time I searched for stuttering “audio” and I found the holy grail, the fix!  As usual, the Ubuntu forums came to the rescue.

As it turns out, my Intel motherboard audio device may have been incorrectly recognized by Ubuntu and the audio driver may have been having issues.  So here’s how to fix it…

Open a terminal window and type:

sudo nano /etc/modprobe.d/alsa-base.conf

Scroll to the end of the file and then add the following:

options snd-hda-intel model=generic

Press “Ctrl-O” to write to the file then “Ctrl-X” to exit.

That’s about it.  I required a reboot to get it to work, but others mileage may vary.

Was this post helpful?
  • Thanks 
  • Sort-of 
  • Not Helpful