DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2011-02-21 00:48:33

Opperpanter
Member
From: Eindhoven, Netherlands.
Registered: 2008-08-11
Posts: 89

Howto upgrade usb stick

Hello,

I am now using a 2GB usb stick, but it's almost full (debian nas takes a lot of space).

What would be the best plan to change it to a 4GB (or even 8GB) stick?

My own idea is to boot Ubuntu (or debian) Live CD on my own pc.
From their I can partition the new stick and copy the data from the old stick to the new one?

I have funplug running from usb, so it's important to make a good copy.

Thanks,

Opper

Offline

 

#2 2011-02-23 20:00:09

dhub
Member
Registered: 2011-01-01
Posts: 112

Re: Howto upgrade usb stick

Since the nas doesn't pull a bootloader from the USB device like a PC does, it should be as simple as:

1. Plug both devices into a linux box (or use a usb hub and plug them both into the nas)
2. Use fdisk to partition the new usb device
3. Use mkfs to put the desired filesystem on the new usb device partition
4. Mount the new device
5. cp -a /olddev /newdev
6. Get a [coffee|beer|wine] while the copy finishes
7. Use the new usb device in place of the old one

Offline

 

#3 2011-02-25 00:55:41

oxygen
Member
Registered: 2008-03-01
Posts: 320
Website

Re: Howto upgrade usb stick

that will work. but dont forget to use the same partition layout or switch to use LABEL=sth, or else the system will not find the root partition.

Offline

 

#4 2011-02-25 06:01:05

bjby
Member
Registered: 2009-02-22
Posts: 265

Re: Howto upgrade usb stick

I would make a raw copy then extend partition.

1. cat /dev/sdc > /dev/sdd (old usb to new)
2. Extend the partion to full usb size.

Offline

 

#5 2011-02-26 13:26:53

oxygen
Member
Registered: 2008-03-01
Posts: 320
Website

Re: Howto upgrade usb stick

thats a bad idea. you will uselessly copy sparse blocks and keep the fragmentation inside the partitions. and you also have to manually fix the partition table to the new size.

creating new partition table and partitions and then using cp -a is faster and less error prone.

Offline

 

#6 2011-02-26 18:20:10

adambyrtek
Member
Registered: 2010-12-12
Posts: 27

Re: Howto upgrade usb stick

I usually use rsync instead of cp to mirror directory hierarchies, even locally.

Offline

 

#7 2011-02-26 18:55:32

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: Howto upgrade usb stick

rsync is great for incremental updates, but has a lot of overhead so "cp" is significantly faster for an initial copy.


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB