General NAS-Central Forums

Welcome to the NAS community
It is currently Thu Dec 14, 2017 5:13 pm

All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Mon Aug 03, 2015 3:46 am 
Offline

Joined: Sun May 17, 2015 11:00 am
Posts: 20
Location: Internet
I would like to mount a single drive from my broken NSA221 in my Fedora OS and copy the files to remote NAS540 in order to recover my files from RAID1 array from NSA221.
The drive of course contains data which I don't want to lose. I can see and copy some of the data by using Fsproxy 1.0RC under Windows XP- a freeware app, which is in fact a linux server, but the app often disconnects and though it was really helpful I would rather have the drive coppied into NAS540.
Now the drive is connected to my old desktop PC (with both Windows XP and Fedora OSes) and I tried the following in Fedora:
Code:
# mount /dev/sdc2 /mnt/rec
mount: unknown filesystem type 'linux_raid_member'


I also tried to assemble RAID array and mount the partition:
Code:
# mdadm --assemble --run /dev/md0 /dev/sdc1
mdadm: no recogniseable superblock on /dev/sdc1
mdadm: /dev/sdc1 has no superblock - assembly aborted
# mdadm --assemble --run /dev/md0 /dev/sdc2
# mount /dev/sdc2 /mnt/rec
mount: unknown filesystem type 'linux_raid_member'

but all in vain.

Below are: fdisk -l, mdstat, mdadm --examine, mounts
Code:
# fdisk -l

Disk /dev/sdc: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x69ce7877

Device     Boot   Start        End    Sectors  Size Id Type
/dev/sdc1            63    1028159    1028097  502M  8 AIX
/dev/sdc2       1028160 3907024064 3905995905  1.8T  9 AIX bootable

Partition 1 does not start on physical sector boundary.


# cat /proc/partitions
major minor  #blocks  name

   8       32 1953514584 sdc
   8       33     514048 sdc1
   8       34 1952997952 sdc2
--
253        0    2097152 dm-0
 253        1    2097152 dm-1
 253        2   52428800 dm-2
 253        3  143994880 dm-3
 253        4   20971520 dm-4
 253        5   20971520 dm-5

# cat /proc/mdstat
Personalities :
unused devices: <none>

# mdadm --examine /dev/sdc
/dev/sdc:
   MBR Magic : aa55
Partition[0] :      1028097 sectors at           63 (type 08)
Partition[1] :   3905995905 sectors at      1028160 (type 09)

# mdadm --examine /dev/sdc1
mdadm: No md superblock detected on /dev/sdc1.

# mdadm --examine /dev/sdc2
/dev/sdc2:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 00000000:00000000:00000000:00000000
  Creation Time : Sat Jul 25 21:34:20 2015
     Raid Level : -unknown-
   Raid Devices : 0
  Total Devices : 1
Preferred Minor : 127

    Update Time : Sat Jul 25 19:37:13 2015
          State : active
 Active Devices : 0
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 1
       Checksum : c8ec1df5 - correct
         Events : 1


      Number   Major   Minor   RaidDevice State
this     0       8       34        0      spare   /dev/sdc2

   0     0       8       34        0      spare   /dev/sdc2

