Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: jgrulich on February 09, 2016, 03:26:29 PM
-
I've connected my new NAS 2000GB HDD to the piCore 7.0 and found strange behavior.
I've made two partitions on it, one is 500GB and the second is 1,5TB. Both of them are ext4.
The first one works normally when mounted. HDD activity LED flashes only when some action occurs.
But when I mount the second one, there is some continuous system communication with it.
In top it is listed as "usb-storage" and consumes something about 0.5% of CPU usage.
The HDD activity LED flashes continuously and HDD never goes into the sleep mode.
My question is if there is some system limitation about the HDD capacity, or it's caused by something else.
-
hi jgrulich,
I'd be interested in output from "fdisk -ul" and "blkid".
regards
Greg
-
Hi Greg,
The log is attached.
Regards,
Jan
-
I thought the limit for an mbr formatted hd was 2tb per partition, but it might be worth formatting the hd with gpt to see if that changes things?
-
I've tried to reduce the size with resize2fs down to 470GB and it works, than I've increased it to 980GB and it doesn't work again.
The limit is somewhere between, but need to recognize the reason.
-
Seems that it's related to the ext4 filesystem. I've used ntfs and everything works fine.
Béla,
is there full version of the ext4 support in the piCore, or is it some light version with some limitations?
-
Seems that it's related to the ext4 filesystem. I've used ntfs and everything works fine.
Béla,
is there full version of the ext4 support in the piCore, or is it some light version with some limitations?
There are no limitations, but you can check the kernel .config file.
-
Than why ext4 is not working? Ntfs is working, but it's read only system.
I need it for NFS use and it's not therefor solution.
-
Have you tried to format with another block size ?
-
Can't edit my previous post so I add my comment to this instead.
Why not post the output of dumpe2fs to see the difference between the working one and the one that fails.
dumpe2fs -h /dev/sda1
-
Did you check it with fsck?
What is happening when you are formatting it? Is it successful or there are error messages?
Are there messages in dmesg related to the partition?
-
Can't edit my previous post so I add my comment to this instead.
Why not post the output of dumpe2fs to see the difference between the working one and the one that fails.
dumpe2fs -h /dev/sda1
The result is attached, don't see any difference.
-
Did you check it with fsck?
What is happening when you are formatting it? Is it successful or there are error messages?
Are there messages in dmesg related to the partition?
There is no error during formatting and the fsck is fine too.
tc@RaspiBox:~$ fsck /dev/sda1
fsck 1.42.11 (09-Jul-2014)
e2fsck 1.42.13 (17-May-2015)
/dev/sda1: clean, 11/100409344 files, 6352347/401624992 blocks
tc@RaspiBox:~$ fsck /dev/sda2
fsck 1.42.11 (09-Jul-2014)
e2fsck 1.42.13 (17-May-2015)
/dev/sda2: clean, 11/21692416 files, 1411271/86753008 blocks
and this is mentioned in the dmesg:
[ 3.372727] usb 1-1.3.3: new high-speed USB device number 6 using dwc_otg
[ 3.514954] usb 1-1.3.3: New USB device found, idVendor=174c, idProduct=55aa
[ 3.514998] usb 1-1.3.3: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[ 3.515018] usb 1-1.3.3: Product: AS2115
[ 3.515037] usb 1-1.3.3: Manufacturer: ASMedia
[ 3.515055] usb 1-1.3.3: SerialNumber: 20140324000806
[ 3.522081] usb-storage 1-1.3.3:1.0: USB Mass Storage device detected
[ 3.533119] usb-storage 1-1.3.3:1.0: Quirks match for vid 174c pid 55aa: 400000
[ 3.533915] scsi host0: usb-storage 1-1.3.3:1.0
[ 4.533984] scsi 0:0:0:0: Direct-Access ASMedia AS2115 0 PQ: 0 ANSI: 6
[ 4.535862] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
[ 4.535905] sd 0:0:0:0: [sda] 4096-byte physical blocks
[ 4.537705] sd 0:0:0:0: [sda] Write Protect is off
[ 4.537756] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 4.538672] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 8.478350] sda: sda1 sda2
[ 8.485765] sd 0:0:0:0: [sda] Attached SCSI disk
-
So partitions looks OK and error free, but mount fails. Which mount are you using? See
which mount
command output.
In piCore 7.0 default mount is the utillinux mount
/bin/mount
BusyBox applet also available as
busybox.suid mount
Try each of them explicitely specifying mount command.
-
Now it works. I've used interactive
sudo parted
and percentage division of the disc space to have optimal alignment.
Than I've
sudo mkfs.ext4 /dev/sda1
and
sudo rebuildfstab
Than the regular
mount /mnt/sda1
works fine.
The strange LED flashing was there again, but found that in the
top
is some background root service like [ext4...]
Probably some indexing service which took some hours and now it's no more there and LED flashing disappeared.
This service is probably not run for small discs and therefor not visible.
-
/dev/sda1 ? Wasn't the issue with /dev/sda2?
-
Hi jgrulich
---- snip ----
sudo mkfs.ext4 /dev/sda1
---- snip ----
The strange LED flashing was there again, but found that in the
top
is some background root service like [ext4...]
Probably some indexing service which took some hours and now it's no more there and LED flashing disappeared.
This service is probably not run for small discs and therefor not visible.
Was the background service ext4lazyinit by any chance? See:
https://www.thomas-krenn.com/en/wiki/Ext4_Filesystem#Lazy_Initialization
-
/dev/sda1 ? Wasn't the issue with /dev/sda2?
Béla,
yes, it was sda2 before. Now I've swapped the partitions (sda2 to sda1) to have the main one as a first when used parted.
No another difference.
-
Hi jgrulich
Was the background service ext4lazyinit by any chance? See:
https://www.thomas-krenn.com/en/wiki/Ext4_Filesystem#Lazy_Initialization
Yes, you're right. That was the running service.
-
I'm -still- not a raspberry pi user and I don't have any multi-terabyte storage devices, but I have to ask:
Doesn't "lazy initialization" seem like a bad idea?
From the above referenced article:
In order to prevent lazy initialization, advanced options are offered by the mkfs.ext4 command:[20]
mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/mapper/fc-root
By specifying these options, the inodes and the journal will be initialized immediately during creation.