LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-30-2016, 11:33 PM   #1
Helevitia
LQ Newbie
 
Registered: May 2016
Posts: 3

Rep: Reputation: Disabled
Trying to mount 4 HDDs in RAID 5


Short version:
Want to mount 4 HDDs in RAID 5, mount a USB 3 HDD as well, copy data from RAID 5 volume to USB 3 drive.

Long version:
I owned a Netgear ReadyNAS for a long time. It died and now I'm trying to get the new version of the NAS with a newer version of the OS(OS6 vs. OS4) to recognize the drives so I can mount them and then copy the data off to an USB 3 drive.

Apparently I can take the drives, connect them in a linux environment and see the data by doing the following:

(1) sudo su
(2) apt-get install fuseext2
(3) apt-get install lvm2
(4) modprobe fuse
(5) vgscan
(6) vgchange -ay c
(7) fuseext2 -o ro -o sync_read /dev/c/c /mnt

From what I understand about the above, I am installing ext2 so that the drives are readable and then mount the drives so I can copy them elsewhere. Is that right?

Now, I don't have a linux PC to do this, so I bought the newer version of my NAS, which has a different CPU(sparc vs. arm) hich prevents me form jsut putting the drive in and having them work. According to Netgear, I can mount these drives somehow within the NAS, but they won't tell me how to do it and want to charge me money. I figured out how to get root access and now I can see Busybox tools are installed, but not sure how to mount the drives from here? When I do a df, I just see this:

# df
Filesystem Size Used Available Use% Mounted on
udev 10.0M 0 10.0M 0% /dev

(BTW, df -a doesn't work)How can I see the current drives in the system and mount them?

Any ideas/ Here is some info:

# cat cpuinfo
processor : 0
model name : ARMv7 Processor rev 1 (v7l)
BogoMIPS : 1099.36
Features : half thumb fastmult vfp edsp vfpv3 vfpv3d16 tls idivt
CPU implementer : 0x56
CPU architecture: 7
CPU variant : 0x1
CPU part : 0x581
CPU revision : 1

Hardware : Marvell Armada 370/XP (Device Tree)
Revision : 0000
Serial : 0000000000000000


# cat devices
Character devices:
1 mem
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
21 sg
60 vpd
89 i2c
90 mtd
128 ptm
136 pts
180 usb
189 usb_device
250 ubi0
251 bsg
252 ptp
253 pps
254 rtc

Block devices:
259 blkext
7 loop
8 sd
9 md
31 mtdblock
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
93 nftl
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
253 device-mapper
254 mdp

# cat diskstats
7 0 loop0 0 0 0 0 0 0 0 0 0 0 0
7 1 loop1 0 0 0 0 0 0 0 0 0 0 0
7 2 loop2 0 0 0 0 0 0 0 0 0 0 0
7 3 loop3 0 0 0 0 0 0 0 0 0 0 0
7 4 loop4 0 0 0 0 0 0 0 0 0 0 0
7 5 loop5 0 0 0 0 0 0 0 0 0 0 0
7 6 loop6 0 0 0 0 0 0 0 0 0 0 0
7 7 loop7 0 0 0 0 0 0 0 0 0 0 0
31 0 mtdblock0 0 0 0 0 0 0 0 0 0 0 0
31 1 mtdblock1 0 0 0 0 0 0 0 0 0 0 0
31 2 mtdblock2 0 0 0 0 0 0 0 0 0 0 0
31 3 mtdblock3 0 0 0 0 0 0 0 0 0 0 0
31 4 mtdblock4 0 0 0 0 0 0 0 0 0 0 0
8 0 sda 75 0 600 20 0 0 0 0 0 20 20
8 1 sda1 20 0 160 0 0 0 0 0 0 0 0
8 2 sda2 20 0 160 0 0 0 0 0 0 0 0
8 3 sda3 20 0 160 0 0 0 0 0 0 0 0
8 16 sdb 43 0 344 2300 0 0 0 0 0 2300 2300
8 17 sdb1 28 0 224 1480 0 0 0 0 0 1480 1480


# cat filesystems
nodev sysfs
nodev rootfs
nodev tmpfs
nodev bdev
nodev proc
nodev cpuset
nodev cgroup
nodev devtmpfs
nodev configfs
nodev sockfs
nodev pipefs
nodev ramfs
nodev rpc_pipefs
nodev devpts
ext3
ext2
ext4
vfat
msdos
nodev nfs
nodev nfs4
nodev nfsd
nodev cifs
nodev autofs
fuseblk
nodev fuse
nodev fusectl
nodev ubifs
btrfs


# cd fs
# ls
btrfs cifs ext4 fscache jbd2 lockd nfs nfsd nfsfs
# pwd
/proc/fs


# cat mounts
rootfs / rootfs rw,size=252804k,nr_inodes=63201 0 0
proc /proc proc rw,noatime,nodiratime 0 0
sysfs /sys sysfs rw,noatime,nodiratime 0 0
udev /dev devtmpfs rw,noatime,nodiratime,size=10240k,nr_inodes=63201,mode=755 0 0
devpts /dev/pts devpts rw,noatime,nodiratime,mode=600 0 0


# ls
1 388 583 829 cpu kmsg softirqs
10 4 584 9 cpuinfo kpagecount stat
1072 400 585 911 crypto kpageflags swaps
1073 454 588 926 device-tree loadavg sys
1089 464 601 929 devices locks sysrq-trigger
11 470 7 930 diskstats mdstat sysvipc
12 5 704 931 driver meminfo thread-self
13 563 708 932 execdomains misc timer_list
2 564 744 962 filesystems modules tty
265 567 759 LCD fs mounts uptime
266 568 763 LCDinfo interrupts mtd version
268 571 771 LCDstatus iomem net vmallocinfo
269 572 772 buddyinfo ioports pagetypeinfo vmstat
271 575 773 bus irq partitions zoneinfo
280 576 777 cgroups kallsyms scsi
299 577 8 cmdline key-users self
3 581 814 consoles keys slabinfo
# pwd
/proc


# ls
bin etc init lib32 mnt proc run sys tmp var
dev home lib media opt root sbin sysroot usr

Thanks for taking a look!
 
Old 05-31-2016, 12:20 PM   #2
Helevitia
LQ Newbie
 
Registered: May 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
Bump. Anybody have any suggestions? Thanks!
 
Old 06-01-2016, 07:07 PM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Raid support has been available for quite some time - just look at the "md" devices.

It is configured using the "mdadm" tool. Once it is initialized, any filesystem may be put on top.

The basic sequence:
Code:
mdadm --create --verbose /dev/md/testing --level=5 --raid-devices=3 /dev/sda /dev/sdb /dev/sdc
In your case, you want 5 devices. You may or may not want a device name (/dev/md/testing), as a name (/dev/md0) will be assigned automatically when one isn't provided (and then it will use /dev/md127 for the first one).

Once creation is done (and it WILL take a while - my 9 TB raid 5 composed of 3 3TB partitions, took most of the day.) you can then put a filesystem on it.
 
Old 06-01-2016, 07:31 PM   #4
Helevitia
LQ Newbie
 
Registered: May 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks jpollard. I think you mis-understood my ask. After re-reading my post, I can see how it would be mis-understood.

I have 4 HDDs which already have data on them. They were all in a RAID 5 setup. The new NAS I bought isn't 1 to 1 compatible with my old NAS and hard drives. So I have to use some trickery to get the new NAS to recognize the drives. The "trickery" is the part i'm trying to figure out. I have two options.

1. Setup a Linux PC and follow instructions from this web page: http://home.bott.ca/webserver/?p=306
2. Use my new NAS to somehow mount the drives and then copy the data over to the attached USB drive.

I can't do option 1 currently and I already have the NAS, so I am trying option 2.

The NAS will give me root access but the tools are limited. It's not a full Linux distro. I think it has busy box tools. Apparently Netgear knows the commands and knows how to do it, but they won't tell me what it is. Just to be clear, I can't just throw the old HDDs in the NAS and it will recognize the drives because the block size is different.

So, if I could figure out how to mount the drives so I can see the data and then mount the USB drive so I can copy the data from the 4 HDDs to the USB drive, I would be golden. Unfortunately, I don't have enough Linux knowledge to figure it out. I've researched online, but I keep running into dead ends. I wnat to do these 4 things.

1. See the drives connected to the NAS(via cli, root access)
2. mount the drives in RAID 5 and be able to see the data
3. mount the usb drive
4. copy data from RAID 5 HDDs(4 of them) to the USB drive connected to the same NAS.

For completelness, this is what I am trying to do: http://kb.netgear.com/app/answers/detail/a_id/29876

Netgear wants to charge me $200 for a few commands

Thanks again!

Last edited by Helevitia; 06-01-2016 at 07:32 PM.
 
Old 06-02-2016, 06:11 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Sorry about that.

Because they require a storage location large enough to hold all the data, it sounds like what they are doing is copying the data, then reformatting the disks, and copying the data back.

If you still have the old NAS (apparently, you don't), then copying the data should be possible (both old and new should have ssh on it and that should allow you to copy it, though slowly, and the blank storage they want should hold all the data).

One major stumbling block is the requirement to have a storage location large enough for the backup. A 4 disk RAID 5 requires the capacity of 3 disks (if full), and that is usually hard to come by.

A second major stumbling block depends on the filesystem actually used by the Sparc based NAS. If it actually did use ext2, it is relatively safe (ext2 is fully compatible with ext3/4 so there should be no need to install ext2, as all you get is ext4 anyway).

The final (third) problem is that the raid format becomes the problem. And it is possible that is NOT freely available (it is possibly some third party design that makes the problem). The RAID format itself is already known not to be the same... and that makes it hard to get the data without the original NAS working.

What was it that failed on the original NAS? If it was the power supply, you might be able to get a replacement (cheaper than the custom software from Netgear anyway). If you get it replaced, (and have the space for the backup) then migrating would be easier. (but then, if the old NAS is working again....
 
Old 06-08-2016, 07:39 AM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
One last thought - and this is likely not available to you as you need a workstation with VM capability:

QEMU (and the linux kernel support) can provide Sparc32/64 emulation in a VM. IF you had system level backups you MIGHT be able to restore that to a virtual disk and then use that disk as a boot disk in a VM. This might allow you to pass the disks to the vm for it to use (it may even be possible to pass the system disk itself depending on how the controller worked - a SCSI disk would need a SCSI controller on the host...). If the raid is not hardware (unknown), and implemented in software then this might allow you to fake it out allowing you to read the disks.

If it is a hardware raid controller, then it would depend on the interface used: if the box used PCI then it may be possible to plug it in...(if this isn't what failed).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RAID on files instead of HDDs? Is it possible? How? WizadNoNext Linux - Hardware 6 04-11-2012 07:37 AM
How to re-mount the RAID5 HDDs arnold1070 Linux - Newbie 12 09-01-2011 09:03 PM
[SOLVED] Backup Daemons or mdadm RAID Across Internal and External HDDs? PehJota Linux - General 6 08-18-2010 07:44 AM
soft RAID (mirror) on Debian with different HDDs size jtag Linux - Server 3 04-18-2010 02:51 PM
Viewing Windows HDDs in RAID Anelysium Linux - Newbie 1 02-24-2007 10:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration