All of lore.kernel.org
 help / color / mirror / Atom feed
* Migrating layout
@ 2015-05-06  4:26 Lucas Clemente Vella
  2015-05-06  6:38 ` Kai Krakow
  0 siblings, 1 reply; 2+ messages in thread
From: Lucas Clemente Vella @ 2015-05-06  4:26 UTC (permalink / raw)
  To: linux-bcache

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?

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

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

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.

-- 
Lucas Clemente Vella
lvella@gmail.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Migrating layout
  2015-05-06  4:26 Migrating layout Lucas Clemente Vella
@ 2015-05-06  6:38 ` Kai Krakow
  0 siblings, 0 replies; 2+ messages in thread
From: Kai Krakow @ 2015-05-06  6:38 UTC (permalink / raw)
  To: linux-bcache

Lucas Clemente Vella <lvella@gmail.com> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-06  6:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-06  4:26 Migrating layout Lucas Clemente Vella
2015-05-06  6:38 ` Kai Krakow

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.