[SOLVED] How to mount internal SingleDrive volume externally

Questions about SNMP, Power, System, Logs, disk, & RAID.
giantstorage
Starting out
Posts: 11
Joined: Mon Aug 10, 2015 7:11 pm

[SOLVED] How to mount internal SingleDrive volume externally

Post by giantstorage »

Hiho,

at first my situation, then a few questions which hopefully someone can answer me :)

I have a TS-469L (firmware 4.1.4 20150804) with three harddrives (2x4TB, 1x2.5TB) and about 8TB used disk space. Each disk has its own SingleDrive storage pool. I configured no RAID.

Now I like to put four new 6TB drives into the NAS and span a RAID 5 over these new drives and to copy my data to the new RAID.

I have an eSATA case and USB docking station and thought I could attach the old drives externally to copy the data to the freshly built RAID 5. After that I like to format the old drives for external backup usage, so I just need to get this working one time to copy the data.

For testing purposes I removed one drive and connected it externally (USB and eSATA didn't make a difference).

Unfortunately the NAS does not detect the volume of the external drive. It just detects a few (strange) partitions, some of them not mountable, some others have an ext3 filesystem which is obviously for internal usage.

I am quite used to Linux (but no storage/RAID expert) and do not fear the command line, so I tried my luck to get the external volume mounted manually - but without luck ;)

Now my questions:

1) Is there a better way of accomplishing my task?
2) How can I mount a QNAP volume from an external disk?

For the second question, that's how far I got up to now:

Obviously QNAP uses md software raid in conjunction with lvm.

My drive is /dev/sdc and from taking a look at the other active volumes I saw that the 3rd partition is the interesting one.

I got the RAID assembled and mdadm reports this:

Code: Select all

% mdadm --assemble /dev/md42 /dev/sdc3
% mdadm -D /dev/md42
/dev/md42:
        Version : 1.0
  Creation Time : Sat Aug 16 12:44:22 2014
     Raid Level : raid1
     Array Size : 2431935616 (2319.27 GiB 2490.30 GB)
  Used Dev Size : 2431935616 (2319.27 GiB 2490.30 GB)
   Raid Devices : 1
  Total Devices : 1
    Persistence : Superblock is persistent

    Update Time : Mon Aug 10 12:17:00 2015
          State : clean 
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           Name : 3
           UUID : 33166a62:1fec0f43:1b2d877f:3a0fbc11
         Events : 2

    Number   Major   Minor   RaidDevice State
       0       8       35        0      active sync   /dev/sdc3
Looks good to me.

The /dev/sdc3 partition itself can't be mounted directly because lvm manages the volumes. With help from searching the Internet I found some information to get the volumes working and tried this:

Code: Select all

% vgscan --mknodes
% lvchange -a y /dev/vg3/lv3
% lvdisplay /dev/vg3
  --- Logical volume ---
  LV Path                /dev/vg3/lv546
  LV Name                lv546
  VG Name                vg3
  LV UUID                NVyN2k-kdS2-Y2ro-f7S3-uNpR-B5FM-snwIPK
  LV Write Access        read/write
  LV Creation host, time barrel, 2014-08-16 12:44:25 +0200
  LV Status              NOT available
  LV Size                20.00 GiB
  Current LE             5120
  Segments               1
  Allocation             inherit
  Read ahead sectors     4096
   
  --- Logical volume ---
  LV Name                tp3
  VG Name                vg3
  LV UUID                kADvrd-WEz2-a2fm-Kx3x-q9pb-8T2L-5mEJyp
  LV Write Access        read/write
  LV Creation host, time barrel, 2014-08-16 12:44:31 +0200
  LV Pool transaction ID 1
  LV Pool metadata       tp3_tmeta
  LV Pool data           tp3_tdata
  LV Pool chunk size     1.00 MiB
  LV Zero new blocks     yes
  LV Status              NOT available
  LV Size                2.23 TiB
  Allocated pool chunks  0
  Current LE             584518
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
   
  --- Logical volume ---
  LV Path                /dev/vg3/lv3
  LV Name                lv3
  VG Name                vg3
  LV UUID                zFDh8M-HY6Y-3e0w-4708-ghte-GCeW-1kfcUy
  LV Write Access        read/write
  LV Creation host, time barrel, 2014-08-16 12:44:33 +0200
  LV Pool name           tp3
  LV Status              available
  # open                 0
  LV Size                2.23 TiB
  Mapped size            100.00%
  Mapped sectors         4784168960
  Current LE             584005
  Segments               1
  Allocation             inherit
  Read ahead sectors     4096
  Block device           253:15
So the vg3/lv3 volume seems to be my baby.

But I couldn't mount it:

Code: Select all

% mkdir -p /mnt/lvm
% dmesg -c
% mount -o ro /dev/vg3/lv3 /mnt/lvm

mount: wrong fs type, bad option, bad superblock on /dev/mapper/vg3-lv3,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

% dmesg
[ 5880.950289] EXT3-fs (dm-15): error: couldn't mount because of unsupported optional features (2c0)
The original volumes are mounted differently using /dev/mapper/cachedevN, so probably that's the secrect, but I couldn't get a clue about this.

I appreciate any help and can provide more information if you need it!

Thanks!
Last edited by giantstorage on Tue Aug 11, 2015 5:14 am, edited 2 times in total.
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: How to mount internal SingleDrive volume externally

Post by pwilson »

giantstorage wrote:Hiho,

at first my situation, then a few questions which hopefully someone can answer me :)

I have a TS-469L (firmware 4.1.4 20150804) with three harddrives (2x4TB, 1x2.5TB) and about 8TB used disk space. Each disk has its own SingleDrive storage pool. I configured no RAID.

Now I like to put four new 6TB drives into the NAS and span a RAID 5 over these new drives and to copy my data to the new RAID.

I have an eSATA case and USB docking station and thought I could attach the old drives externally to copy the data to the freshly built RAID 5. After that I like to format the old drives for external backup usage, so I just need to get this working one time to copy the data.

For testing purposes I removed one drive and connected it externally (USB and eSATA didn't make a difference).

Unfortunately the NAS does not detect the volume of the external drive. It just detects a few (strange) partitions, some of them not mountable, some others have an ext3 filesystem which is obviously for internal usage.

I am quite used to Linux (but no storage/RAID expert) and do not fear the command line, so I tried my luck to get the external volume mounted manually - but without luck ;)

Now my questions:

1) Is there a better way of accomplishing my task?
2) How can I mount a QNAP volume from an external disk?

For the second question, that's how far I got up to now:

Obviously QNAP uses md software raid in conjunction with lvm.

My drive is /dev/sdc and from taking a look at the other active volumes I saw that the 3rd partition is the interesting one.

I got the RAID assembled and mdadm reports this:

Code: Select all

% mdadm --assemble /dev/md42 /dev/sdc3
% mdadm -D /dev/md42
/dev/md42:
        Version : 1.0
  Creation Time : Sat Aug 16 12:44:22 2014
     Raid Level : raid1
     Array Size : 2431935616 (2319.27 GiB 2490.30 GB)
  Used Dev Size : 2431935616 (2319.27 GiB 2490.30 GB)
   Raid Devices : 1
  Total Devices : 1
    Persistence : Superblock is persistent

    Update Time : Mon Aug 10 12:17:00 2015
          State : clean 
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           Name : 3
           UUID : 33166a62:1fec0f43:1b2d877f:3a0fbc11
         Events : 2

    Number   Major   Minor   RaidDevice State
       0       8       35        0      active sync   /dev/sdc3
Looks good to me.

The /dev/sdc3 partition itself can't be mounted directly because lvm manages the volumes. With help from searching the Internet I found some information to get the volumes working and tried this:

Code: Select all

% vgscan --mknodes
% lvdisplay /dev/vg3
  --- Logical volume ---
  LV Path                /dev/vg3/lv546
  LV Name                lv546
  VG Name                vg3
  LV UUID                NVyN2k-kdS2-Y2ro-f7S3-uNpR-B5FM-snwIPK
  LV Write Access        read/write
  LV Creation host, time barrel, 2014-08-16 12:44:25 +0200
  LV Status              NOT available
  LV Size                20.00 GiB
  Current LE             5120
  Segments               1
  Allocation             inherit
  Read ahead sectors     4096
   
  --- Logical volume ---
  LV Name                tp3
  VG Name                vg3
  LV UUID                kADvrd-WEz2-a2fm-Kx3x-q9pb-8T2L-5mEJyp
  LV Write Access        read/write
  LV Creation host, time barrel, 2014-08-16 12:44:31 +0200
  LV Pool transaction ID 1
  LV Pool metadata       tp3_tmeta
  LV Pool data           tp3_tdata
  LV Pool chunk size     1.00 MiB
  LV Zero new blocks     yes
  LV Status              NOT available
  LV Size                2.23 TiB
  Allocated pool chunks  0
  Current LE             584518
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
   
  --- Logical volume ---
  LV Path                /dev/vg3/lv3
  LV Name                lv3
  VG Name                vg3
  LV UUID                zFDh8M-HY6Y-3e0w-4708-ghte-GCeW-1kfcUy
  LV Write Access        read/write
  LV Creation host, time barrel, 2014-08-16 12:44:33 +0200
  LV Pool name           tp3
  LV Status              available
  # open                 0
  LV Size                2.23 TiB
  Mapped size            100.00%
  Mapped sectors         4784168960
  Current LE             584005
  Segments               1
  Allocation             inherit
  Read ahead sectors     4096
  Block device           253:15
So the vg3/lv3 volume seems to be my baby.

But I couldn't mount it:

Code: Select all

% mkdir -p /mnt/lvm
% dmesg -c
% mount -o ro /dev/vg3/lv3 /mnt/lvm

mount: wrong fs type, bad option, bad superblock on /dev/mapper/vg3-lv3,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

% dmesg
[ 5880.950289] EXT3-fs (dm-15): error: couldn't mount because of unsupported optional features (2c0)
The original volumes are mounted differently using /dev/mapper/cachedevN, so probably that's the secrect, but I couldn't get a clue about this.

I appreciate any help and can provide more information if you need it!

Thanks!
When you attach your previously internal drive as an external drive, it will mount as /share/USBDisk1, /share/USBDisk2, /share/USBDisk3, etc. You data is stored on /share/USBDisk3. (3rd partition on the external drive).

Lets look at an example:

Code: Select all

parted /dev/sda print
Model: WDC WD30EFRX-68EUZN0 (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system     Name     Flags
 1      20.5kB  543MB   543MB   ext3            primary
 2      543MB   1086MB  543MB                   primary
 3      1086MB  2991GB  2990GB                  primary
 4      2991GB  2992GB  543MB   ext3            primary
 5      2992GB  3001GB  8554MB  linux-swap(v1)  primary
You'll note partition #3 is 2990GB in size.

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
giantstorage
Starting out
Posts: 11
Joined: Mon Aug 10, 2015 7:11 pm

Re: How to mount internal SingleDrive volume externally

Post by giantstorage »

Hi Patrick,

thanks for your quick reply!

Unfortunately I don't have a /share/USBDisk3 mountpoint and the 3rd partition does not have a ext3 filesystem (at least not directly).

That's the storage information from the Disk3 partition (attached via eSATA):

Image

That's my "mount" output:

Code: Select all

% mount
none on /new_root type tmpfs (rw,mode=0755,size=200M)
/proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /tmp type tmpfs (rw,size=64M)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/bus/usb type usbfs (rw)
/dev/md9 on /mnt/HDA_ROOT type ext3 (rw,data=ordered)
/dev/mapper/cachedev1 on /share/CACHEDEV1_DATA type ext4 (rw,usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,delalloc,noacl)
/dev/mapper/cachedev2 on /share/CACHEDEV2_DATA type ext4 (rw,usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,delalloc,noacl)
/dev/sdc1 on /share/external/DEV3501_1 type ext3 (rw)
/dev/sdc4 on /share/external/DEV3501_4 type ext3 (rw)
/dev/md13 on /mnt/ext type ext3 (rw,data=ordered)
nfsd on /proc/fs/nfsd type nfsd (rw)
I think we're missing some lvm stuff here...
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: How to mount internal SingleDrive volume externally

Post by pwilson »

[quote="giantstorage"]Hi Patrick,

thanks for your quick reply!

Unfortunately I don't have a /share/USBDisk3 mountpoint and the 3rd partition does not have a ext3 filesystem (at least not directly).

That's the storage information from the Disk3 partition (attached via eSATA):

Image

That's my "mount" output:

Code: Select all

% mount
none on /new_root type tmpfs (rw,mode=0755,size=200M)
/proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /tmp type tmpfs (rw,size=64M)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/bus/usb type usbfs (rw)
/dev/md9 on /mnt/HDA_ROOT type ext3 (rw,data=ordered)
/dev/mapper/cachedev1 on /share/CACHEDEV1_DATA type ext4 (rw,usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,delalloc,noacl)
/dev/mapper/cachedev2 on /share/CACHEDEV2_DATA type ext4 (rw,usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,delalloc,noacl)
/dev/sdc1 on /share/external/DEV3501_1 type ext3 (rw)
/dev/sdc4 on /share/external/DEV3501_4 type ext3 (rw)
/dev/md13 on /mnt/ext type ext3 (rw,data=ordered)
nfsd on /proc/fs/nfsd type nfsd (rw)
I think we're missing some lvm stuff here...[/quote

Lets see the partition table on that drive:

Code: Select all

parted /dev/sdc print

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: How to mount internal SingleDrive volume externally

Post by pwilson »

[quote="giantstorage"]Hi Patrick,

thanks for your quick reply!

Unfortunately I don't have a /share/USBDisk3 mountpoint and the 3rd partition does not have a ext3 filesystem (at least not directly).

That's the storage information from the Disk3 partition (attached via eSATA):

Image

That's my "mount" output:

Code: Select all

% mount
none on /new_root type tmpfs (rw,mode=0755,size=200M)
/proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /tmp type tmpfs (rw,size=64M)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/bus/usb type usbfs (rw)
/dev/md9 on /mnt/HDA_ROOT type ext3 (rw,data=ordered)
/dev/mapper/cachedev1 on /share/CACHEDEV1_DATA type ext4 (rw,usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,delalloc,noacl)
/dev/mapper/cachedev2 on /share/CACHEDEV2_DATA type ext4 (rw,usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,delalloc,noacl)
/dev/sdc1 on /share/external/DEV3501_1 type ext3 (rw)
/dev/sdc4 on /share/external/DEV3501_4 type ext3 (rw)
/dev/md13 on /mnt/ext type ext3 (rw,data=ordered)
nfsd on /proc/fs/nfsd type nfsd (rw)
I think we're missing some lvm stuff here...[/quote

Lets see the partition table on that drive:

Code: Select all

parted /dev/sdc print
It looks like you have 2 RAID volumes. You claimed no RAID was in play previously.

Please provide output for:

Code: Select all

cat /proc/mdstat

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
giantstorage
Starting out
Posts: 11
Joined: Mon Aug 10, 2015 7:11 pm

Re: How to mount internal SingleDrive volume externally

Post by giantstorage »

Hi Patrick,

at first thanks a lot for your support!

Here is the output:

Code: Select all

# parted /dev/sdc print
Model: WDC WD25EZRX-00MMMB0 (scsi)
Disk /dev/sdc: 2500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system     Name     Flags
 1      20.5kB  543MB   543MB   ext3            primary
 2      543MB   1086MB  543MB                   primary
 3      1086MB  2491GB  2490GB                  primary
 4      2491GB  2492GB  543MB   ext3            primary
 5      2492GB  2500GB  8554MB  linux-swap(v1)  primary

# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] 
md42 : active raid1 sdc3[0]
         2431935616 blocks super 1.0 [1/1] [U]
         
md2 : active raid1 sdb3[0]
         3897063616 blocks super 1.0 [1/1] [U]
         
md1 : active raid1 sda3[0]
         3897063616 blocks super 1.0 [1/1] [U]
         
md256 : active raid1 sdb2[1] sda2[0]
         530112 blocks super 1.0 [2/2] [UU]
         bitmap: 0/1 pages [0KB], 65536KB chunk

md13 : active raid1 sda4[0] sdb4[24]
         458880 blocks super 1.0 [24/2] [UU______________________]
         bitmap: 1/1 pages [4KB], 65536KB chunk

md9 : active raid1 sda1[0] sdb1[24]
         530112 blocks super 1.0 [24/2] [UU______________________]
         bitmap: 1/1 pages [4KB], 65536KB chunk

unused devices: <none>
Thanks!
giantstorage
Starting out
Posts: 11
Joined: Mon Aug 10, 2015 7:11 pm

Re: How to mount internal SingleDrive volume externally

Post by giantstorage »

Just a follow up: with "no RAID volumes" I meant I don't have any RAID spanned over these three drives and just added SingleDrive volumes for each harddisk. I was not aware that QNAP obviously creates RAID 1 behind the scenes for those...
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: How to mount internal SingleDrive volume externally

Post by pwilson »

giantstorage wrote:Hi Patrick,

at first thanks a lot for your support!

Here is the output:

Code: Select all

# parted /dev/sdc print
Model: WDC WD25EZRX-00MMMB0 (scsi)
Disk /dev/sdc: 2500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system     Name     Flags
 1      20.5kB  543MB   543MB   ext3            primary
 2      543MB   1086MB  543MB                   primary
 3      1086MB  2491GB  2490GB                  primary
 4      2491GB  2492GB  543MB   ext3            primary
 5      2492GB  2500GB  8554MB  linux-swap(v1)  primary

# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] 
md42 : active raid1 sdc3[0]
         2431935616 blocks super 1.0 [1/1] [U]
         
md2 : active raid1 sdb3[0]
         3897063616 blocks super 1.0 [1/1] [U]
         
md1 : active raid1 sda3[0]
         3897063616 blocks super 1.0 [1/1] [U]
         
md256 : active raid1 sdb2[1] sda2[0]
         530112 blocks super 1.0 [2/2] [UU]
         bitmap: 0/1 pages [0KB], 65536KB chunk

md13 : active raid1 sda4[0] sdb4[24]
         458880 blocks super 1.0 [24/2] [UU______________________]
         bitmap: 1/1 pages [4KB], 65536KB chunk

md9 : active raid1 sda1[0] sdb1[24]
         530112 blocks super 1.0 [24/2] [UU______________________]
         bitmap: 1/1 pages [4KB], 65536KB chunk

unused devices: <none>
Thanks!
/dev/sdc now seems to be part of a RAID array. Sorry, but can't tell what you did, and therefore can't help you fix it. Restore your data from your most recent NAS Backup instead.

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
giantstorage
Starting out
Posts: 11
Joined: Mon Aug 10, 2015 7:11 pm

Re: How to mount internal SingleDrive volume externally

Post by giantstorage »

Hi Patrick,

yes it is part of a RAID because I assembled it manually because the OS ignored the RAID on the external disk completely. All commands I used for this are in my first post.

I will now put the disk into the internal bay again and see if I broke anything, although all operations should have been "read only" in my opinion. At least attaching it externally (where QNAP mounts these two ext3 partitions) and the putting it internal again does not break anything. I tested that already. But now I will check if any of my mdadm commands did something harmful. And if yes, that's no big problem, because this disk is the backup disk of my other workstations here, that's why I used this one for my tests.

Do you have any idea how to get this QNAP SingleDisk RAID1 accessed externally? If not by attaching it to the QNAP, then by attaching it to an Ubuntu Linux box? Hey it's all Linux, there must be a way to access this data, or not? ;)

Thanks again for your support!
giantstorage
Starting out
Posts: 11
Joined: Mon Aug 10, 2015 7:11 pm

Re: How to mount internal SingleDrive volume externally

Post by giantstorage »

Hi Patrick,

Ok, disk is mounted internally again and works pretty well, so no data destroyed ;)

