Server upgrade and cloning has begun!

Server

This morning, I removed the backup drive, installed the new drive in the hot swap bay, and started prepping the drive at about 0900 Hrs.  Instead of using fdisk to partition the disk, I used another tool that is a bit easier, more flexible, and should be included in most every modern Linux distributions:  gparted.

So, as root user, I did the following:

# parted /dev/sdc mkpart primary 1m 100%
Information: You may need to update /etc/fstab.

# parted /dev/sdc “unit b print”
Model: ATA ST2000DM001-1CH1 (scsi)
Disk /dev/sdc: 2000398934016B
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start             End                 Size                 Type     File system  Flags
1      1048576B  2000398843903B  2000397795328B   primary

Notice that the start is at the 1 Meg spot, and not at 63, the way fdisk defaults.  This ‘aligns’ the partition structure and should result in higher performance.  Now, it was time to create the filesystem.  Here is the output:

# mkfs.ext4 /dev/sdc1
mke2fs 1.41.10 (10-Feb-2009)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
122101760 inodes, 488378368 blocks
24418918 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
14905 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

By now, it was 0915 Hrs, and it was time to mount the new drive and start ‘cloning’ as before mentioned using ‘cp -rp’.

It’s now about 1015 Hrs, and the cp process has run an hour or so, and I see that it’s clipping right along at about a rate of 225GB/hour.  😉

# df -h

/dev/sdb1             917G  764G  107G  88% /mnt/storage
/dev/sdc1             1.8T  224G  1.5T  13% /mnt/new

At this rate, I don’t expect it to take more than a couple more hours.  Then, I will have to do the ‘disk swap dance’.  😉

One thought on “Server upgrade and cloning has begun!”

  1. Cloning took about 4 hours. Then, it was time to swap drives. So, I swapped the 2TB cloned drive into the bay containing the 1TB drive, and put the 2TB backup drive back in. Easiest way to get the BIOS (and Linux) to recognize the larger storage drive was a simple reboot.

    # df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/lv_root 50G 40G 7.4G 85% /
    /dev/mapper/lv_home 129G 67G 56G 55% /home
    /dev/sdb1 1.8T 762G 979G 44% /mnt/storage
    /dev/sdc1 1.8T 796G 946G 46% /mnt/backup

    Everything looks good, stream started right up, and things are back to normal. Now, I can start freeing up space on the / and /home partitions. Oh, and I need to resume the backup scripts in the crond. 😀

Leave a Reply