Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Sun Jun 24, 2018 8:13 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Wed Sep 18, 2013 6:28 pm 
Offline
Newbie

Joined: Sun Jul 07, 2013 9:59 pm
Posts: 17
I'm installing stock firmware and so need to do backflips to enable root access. I had the thought, why not simply mount the LS rootfs partition from Linux and alter it this way?

(Let's presume /dev/sda is the Linux system, /dev/sdb is the drive removed from the LS.) Parted shows /dev/sdb2 as ext3, but I cannot mount it. It says bad superblock or wrong fs. Linux shows the partition as "raid_member" instead of ext3. On the other hand, /dev/sdb1 shows the same, RAID Member form disk Utility and ext3 from parted--but I can mount and manipulate this partition no sweat.

So my questions are twain: Is it possible to mount /dev/sdb2 without mangling the RAID and journal? What is happening in LS that makes /dev/sdb2 not mountable?

(On a separate topic: If a responder has had success moving to debian from shonk mod, I'd like to know. I'm trying the stock firmware simply to rule out that the shonk mod is my stumbling block. Once I rule out shonk, then I'm thinking my problem may be the version of debootstrap. Cheers!)


Top
   
PostPosted: Wed Sep 18, 2013 10:23 pm 
Offline
Moderator

Joined: Fri Jun 29, 2007 10:39 am
Posts: 2604
Read about "mdadm". Then you should know, why your
experiments are failing (hint: you can't switch between
RAID and non-RAID just by mounting the disk).

_________________
Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

RAID (no matter which level) never ever substitutes a backup. (me)


Top
   
PostPosted: Thu Sep 19, 2013 3:31 am 
Offline
Newbie

Joined: Sun Jul 07, 2013 9:59 pm
Posts: 17
I don't get the idea you are replying to me.

Anyway, as I clearly posted I CAN mount partition 1, I cannot mount partition 2, both are RAID1 members. This is the sort of subtlety that is not simply found by reading about mdadm.


Top
   
PostPosted: Thu Sep 19, 2013 3:40 pm 
Offline
Moderator

Joined: Fri Jun 29, 2007 10:39 am
Posts: 2604
Some of the partitions are part of a RAID array.
You can not access this partitions by simply using
the "mount" command.
You will need mdadm for this, to create a "logical"
partition you can then mount.

_________________
Please do not use private mail (PN/M) to ask questions. Use the proper forum instead. (me)

If there is no verified backup of a dataset, the dataset, by definition, is unimportant. (c't 2012)

RAID (no matter which level) never ever substitutes a backup. (me)


Top
   
PostPosted: Thu Sep 19, 2013 6:11 pm 
Offline
Newbie

Joined: Sun Jul 07, 2013 9:59 pm
Posts: 17
I found my answer: Partition 1 (/boot) is version 0.9 while partition 2 (/) is version 1.2. (mdadm 0.9 puts the RAID info at the end, so the filesytem metadata remains at the beginning of the partition; i.e. you can simply mount the partition. Version 1.2 puts the RAID info at the beginning of the partition and offsets the regular filesystem info; i.e., I need to create a virtual device/partition that begins at the offset rather than the beginning of the partition.)

Knowing this I can setup a loop device at the offset. In this case, 2048 sectors times 512 bytes per sector equals 1048576. (http://unix.stackexchange.com/questions/64889/how-to-mount-recover-data-on-a-disk-that-was-part-of-a-mdadm-raid-1-on-another-m):
Code:
# losetup -f -o 1048576 /dev/sdb2

And then mount the loop device:
Code:
# mount -t ext3 /dev/loop0 usb


I'm not sure yet how to mark the RAID1 metadata such that it copies THIS drive to the OTHER... Maybe it will simply happen, maybe change the clean bit?...

Code:
mickleby@ubuntu:~/ls_series-164$ sudo mdadm -E /dev/sdb1
/dev/sdb1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : f48ebe19:99db0c1c:3d868365:5a24d89a
  Creation Time : Tue Sep 17 00:52:15 2013
     Raid Level : raid1
  Used Dev Size : 1000384 (977.10 MiB 1024.39 MB)
     Array Size : 1000384 (977.10 MiB 1024.39 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0

    Update Time : Wed Sep 18 08:46:27 2013
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 73c190a2 - correct
         Events : 261


      Number   Major   Minor   RaidDevice State
this     0       8        1        0      active sync   /dev/sda1

   0     0       8        1        0      active sync   /dev/sda1
   1     1       8       17        1      active sync   /dev/sdb1
mickleby@ubuntu:~/ls_series-164$ sudo mdadm -E /dev/sdb2
/dev/sdb2:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 60b51021:adf58d8c:812e7417:ddc3be7e
           Name : LS-WVL-EM6F6:1
  Creation Time : Tue Sep 17 00:52:16 2013
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 9998336 (4.77 GiB 5.12 GB)
     Array Size : 4999156 (4.77 GiB 5.12 GB)
  Used Dev Size : 9998312 (4.77 GiB 5.12 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : 523aacea:462bec86:7221b5cc:b2dd6e99

    Update Time : Wed Sep 18 08:46:27 2013
       Checksum : 3c3f572c - correct
         Events : 288


   Device Role : Active device 0
   Array State : AA ('A' == active, '.' == missing)


Top
   
PostPosted: Tue Oct 27, 2015 3:09 am 
Offline
Total Newbie

Joined: Tue Dec 09, 2014 9:09 am
Posts: 2
Hi,
how do I can mount Partition 1 (/boot)? pls help me,
thanks you very much


Top
   
PostPosted: Tue Oct 27, 2015 4:22 pm 
Online
Moderator

Joined: Mon Apr 26, 2010 10:24 am
Posts: 2731
Code:
root@DUO:~# file -s /dev/sda1
/dev/sda1: Linux rev 1.0 ext3 filesystem data (needs journal recovery) (large files)


You have to mount ext3

example for linkstation- harddrive sdb

Code:
e2fsck /dev/sdb1
mkdir /mnt/test
mount /dev/sdb1 /mnt/test
ls -l /mnt/test


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 3 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:
cron
Powered by phpBB® Forum Software © phpBB Limited