Forum

Full Version: How to make new partition on SD for media files ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I installed Xbian to a 16GB SD card and have it running w/o any problems. Very nice and thanks a lot for all the work that went into it.

So I'm used to placing my home folder, or at least just a folder for my media files in a separate partition.
Usually it makes backup and reinstalling the OS (if necessary) easier.
(Eventually all the media will be on a NAS, but right now I want to put them on the SD card.)

So what would be the recommended final partition format and method to accomplish this ?
I see we're using btrfs - something a bit new to me although I have all the links and have read a lot of pages for dealing with it.

Should I :
  1. Shrink the existing btrfs partition to something smaller, then make another partition, formatted w/ btrfs ?
  2. Shrink the partition to something smaller, then make another partition, formatted w/ EXT4 or NFS?
  3. Another option I've read is to reinstall, and add "noresizesd" to the cmdline.txt, then format w/ one of the above.
  4. Something else ?

I'm trying to do something that will be fairly manageable later on w/ common partitioning , ftp, and backup tools, although I don't mind some CLI configuring just to get it setup in the beginning.

Any thoughts ?
Having a separate partition will not make OS install any easier as the whole card will need to be reformatted or at least overwritten.

Also having the OS and the data on the same media is never the best option.

For simplicity, can't you get a check 2G SD card, use that for your OS and keep the Media on the 16GB drive - easier to backup as you could use ext4 or NTFS depending on which is best for your main computer.

Depending on you timeline for the NAS, I'd just create a folder outside of the /home directory (As this would be included in any Xbian backups you create). Once the NAS is up and running install Xbian on the NAS along with your media files.

I think the crucial part is how volatile are your media files? If they are backed up elsewhere then go for the easy option. Otherwise be wary as I wouldn't trust anything critical on a SD card - especially one with multiple I/O and updates.

1) Not the best option as it limits what other devices can read it.
2) If you know how to, then yes and use ext4 or NTFS depending on your main machine
3) Didn't know that option existed - try it an see
4) See above
Thanks very much for that.

So I thought I could reinstall Xbian (if necessary) to just a partition using perhaps Win32DiskImager.
But it sounds like that wouldn't work (?) - has to be to the whole card.

If that's the case, I think I'll either :
  1. abandon my partitoning idea, as the media files are all backed up elsewhere.
  2. just get a separate USB stick for the media files until the NAS is online.
About the formatting . . . . I meant either EXt4 or NFS (not NTFS).
Is there a preference there ?
I hear NFS is less chatty, but I think the main concern there is if the files are on a NAS, so as to cut down on network traffic.

Thanks a lot for the help !

ps: I added a link for my #3 option in my orig. post - about the "Add noresizesd to the cmdline.txt."
Why partition? There seems to be no logical nor sensible reason to do so, there seems to be no advantages.

If I read you right - ext4 is a filesystem, whereas NFS is a file system protocol. I'm not aware of NFS as a filesystem.

From what you say - go for just making a new folder on the SD card and copy the files to it - not /home

Why make life difficult for yourself - you seem to want to make problems!
NFS - yeh, you're right - oops. Not enough coffee yet and brain got frazzled reading all the btrfs pages.

Yes, so I agree and the "keep simple" was my #1 choice in my second post - abandon the idea.

Usually on desktop systems I like to do a modicum of partitioning to keep things separate for the aforementioned reasons.
But if I can't image Xbian back to a partition, then it doesn't make any sense.
@kbarb

if you don't have 4TB big SD card, it make no sense (to use the SD).

beside the concept to rethink - btrfs is doing ALL operations online. so as you have XBian booted, simply shrink the FS, then in fdisk delete it's partition (mmcblk0p2). then immediatelly create new, smaller. and create the one you need.

but before formatting you have to reboot just for kernel to allow rereading of partitions. otherwise all tools will report you that p3 doesn't exists - you created it and saved on SD but p2 being mounted as root, kernel will refuse reread new info about the mmcblk0 media)

you can image XBian back to partition.

the point is that XBian is trying to make the restore process easier. so IMG it create is not only IMG of partition, but complete setup as P1,P2 and of course correct partition table. so its clear if you write this to disk, even if IMG is smaller as your next partition begin, it will overwrite partition table - making other partitions to "disappear" until you would type them in again.

BUT you can of course just copy the P2 from IMG to your media. Why not? Although prepared will all benefits as working IMG, it is at the end still only /boot partition + data on second.
Reference URL's