Mounting a Single Disk Outside Asustor

This is where you can find the latest ADM official release. Feel free to discuss any questions regarding it here.

Moderator: Lillian.W@AST

Abathorn
Posts: 11
youtube meble na wymiar Warszawa
Joined: Fri Jun 10, 2022 10:05 pm

Mounting a Single Disk Outside Asustor

Post by Abathorn »

Hi, I will like to know if it is possible using a Linux machine and mdadm a single disk with no RAID. The reason is beacause I had an issue with my new NAS i returned to support and obtain a new machine. But when i try to resintall with the old disk it was not possible. THe only alternative the adm give was to format the disk again losing the data inside.

When I try to mount the disk in another linux raise and error.

if i execute sudo fdisk -l

Disk /dev/sdb: 3,65 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: Generic DISK00
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: gpt
Disk identifier: EFEDD788-454E-4145-9006-629456AA1B7F

Device Start End Sectors Size Type
/dev/sdb1 2048 524287 522240 255M Linux filesystem
/dev/sdb2 524288 4718591 4194304 2G Linux RAID
/dev/sdb3 4718592 8912895 4194304 2G Linux RAID
/dev/sdb4 8912896 7814035455 7805122560 3,6T Linux RAID


Disk /dev/md127: 3,65 TiB, 3996087484416 bytes, 7804858368 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


It is a way to mount /dev/sdb4 where my files are located? Someone can help me or rediect me to someone that can?

Thank you
User avatar
father.mande
Posts: 1815
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: Mounting a Single Disk Outside Asustor

Post by father.mande »

Hi,

Did you try simply to reassemble the Raid (single = Raid1 with only one disk in Asustor) ? ; then mount the Raid
mdadm is use to assemble the Raid, then mount (normally recognize ext4 or btrfs automatically (ex. in Ubuntu 2004))
ex.
... at this time I do a check of bad blocks on /dev/sdb but not mandatory
mdadm --examine /dev/sdb4
... analyse the result
then
mdadm --assemble /dev/mdX /dev/sdb4
mount /dev/mdX /mnt
(for ex.)

In case of problem and if you have backup try to add : --assume-clean . to the assemble but if you know what you do ... or --run but not really necessary

Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
Abathorn
Posts: 11
Joined: Fri Jun 10, 2022 10:05 pm

Re: Mounting a Single Disk Outside Asustor

Post by Abathorn »

father.mande wrote:Hi,

Did you try simply to reassemble the Raid (single = Raid1 with only one disk in Asustor) ? ; then mount the Raid
mdadm is use to assemble the Raid, then mount (normally recognize ext4 or btrfs automatically (ex. in Ubuntu 2004))
ex.
... at this time I do a check of bad blocks on /dev/sdb but not mandatory
mdadm --examine /dev/sdb4
... analyse the result
then
mdadm --assemble /dev/mdX /dev/sdb4
mount /dev/mdX /mnt
(for ex.)

In case of problem and if you have backup try to add : --assume-clean . to the assemble but if you know what you do ... or --run but not really necessary

Philippe.
Hi, thank you very much for your answer Phillipe. I was on a trip and was not able to try before.

What do you mean with "Did you try simply to reassemble the Raid (single = Raid1 with only one disk in Asustor) ?"? Maybe is something i missing here. When I try to introduce the disk normally in the Asustor the system tell me it is needed to delete the data within the disk. And I will like to recover the data inside.

I try what you mention:

mdadm --examine /dev/sdb4

Code: Select all

/dev/sdb4:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 5f0cb7f6:f0ea5da4:2d8e66dd:91d864eb
           Name : Nas-Carmonas:3
  Creation Time : Thu Jul 28 18:54:13 2022
     Raid Level : raid1
   Raid Devices : 1

 Avail Dev Size : 7804858368 (3721.65 GiB 3996.09 GB)
     Array Size : 3902429184 (3721.65 GiB 3996.09 GB)
    Data Offset : 264192 sectors
   Super Offset : 8 sectors
   Unused Space : before=263912 sectors, after=0 sectors
          State : clean
    Device UUID : d36722ae:827a2505:1e22b833:761dadc5

    Update Time : Thu Aug  4 12:05:43 2022
  Bad Block Log : 512 entries available at offset 264 sectors
       Checksum : 3042f5fc - correct
         Events : 5


   Device Role : Active device 0
   Array State : A ('A' == active, '.' == missing, 'R' == replacing)
