Re: Migrating layout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lucas Clemente Vella <lvella@xxxxxxxxx> schrieb:

> I made the bad decision of setting up this layout:
> 
> SSD:
>  - /boot
>  - swap
>  - cache space
> 
> HDD:
>  - cached /
>  - cached /home
> 
> With my old PC it was OK, but with my new PC it is a martyrdom to try
> to boot the machine, because due to the fast BIOS, there is race
> condition between the BIOS to be ready to boot and my crappy cheap SSD
> from China to be ready for reading. So booting frequently fails and I
> must reset it over and over again so that, by chance, the BIOS will
> recognize it as a bootable device soon enough.
> 
> Thus my questions:
> 
> - If I copy the contents of /boot to my HDD, and install GRUB there
> making it bootable, will GRUB be able to boot from a bcached
> partition?

No, grub cannot read bcache partitions. Thus, you need an initramfs anyways 
to let udev setup the bcache devices.

> - Will bcache bypass the cache while the SSD is not yet ready/attached
> to the kernel, but work correctly afterwards, when it is ready?

I suggest to only ever try this with bcache in write-around mode. But it 
won't act that way anyways unless you do some udev wizardry.

> - Is it a good idea to have a swap file inside a cached partition of my
> HDD?

No idea... I wouldn't try without a backup.

> I don't want to repartition my HDD, so if I can have a swap file and
> boot from a cached ext4, repartitioning won't be necessary.

I suggest looking into zswap if you can offer only a small swap partition, 
or looking into zram if you can offer no swap partition. However, do not use 
zram with physical swap - it doesn't have the effect you might expect.

As a possible solution I'd boot from initramfs (you probably have to do it 
anyways), and pass "rootwait" on the kernel command line for the initramfs 
to wait until the rootfs is ready. You could also try "rootdelay=<seconds>" 
to make the kernel wait a little.

-- 
Replies to list only preferred.

--
To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux