Warning: this browser doesn't support HTML5. Styling disabled.
Some browsers that do support HTML5:

mypc - 3TB Fileserver

Harddisk prices finally having reached a more acceptable level, I have acquired a Western Digital WD Caviar Green 3TB ( WD30EZRX) for €117.

So before starting I have my main and temporary hard drives, visualised with fdisk -l (as root)

/dev/sda 80.0 gb
/dev/sdb 120.0 gb

After installing the new 3TB drive the server boots properly and now fdisk displays an additional:

/dev/sdc: 3000.6 GB

which unsurprisingly doesn't contain a valid partition table, but does displays this reassuring message:

WARNING: The size of this disk is 3.0 TB (3000592982016 bytes).
DOS partition table format can not be used on drives for volumes
larger than (2199023255040 bytes) for 512-byte sectors. Use parted(1) and GUID
partition table format (GPT).

Instead of using webmin to create a partition (which fails) I use fdisk and format it as ext4:

mkfs.ext4 /dev/sdc1

And again in webmin I mount the partition on /mnt/disk3t as ext4. Now when I do df -h the partition shows up, but only 2.0T is available. This is apparently a problem with fdisk. Here it is suggested to use gdisk. So I install that and run (as root):

gdisk /dev/sdc

Using p, the partition table is listed, just as in fdisk, and here the size is listed as 2.0 TiB. I remove and re-add the partition, now the size is 2.7 TiB
Upon writing the changes to disk, it is also mentioned the MBR will be converted to GPT. Than I format the partition as mkfs.ext4 again.

I remount it with (as root):

mount /dev/sdc1 /mnt/disk3t

Unfortunately, df -h still says 2.0T, but I was warned the kernel would still be using the old partition table until reboot, so I reboot. But there is no change after the reboot, so I retry creating the partition, while first unmounting the partition. In gdisk no partitions show up.

Again I get the message that the new partition table will be used at the next reboot: so first I'll reboot again.

An error occurs upon booting (forcing me to connect my monitor). It has trouble mounting the new partition (how odd) and I press s to skip mounting. Now I can ssh back into the server.

Now gdisk shows the correct partition. I run mkfs.ext4 again, and mount it and voila! /dev/sdc1 2.7T. I like it!

I unmount it again and go to webmin, Disk and Network Filesystems, the mountpoint is still intact and I just select mount now and save.

I create a symlink

ln -s /mnt/disk3t/ disk3t

I also chown /mnt/disk3t to my user, so I can access it more easily. There is no real danger here. Than I start copying the files from the temporary 120GB drive to the new drive with rsync. Also I run this to get an idea of the progress:

watch -n5 df --type=ext4 --type=ext3 -BM

In webmin, I renamed the mount point /export/disk120g to /export/disk3t and bound it to /mnt/disk3t. I modified dop's /etc/fstab, removing old mount points and adding:

# Entry for broek/disk3t
broek:/export/disk3t /media/broekdisk3t nfs rsize=8192,wsize=8192,timeo=14,intr 0 0

And got

mount.nfs: access denied by server while mounting broek:/export/disk3t

Reboot doesn't work.

So I first shutdown and physically remove the old temporary 120GB 2.5" drive. Now I get lots of errors when starting up:

/mnt/disk120g is not found
the disk drive for export/disk3t is not ready yet or not present
the disk drive for mnt/disk3t is not ready yet or not present

The first message is not a surprise, because I just removed it, but what about the other two? Apparently, as the old drive was removed, drive /etc/sdc moved to /etc/sdb, and mount points are wrong. I can't find how to remove mount points in webmin, so I just use edit /etc/fstab manually and also remove unused nfs exports mount points that are on the (still installed) 80gb disk, which has the OS on it.

Just for kicks I reboot and now it is unpingable. I connect the monitor again, but there is no image. So I reboot again and now suddenly I have to press enter to pass by the grub menu. This might be caused because I used the reset button, so I will have to check rebooting later. After this the server continues to boot up correctly, and /mnt/disk3t is mounted properly.

Now I remembered something from last time and I go to webmin and Networking > NFS Exports. There I remove old the old exports and rename /export/disk120g to /export/disk3t. Now I can mount it on dop! (as root). I can read and write normally to and from the network drive.

I run some tests moving my files from old disks to the new disk with:

rsync --progress -a source dest

I didn't try to add the progress flag earlier in this post, because I already started copying, although in hindsight it might not have mattered since rsync should pick up where it has left off. Anyway, the progress flag only gives progress per file, so I also use

watch -n30 df --type=ext3 --type=nfs -BG

To get a more global overview of the progress. Started copying 1100GB at ca. 11:00 AM on Saturday.

Now I add the new export to my Xtreamer:


Which works, but suprisingly not when I try to access /NetShare/broekshare, but using /export/disk3t works fine. Whatever. Also removing old mountpoints doesn't work exactly great. Again whatever.

Now I go back to webmin and go to Servers > Samba Windows File Sharing
First I again remove old shares (from the 80GB disk). Than I add a new share:

I add /mnt/disk3t/Share with sharename bsshare
and Under security and access control I set
writable: No
Guest access: Guest only

On dop I can access both under smb://broek/ and the share is indeed read-only. And finally I verified that it also works great on a Windows laptop over wifi!

The copying was successful somewhere on Sunday before 6:00 AM.

by Martin @ 10:25 23 February 2013