And then later this:
mdadm --assemble /dev/mdX /dev/sdb4
But I get this result:

Code: Select all

mdadm: /dev/sdb4 is busy - skipping
Any clue how can i follow? Thanks very much for your help
User avatar
father.mande
Posts: 1815
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: Mounting a Single Disk Outside Asustor

Post by father.mande »

Hi,

mdX (the X is just an example ...) ... but on your NAS, I think it's /dev/md1 ... and on an external system it's must be some free /dev/md (0,1, 2 or whatever)

BUT based on examine seem that the raid 1 was mounted automatically (last lines of examine) ... Active and Array active ...

please do command to verify :
cat /proc/mdstat
mount


Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
Abathorn
Posts: 11
Joined: Fri Jun 10, 2022 10:05 pm

Re: Mounting a Single Disk Outside Asustor

Post by Abathorn »

father.mande wrote:Hi,

mdX (the X is just an example ...) ... but on your NAS, I think it's /dev/md1 ... and on an external system it's must be some free /dev/md (0,1, 2 or whatever)

BUT based on examine seem that the raid 1 was mounted automatically (last lines of examine) ... Active and Array active ...

please do command to verify :
cat /proc/mdstat
mount


Philippe.
Thanks for the qucik answer. The linux (linux mint distribution) try to mount the disk automatically but fails.

Here are the results for the commands you mention:

cat /proc/mdstat

Code: Select all

cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md127 : active (auto-read-only) raid1 sdb4[0]
      3902429184 blocks super 1.2 [1/1] [U]
      
unused devices: <none>
mount

Code: Select all

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=3983484k,nr_inodes=995871,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=806140k,mode=755)
/dev/sda2 on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=28,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=16874)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=806136k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/fuse on /run/user/1000/doc type fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
Thanks for your time and help.
User avatar
father.mande
Posts: 1815
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: Mounting a Single Disk Outside Asustor

Post by father.mande »

Hi,

The raid is assembled in read-only, it's certainly Mint that consider the Raid1 as broken (like of second disk)
I suppose the mount is incomplete
... verify if you use btrfs or ext4 (normally ext4 is not used on new models and ext4 is included in Mint base.
... try adding -t btrfs (but a good idea is to verify that you have it ... ex. in Ubuntu 20.04 it's done using "apt install btrfs-progs -y")
hereafter FOR INFORMATION a list off complete mount in case you need (as an example ... it's my structure) ... and you can access share using /volume1 no need of /share), so mounting /dev/md1 can be enough after you use /volume1

Code: Select all

/dev/md1 on /volume1 type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base)
/dev/md1 on /volume1/.@iscsi type btrfs (rw,relatime,space_cache=v2,subvolid=258,subvol=/.iscsi)
/dev/md1 on /volume1/.@plugins type btrfs (rw,relatime,space_cache=v2,subvolid=259,subvol=/.@plugins)
/dev/md1 on /share/home type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/home)
/dev/md1 on /share/Public type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/Public)
/dev/md1 on /share/Web type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/Web)
/dev/md1 on /share/Plex type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/Plex)
/dev/md1 on /share/Media type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/Media)
/dev/md1 on /share/Music type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/Music)
/dev/md1 on /share/test type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/test)
/dev/md1 on /share/Syncthing type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/Syncthing)
/dev/md1 on /share/Octoprint type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/Octoprint)
/dev/md1 on /share/My Video type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/My Video)
/dev/md1 on /share/My Audio type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/My Audio)
Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
Abathorn
Posts: 11
Joined: Fri Jun 10, 2022 10:05 pm

Re: Mounting a Single Disk Outside Asustor

Post by Abathorn »

father.mande wrote:Hi,