# cat /proc/mounts
sysfs /sys sysfs rw,seclabel,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
devtmpfs /dev devtmpfs rw,seclabel,nosuid,size=1014172k,nr_inodes=213213,mode=755 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,seclabel,nosuid,nodev 0 0
devpts /dev/pts devpts rw,seclabel,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,seclabel,nosuid,nodev,mode=755 0 0
tmpfs /sys/fs/cgroup tmpfs ro,seclabel,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
pstore /sys/fs/pstore pstore rw,seclabel,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
/dev/mapper/fedora00-root / ext4 rw,seclabel,relatime,data=ordered 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,seclabel,relatime 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=30,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 0
debugfs /sys/kernel/debug debugfs rw,seclabel,relatime 0 0
tmpfs /tmp tmpfs rw,seclabel 0 0
mqueue /dev/mqueue mqueue rw,seclabel,relatime 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0
nfsd /proc/fs/nfsd nfsd rw,relatime 0 0
/dev/sdd3 /boot ext4 rw,seclabel,relatime,data=ordered 0 0
/dev/mapper/fedora00-home /home ext4 rw,seclabel,relatime,data=ordered 0 0
tmpfs /run/user/42 tmpfs rw,seclabel,nosuid,nodev,relatime,size=204808k,mode=700,uid=42,gid=42 0 0
tmpfs /run/user/1000 tmpfs rw,seclabel,nosuid,nodev,relatime,size=204808k,mode=700,uid=1000,gid=1000 0 0
gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
/dev/mapper/fedora-root /run/media/asienicki/0002ed1e-efd3-40ed-b7d6-8b0a0e00294c ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/sdd1 /run/media/asienicki/e7d2c5b4-619c-4f76-8cee-da22dfe99379 ext3 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0
/dev/sdc1 /run/media/asienicki/257688ca-08bf-45e7-a598-9baeec864a41 ext2 rw,seclabel,nosuid,nodev,relatime 0 0
/dev/sdb1 /run/media/asienicki/C268E55768E54B2D fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
/dev/sdb5 /run/media/asienicki/6AC001EFC001C275 fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
/dev/sda1 /run/media/asienicki/0206-C8E4 vfat rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro 0 0
/dev/mapper/fedora-home /run/media/asienicki/67cfc9d3-b698-4a71-aec7-1bf84b88819e ext4 rw,seclabel,nosuid,nodev,relatime,data=ordered 0 0


My Linux distro is Fedora but I can effectively switch into almost any other distro (apart from Knoppix - 7.4.1 fails to start x and generates a list of errors). BTW I wonder what is the file system used in NSA221 and NAS540 (I saw many posts on NFS in NSA221 and but Fedora has no native support for that). Certainly, putting one of my RAID1 drives into NAS540 and initiating it was a mistake.


Top
 Profile  
 
PostPosted: Mon Aug 03, 2015 5:58 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6090
Code:
mdadm --assemble --run /dev/md0 /dev/sdc2
mount /dev/md0 /mnt/rec


Top
 Profile  
 
PostPosted: Mon Aug 03, 2015 5:04 pm 
Offline

Joined: Sun May 17, 2015 11:00 am
Posts: 20
Location: Internet
Mijzelf wrote:
Code:
mdadm --assemble --run /dev/md0 /dev/sdc2
mount /dev/md0 /mnt/rec


I've tried that one too but Fedora says that special device /dev/md0 doesn't exist.

Code:
# mdadm --assemble --run /dev/md0 /dev/sdc2
# mount /dev/md0 /mnt/rec
mount: special device /dev/md0 does not exist