Nevertheless I don't understand what's going wrong here.

I can't remember what I did when attaching the drives the first time to the NAS. I am pretty sure I just followed a wizzard to create this single disk volumes...

These are the screenshots of "Storage Pools" and "Volumes" view of this disk:

Image
Image

Is there anything wrong with it? And if yes, what can I do to make it work as an external disk?

Thanks!
giantstorage
Starting out
Posts: 11
Joined: Mon Aug 10, 2015 7:11 pm

Re: How to mount internal SingleDrive volume externally

Post by giantstorage »

Probably I have to try what's suggested here?

http://forum.qnap.com/viewtopic.php?t=79123

Because I have the same kernel error message "unsupported optional features (2c0)".
giantstorage
Starting out
Posts: 11
Joined: Mon Aug 10, 2015 7:11 pm

Re: How to mount internal SingleDrive volume externally

Post by giantstorage »

Just edited my first post and added a line in the lvm activation part: (just in case it makes a difference ;)

Code: Select all

lvchange -a y /dev/vg3/lv3
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: How to mount internal SingleDrive volume externally

Post by pwilson »

giantstorage wrote:Hi Patrick,

at first thanks a lot for your support!

Here is the output:

Code: Select all

# parted /dev/sdc print
Model: WDC WD25EZRX-00MMMB0 (scsi)
Disk /dev/sdc: 2500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system     Name     Flags
 1      20.5kB  543MB   543MB   ext3            primary
 2      543MB   1086MB  543MB                   primary
 3      1086MB  2491GB  2490GB                  primary
 4      2491GB  2492GB  543MB   ext3            primary
 5      2492GB  2500GB  8554MB  linux-swap(v1)  primary

# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] 
md42 : active raid1 sdc3[0]
         2431935616 blocks super 1.0 [1/1] [U]
         
md2 : active raid1 sdb3[0]
         3897063616 blocks super 1.0 [1/1] [U]
         
md1 : active raid1 sda3[0]
         3897063616 blocks super 1.0 [1/1] [U]
         
md256 : active raid1 sdb2[1] sda2[0]
         530112 blocks super 1.0 [2/2] [UU]
         bitmap: 0/1 pages [0KB], 65536KB chunk

md13 : active raid1 sda4[0] sdb4[24]
         458880 blocks super 1.0 [24/2] [UU______________________]
         bitmap: 1/1 pages [4KB], 65536KB chunk

md9 : active raid1 sda1[0] sdb1[24]
         530112 blocks super 1.0 [24/2] [UU______________________]
         bitmap: 1/1 pages [4KB], 65536KB chunk

unused devices: <none>
Thanks!
Looks like /dev/sdc is part of md42. Is it mounted?

If it isn't, you can try the following:

Code: Select all

mkdir /share/Public/d3p3
mount -t ext4 /dev/md42 /share/Public/d3p3

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
giantstorage
Starting out
Posts: 11
Joined: Mon Aug 10, 2015 7:11 pm

Re: How to mount internal SingleDrive volume externally

Post by giantstorage »

Hi Patrick,

direct access of the partition doesn't work. lvm is definitely required (as I mentioned in my first post).
Trying to mount the partition directly results in something like this:

Code: Select all

# mkdir /tmp/d3p3
# mount -o ro -t ext4 /dev/sdc3 /tmp/d3p3
mount: wrong fs type, bad option, bad superblock on /dev/sdd3,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
# dmesg | tail -1
[  391.063243] EXT4-fs (sdd3): VFS: Can't find ext4 filesystem
That's why I digged deeper into this and added the lvm stuff - which results
in this 2c0 kernel error message...

In the meantime I found out that I probably mixed up the "original" lvm
setup from the NAS with my "on the fly" detection of the lvm on the
external device. So the "vgscan" didn't really made something useful
and "vg3" was the original volume group from the original NAS configuration
(probably pointing to a missing physical device).

So I just attached the drive to a Debian 8 box and tried to discover the RAID
and LVM configuration there.

Looked good at a first glance, but unfortunately the QNAP system activated
LVM features which are not available at vanilla Debian (probably I need to
switch to a newer kernel, will investigate on this...):

RAID is detected automatically Ok:

Code: Select all

% cat /proc/mdstat 
Personalities : [raid1] 
md321 : active (auto-read-only) raid1 sdb5[0]
      8353728 blocks super 1.0 [2/1] [U_]
      bitmap: 1/1 pages [4KB], 65536KB chunk

md13 : active (auto-read-only) raid1 sdb4[25]
      458880 blocks super 1.0 [24/1] [__U_____________________]
      bitmap: 1/1 pages [4KB], 65536KB chunk

md3 : active (auto-read-only) raid1 sdb3[0]
      2431935616 blocks super 1.0 [1/1] [U]
      
md256 : inactive sdb2[2](S)
      530124 blocks super 1.0
       
md9 : active (auto-read-only) raid1 sdb1[25]
      530112 blocks super 1.0 [24/1] [__U_____________________]
      bitmap: 1/1 pages [4KB], 65536KB chunk

unused devices: <none>

But LVM complains about a missing "thick" feature:

Code: Select all

% lvchange -a y /dev/vg3/lv3
  WARNING: Unrecognised segment type thick
  Refusing activation of LV lv3 containing an unrecognised segment.
So I have to do this on the NAS and try to find out how to
get rid of this volume group mixup with internal/external configuration.

Probably I can find a configuration file, where the physical device is
mapped and I can change this to point on the external device or
something like that.

The journey continues... ;)
User avatar
pwilson
Guru
Posts: 22533
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: How to mount internal SingleDrive volume externally

Post by pwilson »

Good luck with your Journey....

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.
Locked

Return to “System & Disk Volume Management”