The raid is assembled in read-only, it's certainly Mint that consider the Raid1 as broken (like of second disk)
I suppose the mount is incomplete
... verify if you use btrfs or ext4 (normally ext4 is not used on new models and ext4 is included in Mint base.
... try adding -t btrfs (but a good idea is to verify that you have it ... ex. in Ubuntu 20.04 it's done using "apt install btrfs-progs -y")
hereafter FOR INFORMATION a list off complete mount in case you need (as an example ... it's my structure) ... and you can access share using /volume1 no need of /share), so mounting /dev/md1 can be enough after you use /volume1

Code: Select all

/dev/md1 on /volume1 type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base)
/dev/md1 on /volume1/.@iscsi type btrfs (rw,relatime,space_cache=v2,subvolid=258,subvol=/.iscsi)
/dev/md1 on /volume1/.@plugins type btrfs (rw,relatime,space_cache=v2,subvolid=259,subvol=/.@plugins)
/dev/md1 on /share/home type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/home)
/dev/md1 on /share/Public type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/Public)
/dev/md1 on /share/Web type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/Web)
/dev/md1 on /share/Plex type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/Plex)
/dev/md1 on /share/Media type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/Media)
/dev/md1 on /share/Music type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/Music)
/dev/md1 on /share/test type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/test)
/dev/md1 on /share/Syncthing type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/Syncthing)
/dev/md1 on /share/Octoprint type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/Octoprint)
/dev/md1 on /share/My Video type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/My Video)
/dev/md1 on /share/My Audio type btrfs (rw,relatime,space_cache=v2,subvolid=256,subvol=/base/My Audio)
Philippe.
Hi, I think I'm missing out a little bit.

The disk I am trying to mount i think is Ext4. I formated that way if i remember correctly. (BTRFS is already installed in my distribution I checked it)

I am trying this command with the previous instructions. Chaging X for a number.

Code: Select all

mdadm --assemble /dev/md2 /dev/sdb4 
or 
mdadm --assemble /dev/md4 /dev/sdb4 
or even 
mdadm --assemble /dev/md6 /dev/sdb4
And always is saying the same:

Code: Select all

mdadm: /dev/sdb4 is busy - skipping.
I dont' understand to which command i need to add the "-t btrfs"

What do you mean with "you can access share using /volume1 no need of /share), so mounting /dev/md1 can be enough after you use /volume1"? I don't know how to continue from here

Thank you
User avatar
father.mande
Posts: 1815
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: Mounting a Single Disk Outside Asustor

Post by father.mande »

hi,

Sorry I am in travel no NAS or Linux box to test ... near me ... and I had thought that you have skills in Linux / Raid

1 check /proc/mdstat ... if it's same as in your post with content of this file (here before https://forum.asustor.com/posting.php?m ... 86#pr44601 ) the Raid is already assembled as read only and use /dev/md126 ...

so please retry to mount THIS device
mount /dev/md126 /mnt (or other mount point)

In the NAS md126 is used for swap Raid ... so this can generate confusion. ... but use the md generated by Mint ...
BUT sdX4 partition 4 of each disk ... is for the DATA partition.

if you are sure partition is ext4 ... forgot - btrfs and ignore my list of mount ...

Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
Abathorn
Posts: 11
Joined: Fri Jun 10, 2022 10:05 pm

Re: Mounting a Single Disk Outside Asustor

Post by Abathorn »

father.mande wrote:hi,

Sorry I am in travel no NAS or Linux box to test ... near me ... and I had thought that you have skills in Linux / Raid

1 check /proc/mdstat ... if it's same as in your post with content of this file (here before https://forum.asustor.com/posting.php?m ... 86#pr44601 ) the Raid is already assembled as read only and use /dev/md126 ...

so please retry to mount THIS device
mount /dev/md126 /mnt (or other mount point)

In the NAS md126 is used for swap Raid ... so this can generate confusion. ... but use the md generated by Mint ...
BUT sdX4 partition 4 of each disk ... is for the DATA partition.

if you are sure partition is ext4 ... forgot - btrfs and ignore my list of mount ...

Philippe.
Thank you very much Philippe. With this instructions I was able to mount the disk an transfer the file inside the disk to un external harddrive.

Really apreciate your help.

Thanks.
multiki
Posts: 7
Joined: Thu Mar 17, 2022 5:13 pm

Re: Mounting a Single Disk Outside Asustor

Post by multiki »

I mounted the partition, I can see the system files, I can't find the data
Post Reply

Return to “[Official] For AS-60X Series”