STRUCT UBI_RNVOL_REQ(9)
π¦ struct ubi_rnvol_req β volumes re-name request π¦
okay so we're deep in the Kernel API Manual rn and honestly? this one's a baddie. it's the struct that handles re-naming UBI volumes, and it's doing the absolute most in the best way π
β¨ NAME β¨
struct ubi_rnvol_req β the volumes re-name request struct, no cap. it's giving "let me rename a bunch of volumes at once" energy π₯
πΈ SYNOPSIS πΈ
like, here's literally the whole shape of it, bestie:
struct ubi_rnvol_req {
__s32 count;
__s8 padding1[12];
struct {
__s32 vol_id;
__s16 name_len;
__s8 padding2[2];
char name[UBI_MAX_VOLUME_NAME + 1];
} ents[UBI_MAX_RNVOL];
};
look at that nested struct. a whole little struct inside a struct. main character behavior tbh π
π Members π
countβ how many volumes we're re-naming. that's it, that's the count πpadding1β reserved for future, not used, and it has to be zeroed. do not forget. i'm serious. don't be that person π
π Description π
so UBI lets you re-name up to 32 volumes in one single go. iconic. the number of volumes you're re-naming goes in the count field. the ID of the volumes you're re-naming goes in vol_id, and the shiny new names go in name. easy π
lowkey the most important part: the UBI volume re-name operation is atomic. meaning if a power cut happens (π), the volumes will have either the old name or the new name. never some cursed in-between state. we love a clean cut π
so the possible use-case for this command is atomic upgrade, fr fr. like β say you wanna upgrade volumes A and B. you could create temporary volumes A1 and B1 with the new contents, then atomically re-name A1->A and B1->B, in which case old A and B will be removed. yes, removed. gone. bye π
but wait β what if you don't want old A and B to get deleted? valid. in that case the re-name request has to contain 4 entries: A1->A, A->A1, B1->B, B->B1 β in which case old A1 and B1 become A and B, and old A and B will become A1 and B1. everybody swaps, nobody gets removed. slay π
it's also OK to request: A1->A, A1->X, B1->B, B->Y, in which case old A1 and B1 become A and B, and old A and B become X and Y. truly whatever you want β¨
in other words β the way this works is: in case of re-naming into an existing volume name, the existing volume is removed, unless it is re-named as well at the same re-name request. that's the whole rule. memorize it. put it on a sticky note π«Ά
π SEE ALSO π
- the kernel file
./include/uapi/mtd/ubi-user.h struct ubi_attach_req(9)struct ubi_mkvol_req(9)struct ubi_rsvol_req(9)struct ubi_ecinfo_req(9)struct ubi_leb_change_req(9)struct ubi_map_req(9)struct ubi_set_vol_prop_req(9)struct ubi_blkcreate_req(9)
okay that's the whole page bestie, go forth and re-name your volumes atomically β¨π this queen lives in ./include/uapi/mtd and the version vibes are dated October 2026 β see u in the next manpage, mwah ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms