NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
jackerhack
Jan 20, 2014Aspirant
Recovering from apt-get dist-upgrade
Hey all, my first time here.
I've been a happy ReadyNAS user for close to a year. I have a Duo v2 at home and an NV+ v2 at work, all loaded with 3 TB drives.
Last week I was trying to setup my scanner on the Duo v2 and I logged in as root to install SANE. I then did an "apt-get dist-upgrade" like I do habitually on all my Linux machines, without knowing that this is a really bad idea with ReadyOS. Post reboot, my Duo v2 no longer works.
I had setup the Duo v2 with JBOD because I wasn't yet ready to trust it with RAID. Drive C is for Time Machine backups and drive D is for my media, anything that is too large for my laptop's hard disk. When the Duo v2 went down, I removed drive D for safety (the right side bay, I hope), booted the Duo v2 into the boot menu and selected OS reinstall. After this it booted up to the web GUI again, with my settings apparently intact, but now it insists it was configured for Flexi RAID, not JBOD, with no volumes present.
I still have root access, so I used fdisk to examine /dev/sda and /dev/sdb, but fdisk says they are GPT partition tables which it can't handle. I tried mounting /dev/sda1, but mount says that partition is already busy. df says that partition isn't mounted, so I assume the Flexi-RAID mechanism is locking access.
Questions:
1. How do I change this from Flexi RAID to JBOD without wiping the disk and losing my data?
2. If I have to do a factory reset, I can afford to lose the time machine backups, but how do I know whether the left or right bay is Drive C?
3. Can I do a factory reset to JBOD configuration with just the time machine disk and then reinsert the other disk without wiping all its data too?
Thanks for the help, all. The ReadyNAS was great when it worked, but now it's left me shaky over how easy it is to lose data with it.
Kiran
I've been a happy ReadyNAS user for close to a year. I have a Duo v2 at home and an NV+ v2 at work, all loaded with 3 TB drives.
Last week I was trying to setup my scanner on the Duo v2 and I logged in as root to install SANE. I then did an "apt-get dist-upgrade" like I do habitually on all my Linux machines, without knowing that this is a really bad idea with ReadyOS. Post reboot, my Duo v2 no longer works.
I had setup the Duo v2 with JBOD because I wasn't yet ready to trust it with RAID. Drive C is for Time Machine backups and drive D is for my media, anything that is too large for my laptop's hard disk. When the Duo v2 went down, I removed drive D for safety (the right side bay, I hope), booted the Duo v2 into the boot menu and selected OS reinstall. After this it booted up to the web GUI again, with my settings apparently intact, but now it insists it was configured for Flexi RAID, not JBOD, with no volumes present.
I still have root access, so I used fdisk to examine /dev/sda and /dev/sdb, but fdisk says they are GPT partition tables which it can't handle. I tried mounting /dev/sda1, but mount says that partition is already busy. df says that partition isn't mounted, so I assume the Flexi-RAID mechanism is locking access.
Questions:
1. How do I change this from Flexi RAID to JBOD without wiping the disk and losing my data?
2. If I have to do a factory reset, I can afford to lose the time machine backups, but how do I know whether the left or right bay is Drive C?
3. Can I do a factory reset to JBOD configuration with just the time machine disk and then reinsert the other disk without wiping all its data too?
Thanks for the help, all. The ReadyNAS was great when it worked, but now it's left me shaky over how easy it is to lose data with it.
Kiran
7 Replies
Replies have been turned off for this discussion
- mdgm-ntgrNETGEAR Employee Retired1. Contact support
2. Factory reset wipes all disks
3. No.
You should contact support. - fastfwdVirtuoso
jackerhack wrote: logged in as root .... then did an "apt-get dist-upgrade" .... The ReadyNAS was great when it worked, but now it's left me shaky over how easy it is to lose data with it.
Well, rm -Rf / is easy, too, but it's no reason to be "shaky" about the safety of your data.
Fear not. If you can resist the urge to blindly overwrite its operating system again after you get this sorted, your Duo will likely continue to provide the same reliable service that it always has. - mdgm-ntgrNETGEAR Employee RetiredIf you really want to play with the latest Debian etc. you could consider this (unsupported, use at own risk: http://natisbad.org/NAS/ and http://natisbad.org/NAS5/)
- jackerhackAspirant
fastfwd wrote: jackerhack wrote: logged in as root .... then did an "apt-get dist-upgrade" .... The ReadyNAS was great when it worked, but now it's left me shaky over how easy it is to lose data with it.
Well, rm -Rf / is easy, too, but it's no reason to be "shaky" about the safety of your data.
Fear not. If you can resist the urge to blindly overwrite its operating system again after you get this sorted, your Duo will likely continue to provide the same reliable service that it always has.
But this isn't about wiping data. This is about keeping software up to date. On Debian, apt-get dist-upgrade is always a good thing, guaranteed to cause no damage. ReadyOS has broken that promise from Debian and I was unprepared for that.
Also, software installations go bad. It's in the nature of software. I've taken hard disks from computer to computer for years and never lost data because both the OS and me have the sense to not wipe non-boot disks. That ReadyOS needs to wipe disks -- even in my scenario, where I'm trying to restore the OS, not change to a new configuration -- means that I can't trust it as my archival data store. It's volatile storage.
FWIW, I put the disk on a SATA-to-USB adapter and connected it to my laptop to check that my data was still there, but turns out that adapter supports 1TB disks max. Now I need to get a new adapter. - fastfwdVirtuoso
jackerhack wrote: This is about keeping software up to date.
But embedded software that's working fine doesn't need to be "kept up to date". And in this case, you didn't know where apt's sources.list was pointing or what was in the pointed-to repository, and you used "dist-upgrade" (which is allowed to automatically downgrade and remove packages), so you couldn't even have known whether the command really would update your software.
"If it ain't broke, don't fix it" is good advice in general. In this situation, where you're dealing with a lot of presumably important data with apparently no backup, it would seem to be exquisitely good advice. As I said before, follow it and your Duo will probably give you years of trouble-free service.jackerhack wrote: On Debian, apt-get dist-upgrade is always a good thing, guaranteed to cause no damage.
That is not true. For anecdotal evidence refuting your statement, do a Google search for "dist-upgrade" (damage OR fail).
Or go straight to the source and read the Debian package-management documentation (chapter 2 of the Debian Reference). You'll see that "dist-upgrade" is basically the same as "upgrade", but with permission to make even more changes to your system. Does that sound to you like something that could be guaranteed to cause no damage?jackerhack wrote: Also, software installations go bad. It's in the nature of software.
I have no idea what that means.jackerhack wrote: That ReadyOS needs to wipe disks -- even in my scenario, where I'm trying to restore the OS, not change to a new configuration -- means that I can't trust it as my archival data store.
A factory reset (aka "factory default") wipes the disks. An OS reinstall does not wipe the disks.jackerhack wrote: FWIW, I put the disk on a SATA-to-USB adapter and connected it to my laptop to check that my data was still there, but turns out that adapter supports 1TB disks max. Now I need to get a new adapter.
It doesn't sound as though you've done anything yet to destroy the data on that drive, so it's probably still intact. While you're waiting for the new adapter, it might be worthwhile to take MDGM's advice and contact Netgear Support; maybe they can fix your problem quickly and easily.
Good luck... - jackerhackAspirantI took the disks to work today and put them in a desktop computer. Both show up as GPT drives with two partitions each, with both partitions of type linux_raid_member. Which is curious because I had asked the Duo v2 to set them up as JBOD, so either it uses RAID even for JBOD, or it messed up the disks afterwards. (I had no idea there was such a thing as "JBOD" before getting the Duo v2.) FWIW, I can't read these disks from my desktop. The partitions are not recognised as ext2/3/4 or btrfs. The Duo v2's log include these discouraging lines:
Tue Jan 14 19:33:42 PST 2014 Volume scan failed to run properly.
Tue Jan 14 19:15:27 PST 2014 System is up.
Tue Jan 14 19:15:16 PST 2014 The paths for the shares listed below could not be found. Typically, this occurs when the ReadyNAS is unable to access the data volume.
media
transmission
backup
Wed Jan 15 08:43:40 PST 2014 Volume scan failed to run properly.
Wed Jan 15 00:42:58 PST 2014 265: ERROR: mysql failed when creating mysql user. (error=1)
Wed Jan 15 00:41:57 PST 2014 Volume scan failed to run properly.
Wed Jan 15 04:44:00 IST 2014 New disk detected. If multiple disks have been added, they will be processed one at a time. Please do not remove any added disk(s) during this time. [Disk 2]
Wed Jan 15 04:44:00 IST 2014 New disk detected. If multiple disks have been added, they will be processed one at a time. Please do not remove any added disk(s) during this time. [Disk 1]
Tue Jan 14 13:50:30 IST 2014 UPS is shutting down system.
Tue Jan 14 13:50:28 IST 2014 UPS battery is low; system will shutdown soon.
Tue Jan 14 13:39:37 IST 2014 UPS is on battery power.
Mon Jan 13 10:33:21 IST 2014 System is up.
I had a power failure shortly after the dist-upgrade, necessitating a shutdown. The PST timestamps are from the OS reinstall. I appreciate the advice on not messing with embedded devices, but I've been using Debian for 15 years, including on embedded devices going back to the Linksys NSLU2 (my first home NAS), and this is the first time an apt-get dist-upgrade resulted in a filesystem becoming inaccessible. Suffice to say it caught me unprepared, and the power failure and UPS shutdown left me with little time to do anything about it.
I do have a backup of my data, but it's offsite, so getting ~1 TB of data back in sync is going to be a bit of a pain. I'll do it if the Duo v2 has already wiped my data (as it appears).
I will call Netgear Support in the morning, but I will be surprised if they actually help. I've rarely had a good experience calling technical support at any company.fastfwd wrote: jackerhack wrote: Also, software installations go bad. It's in the nature of software.
I have no idea what that means.
What I mean is what you quoted: OS installations can go bad (dist-upgrade messed up, etc), but at least the filesystem remains functional when accessed from a working OS. - mdgm-ntgrNETGEAR Employee RetiredThere should be three partitions on the disks. OS Partition, Swap and Data Volume
Need to use mdadm and lvm2 when trying to mount it. However it looks like the data volumes might be missing.
See if support can help.
If you want to run the latest Debian on it take a look at the natisbad links in my post above. The author of that site has done a lot of work to make that possible.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!