I have a 64Gb xc sd card I like to keep it in V4K and use it like local storage for media files.
It showed up in the file manager, but I don’t see any menu to reformat it.
Could somebody explain how I can format it at command line, preferably in a Linux friendly type, not in NTSF?
I don’t use it to reinstall osmc, just to keep media on it.
We’ve discussed this before. The journal is 128MiB. I think it makes sense to make sure that fits into a number of whole erase blocks (AUs), which for an SDXC card are 16MiB. It may be chance, but the only card I’ve ever had fail was not aligned in this way.
For sizes >32GB, AUs are 16MiB. For smaller cards (not tiny ones, too small for OSMC) AUs are 4MiB. So you could pretend all cards are SDXC and lose space or test for card capacity. These are the parameters I’m using:
# find out how big it is to determine AU size
DISKSIZE=$(lsblk -blo NAME,SIZE | grep "$MEDIA " | sed 's/^\S*\s*\(\S*\)\s.*/\1/')
if (( DISKSIZE > 33000000000)); then
echo Formatting SD card $MEDIA
parted -s /dev/$MEDIA mklabel msdos mkpart primary fat32 $BLANK $PART1 \
&& parted /dev/"$MEDIA" set 1 lba on \
&& parted -s /dev/$MEDIA -- mkpart primary ext4 $PART1 -1s
Some ppl put a small partition at the beginning instead of blank space. I haven’t researched the pros and cons of that.
Sorry to revive this topic, but it was the only useful topic found for “sd card ext4 vero4k” via search engines.
I just put a 64GB microSD card (Sandisk Ultra SDSQUNS-064G-GN3MN 64GB 80MB/s UHS-I Class 10 microSDXC Card) into my Vero4K, but it seems it got mounted as exFAT via FUSE. I’d rather use ext4.
However, I’m quite puzzled why you guys are either creating 2 partitions or start the first one 16MB into the card. Can you please explain why this is necessary? Is this just for alignment thus performance or does it also extend the life of the sd card?
There are no guides how to move the kodi library onto a sd card and/or external usb drive. Or maybe I missed them. I could copy the existing .kodi directory onto the card/drive and mount it over the one in my home directory. But is this the preferred way to do this or are there better options?
Ok, I am not an idiot. I’ve been working with Linux/Unix systems for over 20 years. So, yes, I want to do exactly that. Especially since it is a brand new card.
I get that and I know how to format a card to ext4. I don’t even need parted to do it. I was asking why you are creating 2 partitions instead of one. I even stated a few theories.
I know that you just want to help and that your explanation is perfectly valid. But this was also not my question. I know all of these things. What I do not know is, if this is the preferred way to do it or if there are other options that are more the “kodi way” like changing settings in the advanced settings file to write resources somewhere else.
Without being mean or unappreciative I kindly ask you to please look at my previous comment and look at the sentences with a question mark. I need answers to these questions, not some comments directed to the rest of the text I posted.
I think you are missing the entire discussion here. We might be talking past each other.
That’s not why. He meant that people sometimes also use an extra partition to align the real partition to the AUs. Naturally you don’t have to do that if you create a partition so that it is aligned right away.
I want to know about the background of the reasoning for aligning the filesystem with the AUs on the storage. And if it is a performance thing or a method to extend the lifetime of a card.
That’s far beyond the scope of this forum why people do this. These kinds of questions are probably better asked on a linux forum. He do have several people here knowledgeable on linux, but this type of question is very in-depth.
BTW, I have been using *nix since 1981, and I learn new things almost every day.