Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I have a linux box that I'm using as a ADSL router (slack 12.1).
Until recently I had two hard drives in it, one for linux, and one for storing movies, music, etc.
So, I have just bought another 1,5 TB disk. My plan was to add it to the same mount location: /opt/abram to expand my storage disk, only to come to conclusion that this can't be done. OK, it actually makes sense, if I thought about it I would realise it before.
Anyway, what else can I do? Is there a way to add new drive to existing one in a way that would result in one 2,5 TB drive?
I tried it with mdadm, but as it turns out, it's impossible to crate RAID 0 without loosing all the data on sda1 disc.
Also, it would be very cool if I could find a solution that would enable me to one day add a new drive to further expend my storage.
I'm aware that I could mount my new disk to, let's say /opt/abram/Divx, or /opt/abram/mp3, but that's not the solution I'm looking for.
Don't think RAID is where you want to be going, especially as your two volumes are different sizes.
Do you really want 2.5Tb with *NO* redundancy? That could be a hell of a lot of data to lose. Either way, what you want to be doing is doing it with LVM. As the new drive is larger than the old partition, you're in a great position to do this safely. Just create a new LVM partition on the drive, filling it up, create a Physical Volume and then a nice Logical Volume inside it, and format it. Then just copy all data into the newly mounted partition. Once it's there, you can happily nuke the old partition, LVM that up too, and add it to the existing PV and then the same LV, making a final 2.5Tb volume. Bosh. Job done.
Don't think RAID is where you want to be going, especially as your two volumes are different sizes.
Do you really want 2.5Tb with *NO* redundancy? That could be a hell of a lot of data to lose. Either way, what you want to be doing is doing it with LVM.
Well, the data is not that sensitive, it's a disk that a few of us on LAN use it for movies, music, games and stuff we download from the net.
LVM? I don't really know how to use that, but thanks a lot for the reply. I'll google it and hopefully find a solution. If you have
a link for a good tutorial about this, please post a link.
I used LVM. First I created a new volume group and added
the new 1,5 TB disk to it. Then I created a logical volume
form that disk, copied all the files from the old 1 TB disk,
added it to the same volume group (which erased the disk)
and then expanded the logical volume to include both disks.
The final result looks like this:
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 3.7G 2.8G 794M 78% /
/dev/hda5 67G 32G 31G 52% /opt
/dev/mapper/abram_vg-abram_disk 2.3T 868G 1.4T 38% /opt/abram
So the next time I buy a new disk, it should be no problem to
add it to the same group and extend my logical volume.
Also, as far as I could find out, it's no problem to transfer this groups of disks to another system, for example if I reinstall
linux, maybe updating my slackware.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.