Fsproxy soft mounts it almost immediately ( it's enough just to point the drive - not the whole partition but drive). I would use Fsproxy instead of rsync, however, Fsproxy crashes after a while (its sufficient enough to copy just several GB of data but not to transfer the whole drive).


Top
 Profile  
 
PostPosted: Mon Aug 03, 2015 7:05 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6090
adriansienicki wrote:
I've tried that one too but Fedora says that special device /dev/md0 doesn't exist.
And mdadm didn't complain?

In my experience the device node of the md device is automagically created. I never checked if mdadm did so, or some hotplug daemon. You can look if it has a different name by executing
Code:
cat /proc/mdstat
and/or
Code:
cat /proc/partitions


Or you can try to create the device node yourself (as root)
Code:
mknod /dev/md0 b 9 0


Top
 Profile  
 
PostPosted: Thu Aug 06, 2015 5:52 am 
Offline

Joined: Sun May 17, 2015 11:00 am
Posts: 20
Location: Internet
Code:
# mknod /dev/md0 b 9 0
# cat /proc/mdstat
Personalities :
unused devices: <none>


# cat /proc/partitions
major minor  #blocks  name

   8        0     996912 sda
   8        1     996880 sda1
   8       16  195360984 sdb
   8       17  104864256 sdb1
   8       18          1 sdb2
   8       21   90486081 sdb5
   8       32 1953514584 sdc
   8       33     514048 sdc1
   8       34 1952997952 sdc2
   8       48  244140625 sdd
   8       49  239978496 sdd1
   8       50          1 sdd2
   8       53    4159488 sdd5
  11        0    1048575 sr0



BTW when I got through the procedure with creating md0 and mounting it it displayed me a message that I must specify the filesystem... NFS won't work as you know.

Code:
# mdadm --assemble --scan
mdadm: failed to add /dev/sdc2 to /dev/md/127_0: Invalid argument
mdadm: /dev/md/127_0 assembled from -1 drives and 1 spare - not enough to start the array.
mdadm: No arrays found in config file or automatically
# mdadm --assemble --run /dev/md0 /dev/sdc2
root@jarvis:~# mdadm --examine /dev/md0
root@jarvis:~# mount /dev/md0 /mnt/rec
mount: you must specify the filesystem type


I think I'm missing array... but in case of rebuilding / creating would it leave my data on the drive unchanged?


Top
 Profile  
 
PostPosted: Thu Aug 06, 2015 8:44 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6090
According to /proc/mdstat and /proc/partitions you don't have an assembled array.
Quote:
root@jarvis:~# mdadm --examine /dev/md0
This isn't supposed to tell anything. examine is used for the raid member, not the array itself. You can use
Code:
mdadm --detail /dev/md0
on the array.

BTW, if you are lucky, the array uses a version 0.9 raid header, which is at the end of the partition. Which means that the filesystem starts at the beginning of the partition, and then you can mount it without assembling the array, if you specify the filesystem:
Code:
mount -t xfs -o ro /dev/sdc2  /mnt/rec


Top
 Profile  
 
PostPosted: Sat Aug 08, 2015 7:40 pm 
Offline

Joined: Sun May 17, 2015 11:00 am
Posts: 20
Location: Internet
mounting it as xfs gave no results:
Code:
mount -t xfs -o ro /dev/sdc2  /mnt/rec

and as a local nfs - still no results (in this case I wasn't even disappointed - it wasn't a server so now wonder it produced only "error msg")
Code:
# mount -t nfs -o ro /dev/sdc2  /mnt/rec
mount.nfs: remote share not in 'host:dir' format


I tried as well "force" syntax:
Code:
# mdadm --assemble --force -l 1 /dev/md542 /dev/sdc2 missing
returns:
Code:
# mdadm: option -l not valid in assemble mode

w/o -l option it also didn't work.

I wonder if there's any Fsproxy-like software that works? I tried several data recovery freewares/trials but they can't even see the partition. Fsproxy mounts somehow the partition so I guess that mounting is possible... but I can't figure out how.


Top
 Profile  
 
PostPosted: Sat Aug 08, 2015 7:51 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6090
adriansienicki wrote:
mounting it as xfs gave no results:
Code:
mount -t xfs -o ro /dev/sdc2  /mnt/rec
No results? As in, no message? In Linux a command generally succeeds silently, unless you added a '-v' or something like that.
Did you check the contents of /mnt/rec after mounting?


Top
 Profile  
 
PostPosted: Sat Aug 08, 2015 8:31 pm 
Offline

Joined: Sun May 17, 2015 11:00 am
Posts: 20
Location: Internet
Mijzelf wrote:
adriansienicki wrote:
mounting it as xfs gave no results:
Code:
mount -t xfs -o ro /dev/sdc2  /mnt/rec
No results? As in, no message? In Linux a command generally succeeds silently, unless you added a '-v' or something like that.
Did you check the contents of /mnt/rec after mounting?

sure I did. That's why I know the folder was empty. I'm always using verbose mode especially when I'm not sure of the results. In that case - "filesystem" was the the problem. That's why I tried nfs... but it didn't work either.


Top
 Profile  
 
PostPosted: Sun Aug 09, 2015 1:51 pm 
Offline

Joined: Sun May 17, 2015 11:00 am
Posts: 20
Location: Internet
What exactly FS is used in NSA221?


Top
 Profile  
 
PostPosted: Sun Aug 09, 2015 6:37 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6090
According to the Wiki it's XFS. But I don't know if that is true for all firmware versions. On the 2.x firmwares for the NSA220 reiserfs was used, 3.x was ext3, when I remember well, and later ext4 was used.
The kernel on your box is too old for ext4. (It's an oxnas chip, which is only supported in a special version of 2.6.24). I think it's to new for reiserfs (that filesystem is unmaintained since Hans Reiser was convicted for murder in 2008), so only ext3 is possible, next to xfs.


Top
 Profile  
 
PostPosted: Mon Aug 10, 2015 7:55 am 
Offline

Joined: Sun May 17, 2015 11:00 am
Posts: 20
Location: Internet
Mijzelf wrote:
According to the Wiki it's XFS. But I don't know if that is true for all firmware versions. On the 2.x firmwares for the NSA220 reiserfs was used, 3.x was ext3, when I remember well, and later ext4 was used.
The kernel on your box is too old for ext4. (It's an oxnas chip, which is only supported in a special version of 2.6.24). I think it's to new for reiserfs (that filesystem is unmaintained since Hans Reiser was convicted for murder in 2008), so only ext3 is possible, next to xfs.


A well known sad story. I'll try again with ext3 and xfs but on a different distribution. Perhaps OpenMediaVault or FreeBSD would do? Anyway, I'll try with FreeBSD in the evening.


Top
 Profile  
 
PostPosted: Mon Aug 10, 2015 9:24 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6090
OpenMediaVault is basically Debian, AFAIK. It won't hurt to try. I have a bad feeling about FreeBSD in this context. AFAIK it has very limited support for ext2, and no support for xfs. FreeBSD is not Linux, and it uses it's own filesystems.


Top
 Profile  
 
PostPosted: Mon Aug 10, 2015 10:41 am 
Offline

Joined: Sun May 17, 2015 11:00 am
Posts: 20
Location: Internet
Up from 7.0 Unix FreeBSD supports xfs. I even had a xfs based server on FreeBSD 9.0 - 2 TB drive, but I was quite afraid to mount the existing content - I lost unimportant data on my trial drive. With OMV you're absolutely right. In the evening I'll try with OMV and check if it works.


Top
 Profile  
 
PostPosted: Wed Aug 12, 2015 3:54 am 
Offline

Joined: Sun May 17, 2015 11:00 am
Posts: 20
Location: Internet
OK with OpenMediaVault (OMV) almost works like charm!
the successful code is:
Code:
# mount -o ro -t xfs /dev/sdc2  /mnt/rec

And so:
Code:
# cat /proc/self/mounts

gives successful response, which is:
Code:
/dev/sdc2 /mnt/rec xfs ro,relatime,attr2,delaylog,noquota 0 0

Unfortunately, OMV doesn't display it straight away in webface as probably OMV still treats the mounted drive as a "linux_raid_member":
Code:
 # blkid
/dev/sda1: SEC_TYPE="msdos" UUID="0206-C8E4" TYPE="vfat"
/dev/sdb1: UUID="C268E55768E54B2D" TYPE="ntfs"
/dev/sdb5: UUID="6AC001EFC001C275" TYPE="ntfs"
/dev/sdc1: UUID="257688ca-08bf-45e7-a598-9baeec864a41" TYPE="ext2"
/dev/sdc2: TYPE="linux_raid_member"
/dev/sdd1: UUID="f7eadb7b-7408-47ff-bfd4-769bd40d0467" TYPE="ext4"
/dev/sdd5: UUID="38f12585-4986-49e3-b44d-5943eedb967e" TYPE="swap"

so in the evening I'm gonna try to push 1 TB of files via rsync.
Now I've got to set out to work. So far, so good.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group